mesa: add INTEL_blackhole_render
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Fri, 2 Mar 2018 14:45:56 +0000 (14:45 +0000)
committerMarge Bot <eric+marge@anholt.net>
Thu, 13 Feb 2020 17:05:05 +0000 (17:05 +0000)
v2: Implement missing Enable/Disable (Emil)

v3: Drop unused NewIntelBlackholeRender (Ken)

v4: Bring back NewIntelBlackholeRender as i965 implementation uses it
    again (Lionel)

v5: Drop atom (Ken)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2964>

src/mesa/main/enable.c
src/mesa/main/extensions_table.h
src/mesa/main/mtypes.h

index e398a67fcb34c12689b8a1831aa4eca6df42f84d..d13a298fb3c97427a7763e1eab4df8ada5184e1f 100644 (file)
@@ -1266,6 +1266,15 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state)
          ctx->Color.BlendCoherent = state;
          break;
 
+      case GL_BLACKHOLE_RENDER_INTEL:
+         if (!_mesa_has_INTEL_blackhole_render(ctx))
+            goto invalid_enum_error;
+         if (ctx->IntelBlackholeRender == state)
+            return;
+         FLUSH_VERTICES(ctx, 0);
+         ctx->IntelBlackholeRender = state;
+         break;
+
       default:
          goto invalid_enum_error;
    }
@@ -1952,6 +1961,10 @@ _mesa_IsEnabled( GLenum cap )
             goto invalid_enum_error;
          return ctx->TileRasterOrderIncreasingY;
 
+      case GL_BLACKHOLE_RENDER_INTEL:
+         CHECK_EXTENSION(INTEL_blackhole_render);
+         return ctx->IntelBlackholeRender;
+
       default:
          goto invalid_enum_error;
    }
index 1831da3f77a74d29509d19227785565493489ebb..1f5d88e412b69bc96e35375db081e73d6662a853 100644 (file)
@@ -343,6 +343,7 @@ EXT(IBM_texture_mirrored_repeat             , dummy_true
 
 EXT(INGR_blend_func_separate                , EXT_blend_func_separate                , GLL,  x ,  x ,  x , 1999)
 
+EXT(INTEL_blackhole_render                  , INTEL_blackhole_render                 ,  30,  30,  x , ES2, 2018)
 EXT(INTEL_conservative_rasterization        , INTEL_conservative_rasterization       ,  x , GLC,  x ,  31, 2013)
 EXT(INTEL_performance_query                 , INTEL_performance_query                , GLL, GLC,  x , ES2, 2013)
 EXT(INTEL_shader_atomic_float_minmax        , INTEL_shader_atomic_float_minmax       , GLL, GLC,  x ,  x , 2018)
index 41276dbac89ba0fd7dd9df606403afa0c075ee60..bcca2b8c3b5a7024ca04fbc33e51792d5d9b132e 100644 (file)
@@ -4367,6 +4367,7 @@ struct gl_extensions
    GLboolean ATI_texture_env_combine3;
    GLboolean ATI_fragment_shader;
    GLboolean GREMEDY_string_marker;
+   GLboolean INTEL_blackhole_render;
    GLboolean INTEL_conservative_rasterization;
    GLboolean INTEL_performance_query;
    GLboolean INTEL_shader_atomic_float_minmax;
@@ -5143,6 +5144,8 @@ struct gl_context
    GLfloat ConservativeRasterDilate;
    GLenum16 ConservativeRasterMode;
 
+   GLboolean IntelBlackholeRender; /**< GL_INTEL_blackhole_render */
+
    /** Does glVertexAttrib(0) alias glVertex()? */
    bool _AttribZeroAliasesVertex;