Bug 108936 - [ILK,G45,G965] Regressions from texture-format enums rework
Summary: [ILK,G45,G965] Regressions from texture-format enums rework
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i915 (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Erik Faye-Lund
QA Contact: Default DRI bug account
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-12-04 06:14 UTC by Mark Janes
Modified: 2018-12-05 12:22 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Mark Janes 2018-12-04 06:14:20 UTC
For older platforms, several tests regressed due to the series ending in fcf9fcee3c8a74a68d9bf45186e56102932fbd2a.

dEQP-EGL.functional.image.api.create_image_gles2_tex2d_red
dEQP-EGL.functional.image.api.create_image_gles2_tex2d_rg
gl.texImage2D(GL_TEXTURE_2D, 0, m_internalFormat, IMAGE_WIDTH, IMAGE_HEIGHT, 0, m_format, m_type, DE_NULL): glGetError() returned GL_INVALID_VALUE at teglImageUtil.cpp:285

dEQP-GLES2.functional.fbo.completeness.renderable.texture.color0.red_half_float_oes
dEQP-GLES2.functional.fbo.completeness.renderable.texture.color0.rg_half_float_oes
dEQP-GLES2.functional.fbo.completeness.renderable.texture.depth.red_float
dEQP-GLES2.functional.fbo.completeness.renderable.texture.depth.red_half_float_oes
dEQP-GLES2.functional.fbo.completeness.renderable.texture.depth.red_unsigned_byte
dEQP-GLES2.functional.fbo.completeness.renderable.texture.depth.rg_float
dEQP-GLES2.functional.fbo.completeness.renderable.texture.depth.rg_half_float_oes
dEQP-GLES2.functional.fbo.completeness.renderable.texture.depth.rg_unsigned_byte
dEQP-GLES2.functional.fbo.completeness.renderable.texture.stencil.red_float
dEQP-GLES2.functional.fbo.completeness.renderable.texture.stencil.red_half_float_oes
dEQP-GLES2.functional.fbo.completeness.renderable.texture.stencil.red_unsigned_byte
dEQP-GLES2.functional.fbo.completeness.renderable.texture.stencil.rg_float
dEQP-GLES2.functional.fbo.completeness.renderable.texture.stencil.rg_half_float_oes
dEQP-GLES2.functional.fbo.completeness.renderable.texture.stencil.rg_unsigned_byte
dEQP-GLES2.functional.fbo.completeness.renderable.texture.stencil.sr8_ext
Expected one of GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT, GL_FRAMEBUFFER_UNSUPPORTED or GL_FRAMEBUFFER_COMPLETE.
Received GL_INVALID_OPERATION (during FBO initialization).

piglit.spec.ext_image_dma_buf_import.ext_image_dma_buf_import-sample_nv12
piglit.spec.ext_image_dma_buf_import.ext_image_dma_buf_import-sample_yvu420
ext_image_dma_buf_import-sample_yuv: ../src/mesa/main/teximage.c:856: _mesa_init_teximage_fields_ms: Assertion `base_format != -1' failed.

Because these systems are slow/old, a more precise bisect will take some time.
Comment 1 Erik Faye-Lund 2018-12-04 11:47:24 UTC
Yeah, seems like I at least missed EXT_texture_rg for allowing RG-textures:

Something like this should correct it:
---8<---
Author: Erik Faye-Lund <erik.faye-lund@collabora.com>
Date:   Tue Dec 4 12:34:39 2018 +0100

    mesa/main: fix up _mesa_has_rg_textures for gles2
    
    rg-textures are supported in GLES 2.0 if EXT_texture_rg, so let's make
    sure the enums are accepted.
    
    Fixes: 510b6424607 "mesa/main: do not allow rg-textures enums before gles3"
    Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>

diff --git a/src/mesa/main/context.h b/src/mesa/main/context.h
index cdda8cf2012..7de10e9924b 100644
--- a/src/mesa/main/context.h
+++ b/src/mesa/main/context.h
@@ -378,7 +378,8 @@ _mesa_has_packed_float(const struct gl_context *ctx)
 static inline bool
 _mesa_has_rg_textures(const struct gl_context *ctx)
 {
-   return _mesa_has_ARB_texture_rg(ctx) || _mesa_is_gles3(ctx);
+   return _mesa_has_ARB_texture_rg(ctx) || _mesa_has_EXT_texture_rg(ctx) ||
+          _mesa_is_gles3(ctx);
 }
 
 static inline bool
---8<---


dEQP-GLES2.functional.fbo.completeness.renderable.texture.stencil.sr8_ext seems to be something else, but this is a brand new extension that isn't written against GLES 2 in the first place, so in that case it seems c4136ed5cc07a73c01d24a1c17ebe71e2690aef7 did exactly what it was supposed to, and the test is incorrect... also, I can't find such a test under the gles2 module in dEQP, only under gles3. What's up? :P

I'm also not really sure about those two piglit tests... Perhaps the planar extensions depend on rg-textures somehow? If so, perhaps the patch above fixes it, but we might have similar issues for GLES 1.x...
Comment 2 Mark Janes 2018-12-04 16:15:28 UTC
All test failures bisected to:
510b6424607b1e8af96162f6d571de34beb89e86
Author:     Erik Faye-Lund <erik.faye-lund@collabora.com>

mesa/main: do not allow rg-textures enums before gles3

EXT_packed_float isn't supported on OpenGL ES, we shouldn't allow
these enums there, before OpenGL ES 3.0 which also introduce support
for these enums.

Since this check is repeated a lot, let's make a helper for this.

Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>


I'll test the proposed fix.
Comment 3 Erik Faye-Lund 2018-12-05 12:22:14 UTC
Should be fixed by 91af56e3835bbc17f5b110ac472724cd0986503c


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.