summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/swrast')
-rw-r--r--src/mesa/swrast/s_context.h8
-rw-r--r--src/mesa/swrast/s_texfetch.c14
-rw-r--r--src/mesa/swrast/s_texfetch.h2
-rw-r--r--src/mesa/swrast/s_texfilter.c78
-rw-r--r--src/mesa/swrast/s_texrender.c34
5 files changed, 68 insertions, 68 deletions
diff --git a/src/mesa/swrast/s_context.h b/src/mesa/swrast/s_context.h
index d7ad764a9e2..ec8451eb8f0 100644
--- a/src/mesa/swrast/s_context.h
+++ b/src/mesa/swrast/s_context.h
@@ -115,9 +115,9 @@ struct swrast_texture_image;
/**
* Fetch a texel from texture image at given position.
*/
-typedef void (*FetchTexelFuncF)(const struct swrast_texture_image *texImage,
- GLint col, GLint row, GLint img,
- GLfloat *texelOut);
+typedef void (*FetchTexelFunc)(const struct swrast_texture_image *texImage,
+ GLint col, GLint row, GLint img,
+ GLfloat *texelOut);
typedef void (*StoreTexelFunc)(struct swrast_texture_image *texImage,
@@ -144,7 +144,7 @@ struct swrast_texture_image
GLint TexelSize; /**< bytes per texel block */
#endif
- FetchTexelFuncF FetchTexelf;
+ FetchTexelFunc FetchTexel;
StoreTexelFunc Store;
#if 0
diff --git a/src/mesa/swrast/s_texfetch.c b/src/mesa/swrast/s_texfetch.c
index 4bacf218b0b..a854c3efd24 100644
--- a/src/mesa/swrast/s_texfetch.c
+++ b/src/mesa/swrast/s_texfetch.c
@@ -121,9 +121,9 @@ static void store_null_texel(struct swrast_texture_image *texImage,
*/
static struct {
gl_format Name;
- FetchTexelFuncF Fetch1D;
- FetchTexelFuncF Fetch2D;
- FetchTexelFuncF Fetch3D;
+ FetchTexelFunc Fetch1D;
+ FetchTexelFunc Fetch2D;
+ FetchTexelFunc Fetch3D;
StoreTexelFunc StoreTexel;
}
texfetch_funcs[MESA_FORMAT_COUNT] =
@@ -1250,7 +1250,7 @@ texfetch_funcs[MESA_FORMAT_COUNT] =
};
-FetchTexelFuncF
+FetchTexelFunc
_mesa_get_texel_fetch_func(gl_format format, GLuint dims)
{
#ifdef DEBUG
@@ -1287,7 +1287,7 @@ _mesa_get_texel_store_func(gl_format format)
/**
- * Initialize the texture image's FetchTexelf methods.
+ * Initialize the texture image's FetchTexel methods.
*/
static void
set_fetch_functions(struct swrast_texture_image *texImage, GLuint dims)
@@ -1301,8 +1301,8 @@ set_fetch_functions(struct swrast_texture_image *texImage, GLuint dims)
format = _mesa_get_srgb_format_linear(format);
}
- texImage->FetchTexelf = _mesa_get_texel_fetch_func(format, dims);
- ASSERT(texImage->FetchTexelf);
+ texImage->FetchTexel = _mesa_get_texel_fetch_func(format, dims);
+ ASSERT(texImage->FetchTexel);
}
void
diff --git a/src/mesa/swrast/s_texfetch.h b/src/mesa/swrast/s_texfetch.h
index 19b196a5ad3..c98aa5c5a49 100644
--- a/src/mesa/swrast/s_texfetch.h
+++ b/src/mesa/swrast/s_texfetch.h
@@ -32,7 +32,7 @@
extern StoreTexelFunc
_mesa_get_texel_store_func(gl_format format);
-extern FetchTexelFuncF
+extern FetchTexelFunc
_mesa_get_texel_fetch_func(gl_format format, GLuint dims);
void
diff --git a/src/mesa/swrast/s_texfilter.c b/src/mesa/swrast/s_texfilter.c
index 121e0fce2cc..f8b0fa1aa73 100644
--- a/src/mesa/swrast/s_texfilter.c
+++ b/src/mesa/swrast/s_texfilter.c
@@ -815,7 +815,7 @@ sample_1d_nearest(struct gl_context *ctx,
get_border_color(tObj, img, rgba);
}
else {
- swImg->FetchTexelf(swImg, i, 0, 0, rgba);
+ swImg->FetchTexel(swImg, i, 0, 0, rgba);
}
}
@@ -852,13 +852,13 @@ sample_1d_linear(struct gl_context *ctx,
get_border_color(tObj, img, t0);
}
else {
- swImg->FetchTexelf(swImg, i0, 0, 0, t0);
+ swImg->FetchTexel(swImg, i0, 0, 0, t0);
}
if (useBorderColor & I1BIT) {
get_border_color(tObj, img, t1);
}
else {
- swImg->FetchTexelf(swImg, i1, 0, 0, t1);
+ swImg->FetchTexel(swImg, i1, 0, 0, t1);
}
lerp_rgba(rgba, a, t0, t1);
@@ -1082,7 +1082,7 @@ sample_2d_nearest(struct gl_context *ctx,
get_border_color(tObj, img, rgba);
}
else {
- swImg->FetchTexelf(swImg, i, j, 0, rgba);
+ swImg->FetchTexel(swImg, i, j, 0, rgba);
}
}
@@ -1127,25 +1127,25 @@ sample_2d_linear(struct gl_context *ctx,
get_border_color(tObj, img, t00);
}
else {
- swImg->FetchTexelf(swImg, i0, j0, 0, t00);
+ swImg->FetchTexel(swImg, i0, j0, 0, t00);
}
if (useBorderColor & (I1BIT | J0BIT)) {
get_border_color(tObj, img, t10);
}
else {
- swImg->FetchTexelf(swImg, i1, j0, 0, t10);
+ swImg->FetchTexel(swImg, i1, j0, 0, t10);
}
if (useBorderColor & (I0BIT | J1BIT)) {
get_border_color(tObj, img, t01);
}
else {
- swImg->FetchTexelf(swImg, i0, j1, 0, t01);
+ swImg->FetchTexel(swImg, i0, j1, 0, t01);
}
if (useBorderColor & (I1BIT | J1BIT)) {
get_border_color(tObj, img, t11);
}
else {
- swImg->FetchTexelf(swImg, i1, j1, 0, t11);
+ swImg->FetchTexel(swImg, i1, j1, 0, t11);
}
lerp_rgba_2d(rgba, a, b, t00, t10, t01, t11);
@@ -1180,10 +1180,10 @@ sample_2d_linear_repeat(struct gl_context *ctx,
linear_repeat_texel_location(width, texcoord[0], &i0, &i1, &wi);
linear_repeat_texel_location(height, texcoord[1], &j0, &j1, &wj);
- swImg->FetchTexelf(swImg, i0, j0, 0, t00);
- swImg->FetchTexelf(swImg, i1, j0, 0, t10);
- swImg->FetchTexelf(swImg, i0, j1, 0, t01);
- swImg->FetchTexelf(swImg, i1, j1, 0, t11);
+ swImg->FetchTexel(swImg, i0, j0, 0, t00);
+ swImg->FetchTexel(swImg, i1, j0, 0, t10);
+ swImg->FetchTexel(swImg, i0, j1, 0, t01);
+ swImg->FetchTexel(swImg, i1, j1, 0, t11);
lerp_rgba_2d(rgba, wi, wj, t00, t10, t01, t11);
}
@@ -1968,7 +1968,7 @@ sample_3d_nearest(struct gl_context *ctx,
get_border_color(tObj, img, rgba);
}
else {
- swImg->FetchTexelf(swImg, i, j, k, rgba);
+ swImg->FetchTexel(swImg, i, j, k, rgba);
}
}
@@ -2020,50 +2020,50 @@ sample_3d_linear(struct gl_context *ctx,
get_border_color(tObj, img, t000);
}
else {
- swImg->FetchTexelf(swImg, i0, j0, k0, t000);
+ swImg->FetchTexel(swImg, i0, j0, k0, t000);
}
if (useBorderColor & (I1BIT | J0BIT | K0BIT)) {
get_border_color(tObj, img, t100);
}
else {
- swImg->FetchTexelf(swImg, i1, j0, k0, t100);
+ swImg->FetchTexel(swImg, i1, j0, k0, t100);
}
if (useBorderColor & (I0BIT | J1BIT | K0BIT)) {
get_border_color(tObj, img, t010);
}
else {
- swImg->FetchTexelf(swImg, i0, j1, k0, t010);
+ swImg->FetchTexel(swImg, i0, j1, k0, t010);
}
if (useBorderColor & (I1BIT | J1BIT | K0BIT)) {
get_border_color(tObj, img, t110);
}
else {
- swImg->FetchTexelf(swImg, i1, j1, k0, t110);
+ swImg->FetchTexel(swImg, i1, j1, k0, t110);
}
if (useBorderColor & (I0BIT | J0BIT | K1BIT)) {
get_border_color(tObj, img, t001);
}
else {
- swImg->FetchTexelf(swImg, i0, j0, k1, t001);
+ swImg->FetchTexel(swImg, i0, j0, k1, t001);
}
if (useBorderColor & (I1BIT | J0BIT | K1BIT)) {
get_border_color(tObj, img, t101);
}
else {
- swImg->FetchTexelf(swImg, i1, j0, k1, t101);
+ swImg->FetchTexel(swImg, i1, j0, k1, t101);
}
if (useBorderColor & (I0BIT | J1BIT | K1BIT)) {
get_border_color(tObj, img, t011);
}
else {
- swImg->FetchTexelf(swImg, i0, j1, k1, t011);
+ swImg->FetchTexel(swImg, i0, j1, k1, t011);
}
if (useBorderColor & (I1BIT | J1BIT | K1BIT)) {
get_border_color(tObj, img, t111);
}
else {
- swImg->FetchTexelf(swImg, i1, j1, k1, t111);
+ swImg->FetchTexel(swImg, i1, j1, k1, t111);
}
/* trilinear interpolation of samples */
@@ -2584,7 +2584,7 @@ sample_nearest_rect(struct gl_context *ctx,
if (col < 0 || col >= width || row < 0 || row >= height)
get_border_color(tObj, img, rgba[i]);
else
- swImg->FetchTexelf(swImg, col, row, 0, rgba[i]);
+ swImg->FetchTexel(swImg, col, row, 0, rgba[i]);
}
}
@@ -2632,22 +2632,22 @@ sample_linear_rect(struct gl_context *ctx,
if (useBorderColor & (I0BIT | J0BIT))
get_border_color(tObj, img, t00);
else
- swImg->FetchTexelf(swImg, i0, j0, 0, t00);
+ swImg->FetchTexel(swImg, i0, j0, 0, t00);
if (useBorderColor & (I1BIT | J0BIT))
get_border_color(tObj, img, t10);
else
- swImg->FetchTexelf(swImg, i1, j0, 0, t10);
+ swImg->FetchTexel(swImg, i1, j0, 0, t10);
if (useBorderColor & (I0BIT | J1BIT))
get_border_color(tObj, img, t01);
else
- swImg->FetchTexelf(swImg, i0, j1, 0, t01);
+ swImg->FetchTexel(swImg, i0, j1, 0, t01);
if (useBorderColor & (I1BIT | J1BIT))
get_border_color(tObj, img, t11);
else
- swImg->FetchTexelf(swImg, i1, j1, 0, t11);
+ swImg->FetchTexel(swImg, i1, j1, 0, t11);
lerp_rgba_2d(rgba[i], a, b, t00, t10, t01, t11);
}
@@ -2725,7 +2725,7 @@ sample_2d_array_nearest(struct gl_context *ctx,
get_border_color(tObj, img, rgba);
}
else {
- swImg->FetchTexelf(swImg, i, j, array, rgba);
+ swImg->FetchTexel(swImg, i, j, array, rgba);
}
}
@@ -2777,25 +2777,25 @@ sample_2d_array_linear(struct gl_context *ctx,
get_border_color(tObj, img, t00);
}
else {
- swImg->FetchTexelf(swImg, i0, j0, array, t00);
+ swImg->FetchTexel(swImg, i0, j0, array, t00);
}
if (useBorderColor & (I1BIT | J0BIT)) {
get_border_color(tObj, img, t10);
}
else {
- swImg->FetchTexelf(swImg, i1, j0, array, t10);
+ swImg->FetchTexel(swImg, i1, j0, array, t10);
}
if (useBorderColor & (I0BIT | J1BIT)) {
get_border_color(tObj, img, t01);
}
else {
- swImg->FetchTexelf(swImg, i0, j1, array, t01);
+ swImg->FetchTexel(swImg, i0, j1, array, t01);
}
if (useBorderColor & (I1BIT | J1BIT)) {
get_border_color(tObj, img, t11);
}
else {
- swImg->FetchTexelf(swImg, i1, j1, array, t11);
+ swImg->FetchTexel(swImg, i1, j1, array, t11);
}
/* trilinear interpolation of samples */
@@ -3034,7 +3034,7 @@ sample_1d_array_nearest(struct gl_context *ctx,
get_border_color(tObj, img, rgba);
}
else {
- swImg->FetchTexelf(swImg, i, array, 0, rgba);
+ swImg->FetchTexel(swImg, i, array, 0, rgba);
}
}
@@ -3078,13 +3078,13 @@ sample_1d_array_linear(struct gl_context *ctx,
get_border_color(tObj, img, t0);
}
else {
- swImg->FetchTexelf(swImg, i0, array, 0, t0);
+ swImg->FetchTexel(swImg, i0, array, 0, t0);
}
if (useBorderColor & (I1BIT | K0BIT)) {
get_border_color(tObj, img, t1);
}
else {
- swImg->FetchTexelf(swImg, i1, array, 0, t1);
+ swImg->FetchTexel(swImg, i1, array, 0, t1);
}
/* bilinear interpolation of samples */
@@ -3448,7 +3448,7 @@ sample_depth_texture( struct gl_context *ctx,
if (col >= 0 && row >= 0 && col < width && row < height &&
slice >= 0 && slice < depth) {
- swImg->FetchTexelf(swImg, col, row, slice, &depthSample);
+ swImg->FetchTexel(swImg, col, row, slice, &depthSample);
}
else {
depthSample = tObj->Sampler.BorderColor.f[0];
@@ -3517,13 +3517,13 @@ sample_depth_texture( struct gl_context *ctx,
depth00 = tObj->Sampler.BorderColor.f[0];
}
else {
- swImg->FetchTexelf(swImg, i0, j0, slice, &depth00);
+ swImg->FetchTexel(swImg, i0, j0, slice, &depth00);
}
if (useBorderTexel & (I1BIT | J0BIT)) {
depth10 = tObj->Sampler.BorderColor.f[0];
}
else {
- swImg->FetchTexelf(swImg, i1, j0, slice, &depth10);
+ swImg->FetchTexel(swImg, i1, j0, slice, &depth10);
}
if (tObj->Target != GL_TEXTURE_1D_ARRAY_EXT) {
@@ -3531,13 +3531,13 @@ sample_depth_texture( struct gl_context *ctx,
depth01 = tObj->Sampler.BorderColor.f[0];
}
else {
- swImg->FetchTexelf(swImg, i0, j1, slice, &depth01);
+ swImg->FetchTexel(swImg, i0, j1, slice, &depth01);
}
if (useBorderTexel & (I1BIT | J1BIT)) {
depth11 = tObj->Sampler.BorderColor.f[0];
}
else {
- swImg->FetchTexelf(swImg, i1, j1, slice, &depth11);
+ swImg->FetchTexel(swImg, i1, j1, slice, &depth11);
}
}
else {
diff --git a/src/mesa/swrast/s_texrender.c b/src/mesa/swrast/s_texrender.c
index 64395287584..47e458e1c5c 100644
--- a/src/mesa/swrast/s_texrender.c
+++ b/src/mesa/swrast/s_texrender.c
@@ -23,7 +23,7 @@ struct texture_renderbuffer
struct gl_renderbuffer Base; /**< Base class object */
struct swrast_texture_image *TexImage;
StoreTexelFunc Store;
- FetchTexelFuncF Fetchf;
+ FetchTexelFunc Fetch;
GLint Yoffset; /**< Layer for 1D array textures. */
GLint Zoffset; /**< Layer for 2D array textures, or slice
* for 3D textures
@@ -52,7 +52,7 @@ texture_get_row(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count
GLchan *rgbaOut = (GLchan *) values;
for (i = 0; i < count; i++) {
GLfloat rgba[4];
- trb->Fetchf(trb->TexImage, x + i, y, z, rgba);
+ trb->Fetch(trb->TexImage, x + i, y, z, rgba);
UNCLAMPED_FLOAT_TO_RGBA_CHAN(rgbaOut + 4 * i, rgba);
}
}
@@ -60,7 +60,7 @@ texture_get_row(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count
GLushort *zValues = (GLushort *) values;
for (i = 0; i < count; i++) {
GLfloat flt;
- trb->Fetchf(trb->TexImage, x + i, y, z, &flt);
+ trb->Fetch(trb->TexImage, x + i, y, z, &flt);
zValues[i] = (GLushort) (flt * 0xffff);
}
}
@@ -71,7 +71,7 @@ texture_get_row(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count
*/
for (i = 0; i < count; i++) {
GLfloat flt;
- trb->Fetchf(trb->TexImage, x + i, y, z, &flt);
+ trb->Fetch(trb->TexImage, x + i, y, z, &flt);
#if 0
/* this should work, but doesn't (overflow due to low precision) */
zValues[i] = (GLuint) (flt * scale);
@@ -85,7 +85,7 @@ texture_get_row(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count
GLuint *zValues = (GLuint *) values;
for (i = 0; i < count; i++) {
GLfloat flt;
- trb->Fetchf(trb->TexImage, x + i, y, z, &flt);
+ trb->Fetch(trb->TexImage, x + i, y, z, &flt);
zValues[i] = ((GLuint) (flt * 0xffffff)) << 8;
}
}
@@ -93,7 +93,7 @@ texture_get_row(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count
GLuint *zValues = (GLuint *) values;
for (i = 0; i < count; i++) {
GLfloat flt;
- trb->Fetchf(trb->TexImage, x + i, y, z, &flt);
+ trb->Fetch(trb->TexImage, x + i, y, z, &flt);
zValues[i] = (GLuint) (flt * 0xffffff);
}
}
@@ -116,7 +116,7 @@ texture_get_values(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint co
GLchan *rgbaOut = (GLchan *) values;
for (i = 0; i < count; i++) {
GLfloat rgba[4];
- trb->Fetchf(trb->TexImage, x[i], y[i] + trb->Yoffset,
+ trb->Fetch(trb->TexImage, x[i], y[i] + trb->Yoffset,
z, rgba);
UNCLAMPED_FLOAT_TO_RGBA_CHAN(rgbaOut + 4 * i, rgba);
}
@@ -125,7 +125,7 @@ texture_get_values(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint co
GLushort *zValues = (GLushort *) values;
for (i = 0; i < count; i++) {
GLfloat flt;
- trb->Fetchf(trb->TexImage, x[i], y[i] + trb->Yoffset,
+ trb->Fetch(trb->TexImage, x[i], y[i] + trb->Yoffset,
z, &flt);
zValues[i] = (GLushort) (flt * 0xffff);
}
@@ -134,7 +134,7 @@ texture_get_values(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint co
GLuint *zValues = (GLuint *) values;
for (i = 0; i < count; i++) {
GLfloat flt;
- trb->Fetchf(trb->TexImage, x[i], y[i] + trb->Yoffset,
+ trb->Fetch(trb->TexImage, x[i], y[i] + trb->Yoffset,
z, &flt);
#if 0
zValues[i] = (GLuint) (flt * 0xffffffff);
@@ -147,7 +147,7 @@ texture_get_values(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint co
GLuint *zValues = (GLuint *) values;
for (i = 0; i < count; i++) {
GLfloat flt;
- trb->Fetchf(trb->TexImage, x[i], y[i] + trb->Yoffset,
+ trb->Fetch(trb->TexImage, x[i], y[i] + trb->Yoffset,
z, &flt);
zValues[i] = ((GLuint) (flt * 0xffffff)) << 8;
}
@@ -156,7 +156,7 @@ texture_get_values(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint co
GLuint *zValues = (GLuint *) values;
for (i = 0; i < count; i++) {
GLfloat flt;
- trb->Fetchf(trb->TexImage, x[i], y[i] + trb->Yoffset,
+ trb->Fetch(trb->TexImage, x[i], y[i] + trb->Yoffset,
z, &flt);
zValues[i] = (GLuint) (flt * 0xffffff);
}
@@ -544,11 +544,11 @@ update_wrapper(struct gl_context *ctx, struct gl_renderbuffer_attachment *att)
trb->Store = store_nop;
}
- if (!trb->TexImage->FetchTexelf) {
+ if (!trb->TexImage->FetchTexel) {
_mesa_update_fetch_functions(trb->TexImage->Base.TexObject);
}
- trb->Fetchf = trb->TexImage->FetchTexelf;
- assert(trb->Fetchf);
+ trb->Fetch = trb->TexImage->FetchTexel;
+ assert(trb->Fetch);
if (att->Texture->Target == GL_TEXTURE_1D_ARRAY_EXT) {
trb->Yoffset = att->Zoffset;
@@ -592,17 +592,17 @@ update_wrapper(struct gl_context *ctx, struct gl_renderbuffer_attachment *att)
break;
/* SRGB formats pre EXT_framebuffer_sRGB don't do sRGB translations on FBO readback */
case MESA_FORMAT_SRGB8:
- trb->Fetchf = _mesa_get_texel_fetch_func(MESA_FORMAT_RGB888, _mesa_get_texture_dimensions(att->Texture->Target));
+ trb->Fetch = _mesa_get_texel_fetch_func(MESA_FORMAT_RGB888, _mesa_get_texture_dimensions(att->Texture->Target));
trb->Base.DataType = CHAN_TYPE;
trb->Base._BaseFormat = GL_RGBA;
break;
case MESA_FORMAT_SRGBA8:
- trb->Fetchf = _mesa_get_texel_fetch_func(MESA_FORMAT_RGBA8888, _mesa_get_texture_dimensions(att->Texture->Target));
+ trb->Fetch = _mesa_get_texel_fetch_func(MESA_FORMAT_RGBA8888, _mesa_get_texture_dimensions(att->Texture->Target));
trb->Base.DataType = CHAN_TYPE;
trb->Base._BaseFormat = GL_RGBA;
break;
case MESA_FORMAT_SARGB8:
- trb->Fetchf = _mesa_get_texel_fetch_func(MESA_FORMAT_ARGB8888, _mesa_get_texture_dimensions(att->Texture->Target));
+ trb->Fetch = _mesa_get_texel_fetch_func(MESA_FORMAT_ARGB8888, _mesa_get_texture_dimensions(att->Texture->Target));
trb->Base.DataType = CHAN_TYPE;
trb->Base._BaseFormat = GL_RGBA;
break;