<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - GL 3.0 compatibility context exposes GL_ARB_compute_shader"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=97447#c9">Comment # 9</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - GL 3.0 compatibility context exposes GL_ARB_compute_shader"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=97447">bug 97447</a>
              from <span class="vcard"><a class="email" href="mailto:evan@techsoft3d.com" title="Evan Odabashian <evan@techsoft3d.com>"> <span class="fn">Evan Odabashian</span></a>
</span></b>
        <pre>(In reply to Jordan Justen from <a href="show_bug.cgi?id=97447#c8">comment #8</a>)
<span class="quote">> (In reply to Ilia Mirkin from <a href="show_bug.cgi?id=97447#c7">comment #7</a>)
> > (In reply to Evan Odabashian from <a href="show_bug.cgi?id=97447#c6">comment #6</a>)
> > > error: Too many compute shader texture samplers
> > > error: Too many compute shader image uniforms (1 > 0)
> > > 
> > > (this shader has one image and one sampler)
> > > 
> > > Querying MAX_COMPUTE_TEXTURE_IMAGE_UNITS and MAX_COMPUTE_IMAGE_UNIFORMS both
> > > return 0 on this context, while the ARB_compute_shader spec says the minimum
> > > values for these should be 16 and 8 respectively.
> > 
> > That sounds like a bug specific to i965 initialization, trivially fixable.

> I think updating the stage_exists init in
> brw_initialize_context_constants might help this.

> Right now it will always set stage_exits[MESA_SHADER_COMPUTE]
> to false when ctx->API == API_OPENGL_COMPAT.</span >

I tried hacking the brw_initialize_context_constants code to set
stage_exists[MESA_SHADER_COMPUTE] to true for the compatibility context and
tested my application again. I have non-zero MAX_COMPUTE_TEXTURE_IMAGE_UNITS
and MAX_COMPUTE_IMAGE_UNIFORMS now, but my shader fails to compile with:

error: extension `GL_ARB_image_load_store' unsupported in compute shader

And of course if I disable that extension I'm back to the error I had
originally:

error: unrecognized layout identifier `r32f'

caused by this line in the shader:

layout(r32f, binding = 1) uniform writeonly image2D outTexture;

Re: the proposal to remove 'GLL' for ARB_compute_shader in the extension table,
this would remove it from compatibility contexts in all drivers (not just
i965)? I'm not very familiar with mesa (as is probably evident) but if there
are other drivers with compat. profiles that can support compute shaders then I
would agree it seems heavy handed to take it away from them. On Windows for
instance all compatibility profiles on Intel, Nvidia, AMD can do compute
shaders and everything else their core profiles can generally. Is there a way
to just not advertise ARB_compute_shader specifically for the i965 compat.
profile?</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the QA Contact for the bug.</li>
      </ul>
    </body>
</html>