Bug 109265 - [regression, bisected] arb_texture_multisample texelfetch piglit test failing on NIR backend
Summary: [regression, bisected] arb_texture_multisample texelfetch piglit test failing...
Status: NEW
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/radeonsi (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Default DRI bug account
QA Contact: Default DRI bug account
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-10 01:56 UTC by Timothy Arceri
Modified: 2019-01-14 06:19 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Timothy Arceri 2019-01-10 01:56:35 UTC
For example:

R600_DEBUG=nir ./bin/texelFetch fs sampler2DMS 4 1x71-501x71 -auto -fbo

Bisected to (on VEGA 64):

commit f7ffa504a065dc2631fd38cc5fe885b277f4e7e7 (refs/bisect/bad)
Author: Marek Olšák <marek.olsak@amd.com>
Date:   Sat Jul 29 01:40:48 2017 +0200

    ac/surface: compute tile swizzle for GFX9
    
    Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Comment 1 Marek Olšák 2019-01-11 14:18:12 UTC
The commit has no effect on shaders. The bisecting has most likely been unsuccessful. Setting tile_swizzle = 0 in ac_surface.c reverts the commit.
Comment 2 Marek Olšák 2019-01-11 14:19:49 UTC
Note that f7ffa504a065dc2631fd38cc5fe885b277f4e7e7 indeed broke MSAA, but it was fixed by c5c6e0187fd.
Comment 3 Marek Olšák 2019-01-11 14:28:26 UTC
The test passes with MESA_GLSL_CACHE_DISABLE=1.
Comment 4 Timothy Arceri 2019-01-14 06:19:27 UTC
This is odd. As far as I can tell the shader variant produced after loading from the case is the same as the one produced when the cache is disabled.

Its also a fairly simple program. From tests/texturing/shaders/texelFetch.c the offending program is:

    int vs = piglit_compile_shader_text(GL_VERTEX_SHADER,
            "#version 130\n"
            "#extension GL_ARB_explicit_attrib_location: require\n"
            "layout(location=0) in vec4 pos;\n"
            "void main() {\n"
            "   gl_Position = pos;\n"
            "}\n");
    (void)!asprintf(&fs_code,
            "#version 130\n"
            "#extension GL_ARB_explicit_attrib_location: require\n"
            "#extension GL_ARB_fragment_coord_conventions: require\n"
            "uniform int layer;\n"
            "uniform int si;\n"
            "layout(pixel_center_integer) in vec4 gl_FragCoord;\n"
            "layout(location=0) out %s o;\n"
            "void main() {\n"
            "  o = %s(%sgl_FragCoord.x, gl_FragCoord.y, layer, si);\n"
            "}\n",
            sampler.return_type,
            sampler.return_type,
            sampler.data_type == GL_UNSIGNED_INT ? "" : "-");

We must not be setting a flag somewhere, but I've looked over the code that handles the cache multiple  time now and can't spot any real difference between tgsi and nir.


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.