You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just understand this is actually a glslang bug, so I raise the issue here.
For the compute shader, glslang generates ill-formed spirv binary, demonstrated by the following commands
$ glslang --target-env vulkan1.3 issue.comp
$ spirv-val comp.spv
error: line 65: Expected input to have different bit width from Result Type: FConvert
%33 = OpFConvert %half %31
#version450#extension GL_EXT_shader_16bit_storage : require
layout(local_size_x =1, local_size_y =1, local_size_z =1) in;
#define TYPE float16_t // or 'int64_t', 'uint16_t', also generated ill-formed spirv// #define TYPE float, int, uint, these are finelayout(binding =0) readonlybuffer A { TYPE data_a[]; };
layout(binding =1) writeonlybuffer D { TYPE data_d[]; };
void main() {
constuint i = gl_GlobalInvocationID.x;
data_d[i] = TYPE(data_a[i]);
}
I take a look at the disassembly, it is indeed incorrect. The spec on OPFConvert says that "The component width must not equal the component width in Result Type.", so the op actually should be eliminated.
For background, you may see google/shaderc#1418
I just understand this is actually a glslang bug, so I raise the issue here.
For the compute shader,
glslang
generates ill-formed spirv binary, demonstrated by the following commandsI take a look at the disassembly, it is indeed incorrect. The spec on
OPFConvert
says that "The component width must not equal the component width in Result Type.", so the op actually should be eliminated.Version
I also test the bug also exists on current master.
OS: ArchLinux
The text was updated successfully, but these errors were encountered: