get_border_color(tObj, img, rgba);
}
else {
- swImg->FetchTexelf(swImg, i, 0, 0, rgba);
+ swImg->FetchTexel(swImg, i, 0, 0, rgba);
}
}
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);
get_border_color(tObj, img, rgba);
}
else {
- swImg->FetchTexelf(swImg, i, j, 0, rgba);
+ swImg->FetchTexel(swImg, i, j, 0, rgba);
}
}
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);
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);
}
get_border_color(tObj, img, rgba);
}
else {
- swImg->FetchTexelf(swImg, i, j, k, rgba);
+ swImg->FetchTexel(swImg, i, j, k, rgba);
}
}
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 */
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]);
}
}
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);
}
get_border_color(tObj, img, rgba);
}
else {
- swImg->FetchTexelf(swImg, i, j, array, rgba);
+ swImg->FetchTexel(swImg, i, j, array, rgba);
}
}
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 */
get_border_color(tObj, img, rgba);
}
else {
- swImg->FetchTexelf(swImg, i, array, 0, rgba);
+ swImg->FetchTexel(swImg, i, array, 0, rgba);
}
}
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 */
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];
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) {
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 {
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
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);
}
}
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);
}
}
*/
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);
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;
}
}
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);
}
}
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);
}
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);
}
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);
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;
}
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);
}
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;
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;