summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2011-09-20 15:27:07 -0700
committerEric Anholt <[email protected]>2011-09-22 10:58:34 -0700
commit03e623a27b95ef228fb4fca71c6d7c7a21630033 (patch)
treefe03c97a9a2e9f5e83072b80ec26502aec3a6661 /src/mesa/drivers/dri
parent2fd8c4e3edf989c6f7dd1261a67b01f06979feab (diff)
i965: Add support for GL_EXT_packed_float.
This doesn't cover support for this format as a renderbuffer yet. The spec allows implementations to not support it, though it is something we do want to support. Only one failure in piglit on gen6, which is texwrap with bordercolor (as usual). Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm_surface_state.c1
-rw-r--r--src/mesa/drivers/dri/intel/intel_context.c3
-rw-r--r--src/mesa/drivers/dri/intel/intel_extensions.c1
3 files changed, 5 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 20e726581f6..5be5c162490 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
@@ -122,6 +122,7 @@ brw_format_for_mesa_format(gl_format mesa_format)
[MESA_FORMAT_RG_RGTC2] = BRW_SURFACEFORMAT_BC5_UNORM,
[MESA_FORMAT_SIGNED_RG_RGTC2] = BRW_SURFACEFORMAT_BC5_SNORM,
[MESA_FORMAT_RGB9_E5_FLOAT] = BRW_SURFACEFORMAT_R9G9B9E5_SHAREDEXP,
+ [MESA_FORMAT_R11_G11_B10_FLOAT] = BRW_SURFACEFORMAT_R11G11B10_FLOAT,
};
assert(mesa_format < MESA_FORMAT_COUNT);
return table[mesa_format];
diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c
index ada503fff41..caac24afc90 100644
--- a/src/mesa/drivers/dri/intel/intel_context.c
+++ b/src/mesa/drivers/dri/intel/intel_context.c
@@ -733,6 +733,9 @@ intelInitContext(struct intel_context *intel,
/* GL_EXT_texture_shared_exponent */
ctx->TextureFormatSupported[MESA_FORMAT_RGB9_E5_FLOAT] = GL_TRUE;
+
+ /* GL_EXT_packed_float */
+ ctx->TextureFormatSupported[MESA_FORMAT_R11_G11_B10_FLOAT] = GL_TRUE;
#endif
#endif /* !I915 */
diff --git a/src/mesa/drivers/dri/intel/intel_extensions.c b/src/mesa/drivers/dri/intel/intel_extensions.c
index 43f0d83f14d..f6b825810f2 100644
--- a/src/mesa/drivers/dri/intel/intel_extensions.c
+++ b/src/mesa/drivers/dri/intel/intel_extensions.c
@@ -133,6 +133,7 @@ intelInitExtensions(struct gl_context *ctx)
#ifdef TEXTURE_FLOAT_ENABLED
ctx->Extensions.ARB_texture_float = true;
ctx->Extensions.EXT_texture_shared_exponent = true;
+ ctx->Extensions.EXT_packed_float = true;
#endif
ctx->Extensions.ARB_texture_compression_rgtc = true;
ctx->Extensions.ARB_texture_rg = true;