if (intel_screen->deviceID != PCI_CHIP_I830_M &&
intel_screen->deviceID != PCI_CHIP_845_G)
ctx->TextureFormatSupported[MESA_FORMAT_XRGB8888] = true;
+ if (intel->gen == 3)
+ ctx->TextureFormatSupported[MESA_FORMAT_SARGB8] = true;
ctx->TextureFormatSupported[MESA_FORMAT_ARGB4444] = true;
ctx->TextureFormatSupported[MESA_FORMAT_ARGB1555] = true;
ctx->TextureFormatSupported[MESA_FORMAT_RGB565] = true;
return MAPSURF_16BIT | MT_16BIT_ARGB1555;
case MESA_FORMAT_ARGB4444:
return MAPSURF_16BIT | MT_16BIT_ARGB4444;
+ case MESA_FORMAT_SARGB8:
case MESA_FORMAT_ARGB8888:
return MAPSURF_32BIT | MT_32BIT_ARGB8888;
case MESA_FORMAT_XRGB8888:
return (MAPSURF_16BIT | MT_16BIT_L16);
case MESA_FORMAT_RGBA_DXT1:
case MESA_FORMAT_RGB_DXT1:
+ case MESA_FORMAT_SRGB_DXT1:
+ case MESA_FORMAT_SRGBA_DXT1:
return (MAPSURF_COMPRESSED | MT_COMPRESS_DXT1);
case MESA_FORMAT_RGBA_DXT3:
+ case MESA_FORMAT_SRGBA_DXT3:
return (MAPSURF_COMPRESSED | MT_COMPRESS_DXT2_3);
case MESA_FORMAT_RGBA_DXT5:
+ case MESA_FORMAT_SRGBA_DXT5:
return (MAPSURF_COMPRESSED | MT_COMPRESS_DXT4_5);
case MESA_FORMAT_S8_Z24:
case MESA_FORMAT_X8_Z24:
}
+ if (sampler->sRGBDecode == GL_DECODE_EXT &&
+ (_mesa_get_srgb_format_linear(firstImage->TexFormat) !=
+ firstImage->TexFormat)) {
+ state[I915_TEXREG_SS2] |= SS2_REVERSE_GAMMA_ENABLE;
+ }
+
/* convert border color from float to ubyte */
CLAMPED_FLOAT_TO_UBYTE(border[0], sampler->BorderColor.f[0]);
CLAMPED_FLOAT_TO_UBYTE(border[1], sampler->BorderColor.f[1]);
ctx->Extensions.EXT_texture_array = true;
ctx->Extensions.EXT_texture_integer = true;
ctx->Extensions.EXT_texture_snorm = true;
- ctx->Extensions.EXT_texture_sRGB = true;
- ctx->Extensions.EXT_texture_sRGB_decode = true;
ctx->Extensions.EXT_texture_swizzle = true;
ctx->Extensions.EXT_vertex_array_bgra = true;
ctx->Extensions.ATI_envmap_bumpmap = true;
ctx->Extensions.ARB_fragment_program = true;
ctx->Extensions.ARB_shadow = true;
ctx->Extensions.ARB_texture_non_power_of_two = true;
+ ctx->Extensions.EXT_texture_sRGB = true;
+ ctx->Extensions.EXT_texture_sRGB_decode = true;
ctx->Extensions.EXT_shadow_funcs = true;
ctx->Extensions.EXT_stencil_two_side = true;
ctx->Extensions.ATI_separate_stencil = true;