[Mesa-dev] [PATCH 2/2] i965: Enable floating-point textures always

Ian Romanick idr at freedesktop.org
Thu Oct 18 14:02:24 PDT 2012


From: Ian Romanick <ian.d.romanick at intel.com>

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
 src/mesa/drivers/dri/i965/brw_context.c       | 9 ---------
 src/mesa/drivers/dri/intel/intel_extensions.c | 2 --
 2 files changed, 11 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
index 1448965..91df899 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -90,14 +90,10 @@ brwCreateContext(int api,
     */
    switch (api) {
    case API_OPENGL: {
-#ifdef TEXTURE_FLOAT_ENABLED
       const unsigned max_version =
          (screen->gen == 6 ||
           (screen->gen == 7 && screen->kernel_has_gen7_sol_reset))
          ? 30 : 21;
-#else
-      const unsigned max_version = 21;
-#endif
       const unsigned req_version = major_version * 10 + minor_version;
 
       if (req_version > max_version) {
@@ -110,7 +106,6 @@ brwCreateContext(int api,
    case API_OPENGLES2:
       break;
    case API_OPENGL_CORE: {
-#ifdef TEXTURE_FLOAT_ENABLED
       const unsigned max_version =
          (screen->gen == 6 ||
           (screen->gen == 7 && screen->kernel_has_gen7_sol_reset))
@@ -123,10 +118,6 @@ brwCreateContext(int api,
          return false;
       }
       break;
-#else
-      *error = __DRI_CTX_ERROR_BAD_API;
-      return false;
-#endif
    }
    default:
       *error = __DRI_CTX_ERROR_BAD_API;
diff --git a/src/mesa/drivers/dri/intel/intel_extensions.c b/src/mesa/drivers/dri/intel/intel_extensions.c
index 40fdd23..329faba 100755
--- a/src/mesa/drivers/dri/intel/intel_extensions.c
+++ b/src/mesa/drivers/dri/intel/intel_extensions.c
@@ -139,11 +139,9 @@ intelInitExtensions(struct gl_context *ctx)
       ctx->Extensions.ARB_seamless_cube_map = true;
       ctx->Extensions.ARB_shader_bit_encoding = true;
       ctx->Extensions.ARB_shader_texture_lod = true;
-#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;
       ctx->Extensions.EXT_draw_buffers2 = true;
-- 
1.7.11.4



More information about the mesa-dev mailing list