[Mesa-dev] [PATCH 10/11] st/mesa: expose ARB_compute_variable_group_size
Samuel Pitoiset
samuel.pitoiset at gmail.com
Fri Sep 9 16:01:46 UTC 2016
On 09/09/2016 04:02 PM, Marek Olšák wrote:
> For patches 8, 9:
>
> Reviewed-by: Marek Olšák <marek.olsak at amd.com>
>
> Patch 10 won't work for us, because radeonsi (and presumably softpipe
> as well) don't support this feature at the moment. Also, I would
> prefer a PIPE_CAP for MaxComputeVariableGroupInvocations and the
> extension can be exposed based on that CAP.
Fine by me, I will add this new cap.
Thanks for reviewing.
>
> Marek
>
>
> On Thu, Sep 8, 2016 at 10:31 PM, Samuel Pitoiset
> <samuel.pitoiset at gmail.com> wrote:
>> This extension is only exposed if the underlying driver supports
>> ARB_compute_shader.
>>
>> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
>> ---
>> src/mesa/state_tracker/st_extensions.c | 13 +++++++++++++
>> 1 file changed, 13 insertions(+)
>>
>> diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
>> index 807fbfb..dc2e60a 100644
>> --- a/src/mesa/state_tracker/st_extensions.c
>> +++ b/src/mesa/state_tracker/st_extensions.c
>> @@ -1196,6 +1196,19 @@ void st_init_extensions(struct pipe_screen *screen,
>> extensions->ARB_compute_shader =
>> extensions->ARB_shader_image_load_store &&
>> extensions->ARB_shader_atomic_counters;
>> +
>> + if (extensions->ARB_compute_shader) {
>> + /* Because the minimum values required by
>> + * ARB_compute_variable_group_size are less (or equal) than the
>> + * ones defined by ARB_compute_shader we can re-use them. */
>> + for (i = 0; i < 3; i++) {
>> + consts->MaxComputeVariableGroupSize[i] =
>> + consts->MaxComputeWorkGroupSize[i];
>> + }
>> + consts->MaxComputeVariableGroupInvocations =
>> + consts->MaxComputeWorkGroupInvocations;
>> + extensions->ARB_compute_variable_group_size = true;
>> + }
>> }
>> }
>>
>> --
>> 2.9.3
>>
>> _______________________________________________
>> mesa-dev mailing list
>> mesa-dev at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list