Example #1
0
void
_mesa_fetch_texel_2d_f_signed_la_latc2(const struct swrast_texture_image *texImage,
                                       GLint i, GLint j, GLint k, GLfloat *texel)
{
   GLbyte red, green;
   signed_fetch_texel_rgtc(texImage->RowStride, (GLbyte *)(texImage->Data),
                     i, j, &red, 2);
   signed_fetch_texel_rgtc(texImage->RowStride, (GLbyte *)(texImage->Data) + 8,
                     i, j, &green, 2);
   texel[RCOMP] =
   texel[GCOMP] =
   texel[BCOMP] = BYTE_TO_FLOAT_TEX(red);
   texel[ACOMP] = BYTE_TO_FLOAT_TEX(green);
}
Example #2
0
static void
fetch_signed_la_latc2(const GLubyte *map,
                      GLint rowStride, GLint i, GLint j, GLfloat *texel)
{
   GLbyte red, green;
   signed_fetch_texel_rgtc(rowStride,
                           (GLbyte *) map,
                           i, j, &red, 2);
   signed_fetch_texel_rgtc(rowStride,
                           (GLbyte *) map + 8,
                           i, j, &green, 2);
   texel[RCOMP] =
   texel[GCOMP] =
   texel[BCOMP] = BYTE_TO_FLOAT_TEX(red);
   texel[ACOMP] = BYTE_TO_FLOAT_TEX(green);
}
Example #3
0
void
_mesa_fetch_texel_signed_la_latc2(const struct swrast_texture_image *texImage,
                                  GLint i, GLint j, GLint k, GLfloat *texel)
{
   GLbyte red, green;
   GLint sliceOffset = k ? texImage->ImageOffsets[k] : 0;
   signed_fetch_texel_rgtc(texImage->RowStride,
                           (GLbyte *)(texImage->Map) + sliceOffset,
                           i, j, &red, 2);
   signed_fetch_texel_rgtc(texImage->RowStride,
                           (GLbyte *)(texImage->Map) + sliceOffset + 8,
                           i, j, &green, 2);
   texel[RCOMP] =
   texel[GCOMP] =
   texel[BCOMP] = BYTE_TO_FLOAT_TEX(red);
   texel[ACOMP] = BYTE_TO_FLOAT_TEX(green);
}
Example #4
0
static void
fetch_signed_red_rgtc1(const GLubyte *map,
                       GLint rowStride, GLint i, GLint j, GLfloat *texel)
{
   GLbyte red;
   signed_fetch_texel_rgtc(rowStride, (const GLbyte *) map,
                           i, j, &red, 1);
   texel[RCOMP] = BYTE_TO_FLOAT_TEX(red);
   texel[GCOMP] = 0.0;
   texel[BCOMP] = 0.0;
   texel[ACOMP] = 1.0;
}
Example #5
0
void
_mesa_fetch_texel_2d_f_signed_red_rgtc1(const struct swrast_texture_image *texImage,
					GLint i, GLint j, GLint k, GLfloat *texel)
{
   GLbyte red;
   signed_fetch_texel_rgtc(texImage->RowStride, (GLbyte *)(texImage->Data),
		       i, j, &red, 1);
   texel[RCOMP] = BYTE_TO_FLOAT_TEX(red);
   texel[GCOMP] = 0.0;
   texel[BCOMP] = 0.0;
   texel[ACOMP] = 1.0;
}
Example #6
0
void
_mesa_fetch_texel_signed_red_rgtc1(const struct swrast_texture_image *texImage,
                                   GLint i, GLint j, GLint k, GLfloat *texel)
{
   GLbyte red;
   GLint sliceOffset = k ? texImage->ImageOffsets[k] / 2 : 0;
   signed_fetch_texel_rgtc(texImage->RowStride,
                           (GLbyte *)(texImage->Map) + sliceOffset,
                           i, j, &red, 1);
   texel[RCOMP] = BYTE_TO_FLOAT_TEX(red);
   texel[GCOMP] = 0.0;
   texel[BCOMP] = 0.0;
   texel[ACOMP] = 1.0;
}