<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 20, 2015 at 6:26 AM, Ian Romanick <span dir="ltr"><<a href="mailto:idr@freedesktop.org" target="_blank">idr@freedesktop.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 10/19/2015 05:58 PM, Nanley Chery wrote:<br>
><br>
><br>
> On Mon, Oct 19, 2015 at 3:47 PM, Ilia Mirkin <<a href="mailto:imirkin@alum.mit.edu">imirkin@alum.mit.edu</a><br>
</span><span class="">> <mailto:<a href="mailto:imirkin@alum.mit.edu">imirkin@alum.mit.edu</a>>> wrote:<br>
><br>
> On Mon, Oct 19, 2015 at 6:36 PM, Nanley Chery <<a href="mailto:nanleychery@gmail.com">nanleychery@gmail.com</a><br>
</span><span class="">> <mailto:<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>
</span>> <mailto:<a href="mailto:nanley.g.chery@intel.com">nanley.g.chery@intel.com</a>>><br>
<div><div class="h5">> ><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<br>
> 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>
> > *<br>
> dEQP-GLES2.functional.negative_api.texture.compressedteximage2d_invalid_border<br>
> > *<br>
> dEQP-GLES2.functional.negative_api.texture.compressedteximage2d_invalid_border_cube_neg_x<br>
> > *<br>
> dEQP-GLES2.functional.negative_api.texture.compressedteximage2d_invalid_border_cube_neg_y<br>
> > *<br>
> dEQP-GLES2.functional.negative_api.texture.compressedteximage2d_invalid_border_cube_neg_z<br>
> > *<br>
> dEQP-GLES2.functional.negative_api.texture.compressedteximage2d_invalid_border_cube_pos_x<br>
> > *<br>
> dEQP-GLES2.functional.negative_api.texture.compressedteximage2d_invalid_border_cube_pos_y<br>
> > *<br>
> dEQP-GLES2.functional.negative_api.texture.compressedteximage2d_invalid_border_cube_pos_z<br>
> > *<br>
> dEQP-GLES2.functional.negative_api.texture.compressedteximage2d_invalid_size<br>
> > *<br>
> dEQP-GLES2.functional.negative_api.texture.compressedteximage2d_level_max_cube_pos<br>
> > *<br>
> dEQP-GLES2.functional.negative_api.texture.compressedteximage2d_level_max_tex2d<br>
> > *<br>
> dEQP-GLES2.functional.negative_api.texture.compressedteximage2d_neg_level_cube<br>
> > *<br>
> dEQP-GLES2.functional.negative_api.texture.compressedteximage2d_neg_level_tex2d<br>
> > *<br>
> dEQP-GLES2.functional.negative_api.texture.compressedteximage2d_neg_width_height_cube_neg_x<br>
> > *<br>
> dEQP-GLES2.functional.negative_api.texture.compressedteximage2d_neg_width_height_cube_neg_y<br>
> > *<br>
> dEQP-GLES2.functional.negative_api.texture.compressedteximage2d_neg_width_height_cube_neg_z<br>
> > *<br>
> dEQP-GLES2.functional.negative_api.texture.compressedteximage2d_neg_width_height_cube_pos_x<br>
> > *<br>
> dEQP-GLES2.functional.negative_api.texture.compressedteximage2d_neg_width_height_cube_pos_y<br>
> > *<br>
> dEQP-GLES2.functional.negative_api.texture.compressedteximage2d_neg_width_height_cube_pos_z<br>
> > *<br>
> dEQP-GLES2.functional.negative_api.texture.compressedteximage2d_neg_width_height_tex2d<br>
> > *<br>
> dEQP-GLES2.functional.negative_api.texture.compressedteximage2d_width_height_max_cube_neg_x<br>
> > *<br>
> dEQP-GLES2.functional.negative_api.texture.compressedteximage2d_width_height_max_cube_neg_y<br>
> > *<br>
> dEQP-GLES2.functional.negative_api.texture.compressedteximage2d_width_height_max_cube_neg_z<br>
> > *<br>
> dEQP-GLES2.functional.negative_api.texture.compressedteximage2d_width_height_max_cube_pos_x<br>
> > *<br>
> dEQP-GLES2.functional.negative_api.texture.compressedteximage2d_width_height_max_cube_pos_y<br>
> > *<br>
> dEQP-GLES2.functional.negative_api.texture.compressedteximage2d_width_height_max_cube_pos_z<br>
> > *<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>
</div></div>> <mailto:<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>
> <mailto:<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>
> <mailto:<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>
> <mailto:<a href="mailto:nanley.g.chery@intel.com">nanley.g.chery@intel.com</a>>><br>
<div><div class="h5">> > ---<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>
> 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>
><br>
><br>
> Later on, I replace these checks with a new helper function. The main<br>
> difference<br>
> between what I've done and _mesa_is_desktop_gl(ctx) is that I'm checking<br>
> that<br>
> the minimum version of the context is 11 (as required by the spec). I<br>
> suppose I<br>
> could've done (_mesa_is_desktop_gl(ctx) && ctx->Version > 10) for<br>
> simplicity.<br>
> The current expression was optimized for me to test how the .text size<br>
> changes<br>
> when moving from open-coded checks to helper functions.<br>
<br>
</div></div>The rest of the series isn't marked for stable, so it doesn't matter.<br>
Also, as I mentioned in my review, it is impossible to have a desktop<br>
OpenGL version less than 1.2.<br>
<span class=""><br></span></blockquote><div><br></div><div>That's a great point. Since the rest isn't marked for stable, it's important <br>that the intermediate code be more maintainable. I'll send out a v2<br></div><div>soon.<br><br>Reflecting on this a bit, I'll probably have to update my comments in later<br>patches which mention pre-1.2 GL contexts.<br><br></div><div>Thanks,<br></div><div>Nanley<br></div><div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;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>
> > _______________________________________________<br>
> > mesa-dev mailing list<br>
</span>> > <a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a> <mailto:<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>
<div class="HOEnZb"><div class="h5">> _______________________________________________<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>
<br>
</div></div></blockquote></div><br></div></div>