diff options
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_wm_surface_state.c')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c index 66301a9b08c..298678a03c0 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c +++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c @@ -570,2 +570,17 @@ brw_init_surface_formats(struct brw_context *brw) ctx->TextureFormatSupported[MESA_FORMAT_ETC1_RGB8] = true; + + /* On hardware that lacks support for ETC2, we map ETC2 to a suitable + * MESA_FORMAT during glCompressedTexImage2D(). + * See intel_mipmap_tree::wraps_etc2. + */ + ctx->TextureFormatSupported[MESA_FORMAT_ETC2_RGB8] = true; + ctx->TextureFormatSupported[MESA_FORMAT_ETC2_SRGB8] = true; + ctx->TextureFormatSupported[MESA_FORMAT_ETC2_RGBA8_EAC] = true; + ctx->TextureFormatSupported[MESA_FORMAT_ETC2_SRGB8_ALPHA8_EAC] = true; + ctx->TextureFormatSupported[MESA_FORMAT_ETC2_R11_EAC] = true; + ctx->TextureFormatSupported[MESA_FORMAT_ETC2_RG11_EAC] = true; + ctx->TextureFormatSupported[MESA_FORMAT_ETC2_SIGNED_R11_EAC] = true; + ctx->TextureFormatSupported[MESA_FORMAT_ETC2_SIGNED_RG11_EAC] = true; + ctx->TextureFormatSupported[MESA_FORMAT_ETC2_RGB8_PUNCHTHROUGH_ALPHA1] = true; + ctx->TextureFormatSupported[MESA_FORMAT_ETC2_SRGB8_PUNCHTHROUGH_ALPHA1] = true; } |