[Mesa-dev] [PATCH v4 (part2) 04/56] i965: set ARB_shader_storage_buffer_object related constant values
Samuel Iglesias Gonsálvez
siglesias at igalia.com
Thu Sep 3 03:40:39 PDT 2015
On 03/09/15 12:30, Tapani Pälli wrote:
> Hi;
>
> On 07/23/2015 09:42 AM, Samuel Iglesias Gonsalvez wrote:
>> v2:
>> - Add tessellation shader constants assignment
>>
>> Signed-off-by: Samuel Iglesias Gonsalvez <siglesias at igalia.com>
>> ---
>> src/mesa/drivers/dri/i965/brw_context.c | 12 ++++++++++++
>> 1 file changed, 12 insertions(+)
>>
>> diff --git a/src/mesa/drivers/dri/i965/brw_context.c
>> b/src/mesa/drivers/dri/i965/brw_context.c
>> index b08a53b..a5c7b91 100644
>> --- a/src/mesa/drivers/dri/i965/brw_context.c
>> +++ b/src/mesa/drivers/dri/i965/brw_context.c
>> @@ -551,6 +551,18 @@ brw_initialize_context_constants(struct
>> brw_context *brw)
>> ctx->Const.TextureBufferOffsetAlignment = 16;
>> ctx->Const.MaxTextureBufferSize = 128 * 1024 * 1024;
>>
>> + /* FIXME: Tessellation stages are not yet supported in i965, so
>> + * MaxCombinedShaderStorageBlocks doesn't take them into account.
>> + */
>> + ctx->Const.Program[MESA_SHADER_VERTEX].MaxShaderStorageBlocks = 12;
>> + ctx->Const.Program[MESA_SHADER_GEOMETRY].MaxShaderStorageBlocks = 12;
>> + ctx->Const.Program[MESA_SHADER_TESS_EVAL].MaxShaderStorageBlocks = 0;
>> + ctx->Const.Program[MESA_SHADER_TESS_CTRL].MaxShaderStorageBlocks = 0;
>> + ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxShaderStorageBlocks = 12;
>> + ctx->Const.Program[MESA_SHADER_COMPUTE].MaxShaderStorageBlocks = 12;
>> + ctx->Const.MaxCombinedShaderStorageBlocks = 12 * 3;
>> + ctx->Const.MaxShaderStorageBufferBindings = 48;
>
> I think there is something funny with MaxShaderStorageBufferBindings
> value calculation. Commit 28ef0f83 adds 12 to it and then this commit
> overwrites it as 48. Without compute shaders I guess this value should
> be 48 - 12?
>
> I guess earlier '+12' should be removed and this part should be modified
> to calculate based on what is supported. For me '48 -12' fixes a few
> crashes I'm getting with
> "igalia/wip/siglesias/ARB_shader_storage_buffer_object-v4.3" branch I've
> used for some testing.
>
I see. We are going to review the MaxShaderStorageBufferBindings
calculation, thanks for the report and the ideas.
Can you share with us the tests that crashed because of this? You can
send them privately to me, if needed.
Sam
>
>> +
>> if (brw->gen >= 6) {
>> ctx->Const.MaxVarying = 32;
>> ctx->Const.Program[MESA_SHADER_VERTEX].MaxOutputComponents = 128;
>>
>
> // Tapani
>
More information about the mesa-dev
mailing list