Since the following commit:
Author: Jason Ekstrand <email@example.com>
Date: Fri Oct 19 11:14:47 2018 -0500
nir: Switch to using 1-bit Booleans for almost everything
This is a squash of a few distinct changes:
glsl,spirv: Generate 1-bit Booleans
Revert "Use 32-bit opcodes in the NIR producers and optimizations"
Revert "nir/builder: Generate 32-bit bool opcodes transparently"
nir/builder: Generate 1-bit Booleans in nir_build_imm_bool
Reviewed-by: Eric Anholt <firstname.lastname@example.org>
Reviewed-by: Bas Nieuwenhuizen <email@example.com>
Tested-by: Bas Nieuwenhuizen <firstname.lastname@example.org>"
Using a shared bool on a compute shader raises the following assert:
SPIR-V parsing FAILED:
In file ../src/compiler/spirv/vtn_variables.c:406
base->ptr_type->length > 0 && base->ptr_type->align > 0
1028 bytes into the SPIR-V binary
shader_runner: ../src/mesa/main/glspirv.c:268: _mesa_spirv_to_nir: Assertion `entry_point' failed.
Aborted (core dumped)
Although I initially found this while testing ARB_gl_spirv, I confirmed that it also happens on anv Vulkan. I will submit a vkrunner test soon.
Created attachment 143106 [details]
vkrunner test that reproduces the crash
This is just the compute shader example at vkrunner, but adding a shared bool.
Not sure if it makes sense to add it to piglit. I could do it if anyone thinks that it makes sense.
Created attachment 143123 [details]
Seems in case of piglit-test, it seems better to extend it as 109353_ext - it handles additional sub-case.
(In reply to Sergii Romantsov from comment #3)
> Created attachment 143123 [details]
> Hello, Alejandro
> Seems in case of piglit-test, it seems better to extend it as 109353_ext -
> it handles additional sub-case.
Looks good to me. Although again, not sure if it makes sense to add just one regression test to piglit.
This should be fixed by the following commit in master:
commit cfca5cd9588fb213e6889c85137f3e2fec8c7757 (public/master)
Author: Sergii Romantsov <email@example.com>
Date: Tue Jan 15 13:08:32 2019 +0200
nir: Length of boolean vtn_value now is 1
During conversion type-length was lost due to math.
v2 (Jason Ekstrand):
- Use a size/offset of 4 bytes
Fixes: 44227453ec03 (nir: Switch to using 1-bit Booleans for almost everything)
Signed-off-by: Sergii Romantsov <firstname.lastname@example.org>
Tested-by: Alejandro Piñeiro <email@example.com>
Reviewed-by: Alejandro Piñeiro <firstname.lastname@example.org>
Reviewed-by: Jason Ekstrand <email@example.com>