STATIC_ASSERT(MAX_SHADER_STORAGE_BUFFERS <= 32);
+ /* Buffers from each stage are pointers to the one stored in the program. We need
+ * to account for this before computing the mask below otherwise the mask will be
+ * incorrect.
+ * sh->Program->sh.SSBlocks: [a][b][c][d][e][f]
+ * VS prog->data->SSBlocks : [a][b][c]
+ * FS prog->data->SSBlocks : [d][e][f]
+ * eg for FS buffer 1, buffer_block_index will be 4 but sh_block_index will be 1.
+ */
+ int base = 0;
+ base = sh->Program->sh.ShaderStorageBlocks[0] - prog->data->ShaderStorageBlocks;
+
+ assert(base >= 0);
+
+ int sh_block_index = buffer_block_index - base;
/* Shaders that use too many SSBOs will fail to compile, which
* we don't care about.
*
* This is true for shaders that do not use too many SSBOs:
*/
- if (buffer_block_index + array_size <= 32) {
+ if (sh_block_index + array_size <= 32) {
state.shader_storage_blocks_write_access |=
- u_bit_consecutive(buffer_block_index, array_size);
+ u_bit_consecutive(sh_block_index, array_size);
}
}
- path: supertuxkart/supertuxkart-mansion-egl-gles.trace
expectations:
- device: gl-virgl
- checksum: c8e5d7c4377b8e484ae41270692914f3
+ checksum: 5e4e0cedd57bedf3eb7f127489a46b12
- path: xonotic/xonotic-keybench-high.trace
expectations:
- device: gl-virgl
- path: valve/portal-2.trace
expectations:
- device: gl-virgl
- checksum: 9f7fecf8df89e105a4d2b4a61468b427
+ checksum: 7489a8412ee2bca45431d208e0006a3e
# Piglit crashes when trying to run this one
# - path: supertuxkart/supertuxkart-antediluvian-abyss.rdc
# expectations: