On Fri, Aug 21, 2015 at 3:22 AM, Tapani Pälli <tapani.pa...@intel.com> wrote: > Signed-off-by: Tapani Pälli <tapani.pa...@intel.com> > --- > src/mesa/main/get_hash_params.py | 6 +++--- > src/mesa/main/texobj.c | 6 ++++-- > src/mesa/main/texparam.c | 2 +- > 3 files changed, 8 insertions(+), 6 deletions(-) > > diff --git a/src/mesa/main/get_hash_params.py > b/src/mesa/main/get_hash_params.py > index 517c391..c06e9b1 100644 > --- a/src/mesa/main/get_hash_params.py > +++ b/src/mesa/main/get_hash_params.py > @@ -434,6 +434,9 @@ descriptor=[ > [ "SAMPLE_MASK", "CONTEXT_BOOL(Multisample.SampleMask), > extra_ARB_texture_multisample_es31" ], > [ "MAX_SAMPLE_MASK_WORDS", "CONST(1), extra_ARB_texture_multisample_es31" > ], > > +# GL_ARB_texture_multisample / ES 3.1 with > GL_OES_texture_storage_multisample_2d_array > + [ "TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY", "LOC_CUSTOM, TYPE_INT, > TEXTURE_2D_MULTISAMPLE_ARRAY_INDEX, extra_ARB_texture_multisample_es31" ],
What does the _es31 add? Should be removed, I think. Should be done in a cleanup patch later though. Looks like I wasn't looking carefully enough at what was going on the list and this managed to sneak through... same goes for most (but probably not all) of the _es31 things. > + > # GL_ARB_texture_gather / GLES 3.1 > [ "MIN_PROGRAM_TEXTURE_GATHER_OFFSET", > "CONTEXT_INT(Const.MinProgramTextureGatherOffset), > extra_ARB_texture_gather_es31"], > [ "MAX_PROGRAM_TEXTURE_GATHER_OFFSET", > "CONTEXT_INT(Const.MaxProgramTextureGatherOffset), > extra_ARB_texture_gather_es31"], > @@ -740,9 +743,6 @@ descriptor=[ > [ "TEXTURE_BUFFER_FORMAT_ARB", "LOC_CUSTOM, TYPE_INT, 0, > extra_texture_buffer_object" ], > [ "TEXTURE_BUFFER_ARB", "LOC_CUSTOM, TYPE_INT, 0, > extra_texture_buffer_object" ], > > -# GL_ARB_texture_multisample / GL 3.2 > - [ "TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY", "LOC_CUSTOM, TYPE_INT, > TEXTURE_2D_MULTISAMPLE_ARRAY_INDEX, extra_ARB_texture_multisample" ], > - > # GL 3.0 > [ "CONTEXT_FLAGS", "CONTEXT_INT(Const.ContextFlags), extra_version_30" ], > > diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c > index 395e4d3..a3f44c9 100644 > --- a/src/mesa/main/texobj.c > +++ b/src/mesa/main/texobj.c > @@ -217,7 +217,8 @@ _mesa_get_current_tex_object(struct gl_context *ctx, > GLenum target) > return ctx->Extensions.ARB_texture_multisample > ? ctx->Texture.ProxyTex[TEXTURE_2D_MULTISAMPLE_INDEX] : NULL; > case GL_TEXTURE_2D_MULTISAMPLE_ARRAY: > - return ctx->Extensions.ARB_texture_multisample > + return (ctx->Extensions.ARB_texture_multisample || > + ctx->Extensions.OES_texture_storage_multisample_2d_array) And then you don't have to touch this (if you don't add the extra enable) > ? texUnit->CurrentTex[TEXTURE_2D_MULTISAMPLE_ARRAY_INDEX] : NULL; > case GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY: > return ctx->Extensions.ARB_texture_multisample > @@ -1612,7 +1613,8 @@ _mesa_tex_target_to_index(const struct gl_context *ctx, > GLenum target) > return ((_mesa_is_desktop_gl(ctx) && > ctx->Extensions.ARB_texture_multisample) || > _mesa_is_gles31(ctx)) ? TEXTURE_2D_MULTISAMPLE_INDEX: -1; > case GL_TEXTURE_2D_MULTISAMPLE_ARRAY: > - return _mesa_is_desktop_gl(ctx) && > ctx->Extensions.ARB_texture_multisample > + return ((_mesa_is_desktop_gl(ctx) && > ctx->Extensions.ARB_texture_multisample) || > + ctx->Extensions.OES_texture_storage_multisample_2d_array) or this > ? TEXTURE_2D_MULTISAMPLE_ARRAY_INDEX: -1; > default: > return -1; > diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c > index 947a2a1..3b72417 100644 > --- a/src/mesa/main/texparam.c > +++ b/src/mesa/main/texparam.c > @@ -1223,6 +1223,7 @@ legal_get_tex_level_parameter_target(struct gl_context > *ctx, GLenum target, > case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB: > return (_mesa_is_gles31(ctx) || ctx->Extensions.ARB_texture_cube_map); > case GL_TEXTURE_2D_MULTISAMPLE: > + case GL_TEXTURE_2D_MULTISAMPLE_ARRAY: > return (_mesa_is_gles31(ctx) || > ctx->Extensions.ARB_texture_multisample); And note another case of the same issue I was mentioning earlier, with needless gles31 checks being placed all over. [But it was like that before you got there... your change is fine.] > } > > @@ -1267,7 +1268,6 @@ legal_get_tex_level_parameter_target(struct gl_context > *ctx, GLenum target, > * "target may also be TEXTURE_BUFFER, indicating the texture buffer." > */ > return ctx->API == API_OPENGL_CORE && ctx->Version >= 31; > - case GL_TEXTURE_2D_MULTISAMPLE_ARRAY: > case GL_PROXY_TEXTURE_2D_MULTISAMPLE: > case GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY: > return ctx->Extensions.ARB_texture_multisample; > -- > 2.4.3 > > _______________________________________________ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/mesa-dev _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev