On Friday, April 6, 2018 7:31:40 AM PDT Lionel Landwerlin wrote: > v2: Implement missing Enable/Disable (Emil) > > Signed-off-by: Lionel Landwerlin <lionel.g.landwer...@intel.com> > --- > src/mesa/main/clear.c | 2 +- > src/mesa/main/enable.c | 14 ++++++++++++++ > src/mesa/main/extensions_table.h | 1 + > src/mesa/main/mtypes.h | 7 +++++++ > 4 files changed, 23 insertions(+), 1 deletion(-) > > diff --git a/src/mesa/main/clear.c b/src/mesa/main/clear.c > index 6beff9ed842..e9ab59b7116 100644 > --- a/src/mesa/main/clear.c > +++ b/src/mesa/main/clear.c > @@ -175,7 +175,7 @@ clear(struct gl_context *ctx, GLbitfield mask, bool > no_error) > return; > } > > - if (ctx->RasterDiscard) > + if (ctx->RasterDiscard || ctx->IntelBlackholeRender) > return; > > if (ctx->RenderMode == GL_RENDER) { > diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c > index 7625a4c9577..978258390c1 100644 > --- a/src/mesa/main/enable.c > +++ b/src/mesa/main/enable.c > @@ -1127,6 +1127,16 @@ _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->NewDriverState |= ctx->DriverFlags.NewIntelBlackholeRender; > + ctx->IntelBlackholeRender = state; > + break; > + > default: > goto invalid_enum_error; > } > @@ -1762,6 +1772,10 @@ _mesa_IsEnabled( GLenum cap ) > CHECK_EXTENSION(MESA_tile_raster_order); > return ctx->TileRasterOrderIncreasingY; > > + case GL_BLACKHOLE_RENDER_INTEL: > + CHECK_EXTENSION(INTEL_blackhole_render); > + return ctx->IntelBlackholeRender; > + > default: > goto invalid_enum_error; > } > diff --git a/src/mesa/main/extensions_table.h > b/src/mesa/main/extensions_table.h > index 492f7c3d20a..f2df7cead60 100644 > --- a/src/mesa/main/extensions_table.h > +++ b/src/mesa/main/extensions_table.h > @@ -307,6 +307,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) > > diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h > index b7a7b34a090..efae386aa78 100644 > --- a/src/mesa/main/mtypes.h > +++ b/src/mesa/main/mtypes.h > @@ -4335,6 +4335,7 @@ struct gl_extensions > GLboolean ATI_fragment_shader; > GLboolean ATI_separate_stencil; > GLboolean GREMEDY_string_marker; > + GLboolean INTEL_blackhole_render; > GLboolean INTEL_conservative_rasterization; > GLboolean INTEL_performance_query; > GLboolean KHR_blend_equation_advanced; > @@ -4704,6 +4705,11 @@ struct gl_driver_flags > > /** Shader constants (uniforms, program parameters, state constants) */ > uint64_t NewShaderConstants[MESA_SHADER_STAGES]; > + > + /** > + * gl_context::IntelBlackholeRender > + */ > + uint64_t NewIntelBlackholeRender;
I'd be tempted not to bother for now, as the only implementation checks this on every draw, so we don't actually use the dirty flag. I also don't know that it's worth bothering with the Clear handling here, but it's not hurting much either. Either way, this one is: Reviewed-by: Kenneth Graunke <kenn...@whitecape.org> > }; > > struct gl_buffer_binding > @@ -5120,6 +5126,7 @@ struct gl_context > > GLboolean RasterDiscard; /**< GL_RASTERIZER_DISCARD */ > GLboolean IntelConservativeRasterization; /**< > GL_INTEL_CONSERVATIVE_RASTERIZATION */ > + GLboolean IntelBlackholeRender; /**< GL_INTEL_blackhole_render */ > > /** Does glVertexAttrib(0) alias glVertex()? */ > bool _AttribZeroAliasesVertex; >
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev