<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Oct 19, 2015 at 3:47 PM, Ilia Mirkin <span dir="ltr"><<a href="mailto:imirkin@alum.mit.edu" target="_blank">imirkin@alum.mit.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class=""><div class="h5">On Mon, Oct 19, 2015 at 6:36 PM, Nanley Chery <<a href="mailto:nanleychery@gmail.com">nanleychery@gmail.com</a>> wrote:<br>
> From: Nanley Chery <<a href="mailto:nanley.g.chery@intel.com">nanley.g.chery@intel.com</a>><br>
><br>
> In agreement with the extension spec and commit<br>
> dd0eb004874645135b9aaac3ebbd0aaf274079ea, filter FXT1 formats to the<br>
> desktop GL profiles. Now we no longer advertise such formats as supported<br>
> in an ES context and then throw an INVALID_ENUM error when the client<br>
> tries to use such formats with CompressedTexImage2D.<br>
><br>
> Fixes the following 26 dEQP tests:<br>
> * dEQP-GLES2.functional.negative_api.texture.compressedteximage2d_invalid_border<br>
> * dEQP-GLES2.functional.negative_api.texture.compressedteximage2d_invalid_border_cube_neg_x<br>
> * dEQP-GLES2.functional.negative_api.texture.compressedteximage2d_invalid_border_cube_neg_y<br>
> * dEQP-GLES2.functional.negative_api.texture.compressedteximage2d_invalid_border_cube_neg_z<br>
> * dEQP-GLES2.functional.negative_api.texture.compressedteximage2d_invalid_border_cube_pos_x<br>
> * dEQP-GLES2.functional.negative_api.texture.compressedteximage2d_invalid_border_cube_pos_y<br>
> * dEQP-GLES2.functional.negative_api.texture.compressedteximage2d_invalid_border_cube_pos_z<br>
> * dEQP-GLES2.functional.negative_api.texture.compressedteximage2d_invalid_size<br>
> * dEQP-GLES2.functional.negative_api.texture.compressedteximage2d_level_max_cube_pos<br>
> * dEQP-GLES2.functional.negative_api.texture.compressedteximage2d_level_max_tex2d<br>
> * dEQP-GLES2.functional.negative_api.texture.compressedteximage2d_neg_level_cube<br>
> * dEQP-GLES2.functional.negative_api.texture.compressedteximage2d_neg_level_tex2d<br>
> * dEQP-GLES2.functional.negative_api.texture.compressedteximage2d_neg_width_height_cube_neg_x<br>
> * dEQP-GLES2.functional.negative_api.texture.compressedteximage2d_neg_width_height_cube_neg_y<br>
> * dEQP-GLES2.functional.negative_api.texture.compressedteximage2d_neg_width_height_cube_neg_z<br>
> * dEQP-GLES2.functional.negative_api.texture.compressedteximage2d_neg_width_height_cube_pos_x<br>
> * dEQP-GLES2.functional.negative_api.texture.compressedteximage2d_neg_width_height_cube_pos_y<br>
> * dEQP-GLES2.functional.negative_api.texture.compressedteximage2d_neg_width_height_cube_pos_z<br>
> * dEQP-GLES2.functional.negative_api.texture.compressedteximage2d_neg_width_height_tex2d<br>
> * dEQP-GLES2.functional.negative_api.texture.compressedteximage2d_width_height_max_cube_neg_x<br>
> * dEQP-GLES2.functional.negative_api.texture.compressedteximage2d_width_height_max_cube_neg_y<br>
> * dEQP-GLES2.functional.negative_api.texture.compressedteximage2d_width_height_max_cube_neg_z<br>
> * dEQP-GLES2.functional.negative_api.texture.compressedteximage2d_width_height_max_cube_pos_x<br>
> * dEQP-GLES2.functional.negative_api.texture.compressedteximage2d_width_height_max_cube_pos_y<br>
> * dEQP-GLES2.functional.negative_api.texture.compressedteximage2d_width_height_max_cube_pos_z<br>
> * dEQP-GLES2.functional.negative_api.texture.compressedteximage2d_width_height_max_tex2d<br>
><br>
> Cc: Ian Romanick <<a href="mailto:ian.d.romanick@intel.com">ian.d.romanick@intel.com</a>><br>
> Cc: Mark Janes <<a href="mailto:mark.a.janes@intel.com">mark.a.janes@intel.com</a>><br>
> Cc: "11.0" <<a href="mailto:mesa-stable@lists.freedesktop.org">mesa-stable@lists.freedesktop.org</a>><br>
> Signed-off-by: Nanley Chery <<a href="mailto:nanley.g.chery@intel.com">nanley.g.chery@intel.com</a>><br>
> ---<br>
> src/mesa/main/texcompress.c | 4 +++-<br>
> 1 file changed, 3 insertions(+), 1 deletion(-)<br>
><br>
> diff --git a/src/mesa/main/texcompress.c b/src/mesa/main/texcompress.c<br>
> index feaf061..1615f4f 100644<br>
> --- a/src/mesa/main/texcompress.c<br>
> +++ b/src/mesa/main/texcompress.c<br>
> @@ -286,7 +286,9 @@ GLuint<br>
> _mesa_get_compressed_formats(struct gl_context *ctx, GLint *formats)<br>
> {<br>
> GLuint n = 0;<br>
> - if (ctx->Extensions.TDFX_texture_compression_FXT1) {<br>
> + if (ctx->Extensions.TDFX_texture_compression_FXT1 &&<br>
> + (ctx->API == API_OPENGL_CORE ||<br>
> + (ctx->API == API_OPENGL_COMPAT && ctx->Version > 10))) {<br>
<br>
</div></div>Not sure if you get rid of such helpers down the line in your series,<br>
but this is the same thing as _mesa_is_desktop_gl(ctx).<br>
<span class=""><br></span></blockquote><div><br></div><div>Later on, I replace these checks with a new helper function. The main difference<br></div><div>between what I've done and _mesa_is_desktop_gl(ctx) is that I'm checking that<br></div><div>the minimum version of the context is 11 (as required by the spec). I suppose I <br></div><div>could've done (_mesa_is_desktop_gl(ctx) && ctx->Version > 10) for simplicity.<br></div><div>The current expression was optimized for me to test how the .text size changes<br>when moving from open-coded checks to helper functions.<br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="">
> if (formats) {<br>
> formats[n++] = GL_COMPRESSED_RGB_FXT1_3DFX;<br>
> formats[n++] = GL_COMPRESSED_RGBA_FXT1_3DFX;<br>
> --<br>
> 2.6.1<br>
><br>
</span>> _______________________________________________<br>
> mesa-dev mailing list<br>
> <a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
> <a href="http://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">http://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</blockquote></div><br></div></div>