[Mesa-dev] [PATCH 7/7] st/mesa: enable GL image extensions when backend supports them
Ilia Mirkin
imirkin at alum.mit.edu
Tue Feb 2 19:16:10 UTC 2016
Thanks! From discussion with Dave re r600 needs, it sounds like we
need to throw a "writable" property into pipe_image_view, and I need
to do a proper job of setting the WR flag on the image in patch 6.
I'll do those as add-on patches.
Did you leave patch 6 unreviewed because you had issues with it, or
because it was long and touched glsl_to_tgsi?
On Tue, Feb 2, 2016 at 2:08 PM, Marek Olšák <maraeo at gmail.com> wrote:
> Patches 1-5, 7:
>
> Reviewed-by: Marek Olšák <marek.olsak at amd.com>
>
> Marek
>
> On Sun, Jan 31, 2016 at 2:55 AM, Ilia Mirkin <imirkin at alum.mit.edu> wrote:
>> This enables ARB_shader_image_load_store and ARB_shader_image_size when
>> the backend claims support for these. It will also implicitly enable the
>> image component of ARB_shader_texture_image_samples.
>>
>> Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
>> ---
>> src/mesa/state_tracker/st_extensions.c | 16 ++++++++++++++++
>> 1 file changed, 16 insertions(+)
>>
>> diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
>> index d066784..f0fee88 100644
>> --- a/src/mesa/state_tracker/st_extensions.c
>> +++ b/src/mesa/state_tracker/st_extensions.c
>> @@ -223,6 +223,9 @@ void st_init_limits(struct pipe_screen *screen,
>> screen, sh, PIPE_SHADER_CAP_MAX_SHADER_BUFFERS) / 2;
>> pc->MaxShaderStorageBlocks = pc->MaxAtomicBuffers;
>>
>> + pc->MaxImageUniforms = screen->get_shader_param(
>> + screen, sh, PIPE_SHADER_CAP_MAX_SHADER_IMAGES);
>> +
>> /* Gallium doesn't really care about local vs. env parameters so use the
>> * same limits.
>> */
>> @@ -363,6 +366,19 @@ void st_init_limits(struct pipe_screen *screen,
>> c->MaxShaderStorageBlockSize = 1 << 27;
>> extensions->ARB_shader_storage_buffer_object = GL_TRUE;
>> }
>> +
>> + c->MaxCombinedImageUniforms =
>> + c->Program[MESA_SHADER_VERTEX].MaxImageUniforms +
>> + c->Program[MESA_SHADER_TESS_CTRL].MaxImageUniforms +
>> + c->Program[MESA_SHADER_TESS_EVAL].MaxImageUniforms +
>> + c->Program[MESA_SHADER_GEOMETRY].MaxImageUniforms +
>> + c->Program[MESA_SHADER_FRAGMENT].MaxImageUniforms;
>> + c->MaxImageUnits = MAX_IMAGE_UNITS;
>> + c->MaxImageSamples = 0; /* XXX */
>> + if (c->MaxCombinedImageUniforms) {
>> + extensions->ARB_shader_image_load_store = GL_TRUE;
>> + extensions->ARB_shader_image_size = GL_TRUE;
>> + }
>> }
>>
>>
>> --
>> 2.4.10
>>
>> _______________________________________________
>> mesa-dev mailing list
>> mesa-dev at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list