WebGPU demo (https://gs-max.vercel.app/ ) doesnt draw anything on the screen
Categories
(Core :: Graphics: WebGPU, defect, P3)
Tracking
()
People
(Reporter: mayankleoboy1, Unassigned)
References
(Depends on 1 open bug, Blocks 1 open bug, )
Details
Attachments
(1 file)
43.24 KB,
text/plain
|
Details |
20:24:53.063 New shader set! page-51d11a44ad5f3ae1.js:1:651
20:24:53.063 Canvas resized to 450, 450 page-51d11a44ad5f3ae1.js:1:2906
20:24:53.064
Encountered one or more errors while creating shader module
20:24:53.064
WebGPU compilation info for shader module (1 error(s), 0 warning(s), 0 info)
20:24:53.064
Shader validation error:
┌─ :30:21
│
30 │ output.pos = vec4(pos[VertexIndex], 0.0, 1.0);
│ ^^^^^^^^^^^^^^^^ naga::Expression [5]
20:24:53.064 Error matching ShaderStages(VERTEX) shader requirements against the pipeline, caused by: Shader module is invalid
20:24:53.085 In a set_pipeline command, caused by: Render pipeline Id(0,1,d3d12) is invalid
20:24:53.085 Command encoder is invalid
20:24:57.178 New shader set! 2 page-51d11a44ad5f3ae1.js:1:651
Reporter | ||
Comment 1•7 months ago
|
||
Updated•7 months ago
|
Comment 2•7 months ago
|
||
WebGPU is unreleased tech. Dropping Severity to S3 to remove from org tracking.
Comment 3•7 months ago
|
||
NI'ing for root cause investigation, no promises on ETA.
Updated•6 months ago
|
Comment 4•3 months ago
|
||
The first shader this page loads:
@group(0) @binding(0) var mySampler: sampler;
@group(0) @binding(1) var myTexture : texture_2d<f32>;
struct VertexOutput {
@builtin(position) pos: vec4f,
@location(0) fragUV: vec2f,
}
const pos = array(
vec2( 1.0, 1.0),
vec2( 1.0, -1.0),
vec2(-1.0, -1.0),
vec2( 1.0, 1.0),
vec2(-1.0, -1.0),
vec2(-1.0, 1.0),
);
const uv = array(
vec2(1.0, 0.0),
vec2(1.0, 1.0),
vec2(0.0, 1.0),
vec2(1.0, 0.0),
vec2(0.0, 1.0),
vec2(0.0, 0.0),
);
@vertex
fn vert_main(@builtin(vertex_index) VertexIndex : u32) -> VertexOutput {
var output: VertexOutput;
output.pos = vec4(pos[VertexIndex], 0.0, 1.0);
output.fragUV = uv[VertexIndex];
return output;
}
@fragment
fn frag_main(@location(0) fragUV : vec2f) -> @location(0) vec4f {
return textureSample(myTexture, mySampler, fragUV);
}
…appear to be blocked on Naga disallowing dynamic index accesses into const
arrays:
cargo run -p naga-cli -- in.wgsl
Finished dev [unoptimized + debuginfo] target(s) in 0.21s
Running `target\debug\naga.exe in.wgsl`
error:
┌─ in.wgsl:30:21
│
30 │ output.pos = vec4(pos[VertexIndex], 0.0, 1.0);
│ ^^^^^^^^^^^^^^^^ naga::Expression [5]
Entry point vert_main at Vertex is invalid:
Expression [5] is invalid
The expression [4] may only be indexed by a constant
error: process didn't exit successfully: `target\debug\naga.exe in.wgsl` (exit code: 0xffffffff)
Upstream issue: wgpu
#4337
Updated•17 days ago
|
Updated•17 days ago
|
Description
•