[Mesa-dev] [PATCH 17/17] st/mesa: expose ARB_compute_shader when compute is supported

Samuel Pitoiset samuel.pitoiset at gmail.com
Tue Jan 26 07:13:44 PST 2016



On 01/26/2016 05:45 AM, Ilia Mirkin wrote:
> On Mon, Jan 25, 2016 at 11:00 PM, Michel Dänzer <michel at daenzer.net> wrote:
>> On 26.01.2016 01:17, Nicolai Hähnle wrote:
>>> On 25.01.2016 10:04, Ilia Mirkin wrote:
>>>> Yeah so this isn't going to fly. r600/radeonsi both expose
>>>> PIPE_CAP_COMPUTE, for clover, but won't support these compute shaders
>>>> quite yet. Not sure what the solution is here... maybe just add
>>>> another cap? PIPE_CAP_GLSL_COMPUTE or something? Or require a backend
>>>> to also set PIPE_CAP_GLSL_VERSION to 430 for ARB_compute_shader to
>>>> become exposed? Don't know.
>>>
>>> GLSL 430 also requires arrays_of_arrays. I don't actually know how much
>>> we need to do to support that, but maybe it'd be better not to depend on
>>> that.
>>>
>>> A new cap is an option. A slightly weird but I think reasonable option
>>> would be to require a PIPE_CAP_GLSL_VERSION of 420, since
>>> ARB_compute_shader officially requires OpenGL 4.2 anyway, and then let
>>> us deal with the fallout when we up that version number.
>>
>> I guess that works, but FWIW, a more general solution might be to split
>> up PIPE_SHADER_CAP_PREFERRED_IR into individual caps for each IR, and
>> enable ARB_compute_shader only if TGSI is supported for PIPE_SHADER_COMPUTE.
>
> How about a PIPE_SHADER_CAP_SUPPORTED_IRS which returns a bitfield of
> all the supported pipe_shader_ir's.

This new PIPE_SHADER_CAP_SUPPORTED_IRS is a solution, yes.
I'll wait for more feedbacks before starting to implement it. :-)

>
>    -ilia
>

-- 
-Samuel


More information about the mesa-dev mailing list