-
Notifications
You must be signed in to change notification settings - Fork 193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect translation of spirv with float64 (dvec2) #1272
Labels
area: back-end
Outputs of shader conversion
help wanted
Extra attention is needed
kind: bug
Something isn't working
lang: SPIR-V
Binary SPIR-V input and output
Comments
kvark
added
area: front-end
Input formats for conversion
help wanted
Extra attention is needed
kind: bug
Something isn't working
lang: SPIR-V
Binary SPIR-V input and output
labels
Aug 23, 2021
I think I've run into this. It is not front-end specific; Naga also has trouble with the GLSL frontend and WGSL backend. It always emits This seems to happen with all f64-based data types, including GLSL input: #version 450
struct FourF64 {
double x;
double y;
double z;
double w;
};
layout(std140, set = 0, binding = 0) readonly buffer INPUT {
FourF64 in_data;
};
layout(std140, set = 0, binding = 1) buffer OUTPUT {
FourF64 out_data;
};
void main() {
out_data = in_data;
} WGSL output: struct FourF64_ {
x: f32;
y: f32;
z: f32;
w: f32;
};
[[block]]
struct INPUT {
in_data: FourF64_;
};
[[block]]
struct OUTPUT {
out_data: FourF64_;
};
[[group(0), binding(0)]]
var<storage> global: INPUT;
[[group(0), binding(1)]]
var<storage, read_write> global1: OUTPUT;
fn main1() {
let e4: FourF64_ = global.in_data;
global1.out_data = e4;
return;
}
[[stage(compute), workgroup_size(1, 1, 1)]]
fn main() {
main1();
return;
} |
teoxoy
added
area: back-end
Outputs of shader conversion
and removed
area: front-end
Input formats for conversion
labels
Apr 30, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area: back-end
Outputs of shader conversion
help wanted
Extra attention is needed
kind: bug
Something isn't working
lang: SPIR-V
Binary SPIR-V input and output
KAS's mandlebrot example does not render with 64-bit shaders (
--features shader64
) since upgrading to wgpu v0.10 (leaving a black background, which is not the clear colour). It runs correctly with 32-bit shaders (almost identical code aside from the fragment shader).An API trace is attached: trace.tar.gz
Using
wgpu::Features::SPIRV_SHADER_PASSTHROUGH
the example works correctly, therefore I deduce the error lies with Naga rather than (other parts of) WGPU. The following patch achieves this:Tested on: Fedora 34 x86_64 RX570
The text was updated successfully, but these errors were encountered: