| WebGPU tests for Canvas.requestShaderSource command. |
| |
| |
| == Running test suite: Canvas.requestShaderSource.WebGPU |
| -- Running test case: Canvas.requestShaderSource.WebGPU.Program.compute.Shader.compute |
| |
| [numthreads(2, 1, 1)] |
| compute void computeShader(device float[] buffer : register(u0), float3 threadID : SV_DispatchThreadID) { |
| buffer[uint(threadID.x)] = buffer[uint(threadID.x)] * 2.0; |
| } |
| |
| |
| -- Running test case: Canvas.requestShaderSource.WebGPU.Program.compute.Shader.fragment |
| PASS: Should produce an exception. |
| Error: Missing shader of given shaderType for given programId |
| |
| -- Running test case: Canvas.requestShaderSource.WebGPU.Program.compute.Shader.vertex |
| PASS: Should produce an exception. |
| Error: Missing shader of given shaderType for given programId |
| |
| -- Running test case: Canvas.requestShaderSource.WebGPU.Program.render.Shader.compute |
| PASS: Should produce an exception. |
| Error: Missing shader of given shaderType for given programId |
| |
| -- Running test case: Canvas.requestShaderSource.WebGPU.Program.render.Shader.fragment |
| |
| vertex float4 vertexShader(float4 position : attribute(0), float i : attribute(1)) : SV_Position { |
| return position; |
| } |
| |
| fragment float4 fragmentShader(float4 position : SV_Position) : SV_Target 0 { |
| return position; |
| } |
| |
| |
| -- Running test case: Canvas.requestShaderSource.WebGPU.Program.render.Shader.vertex |
| |
| vertex float4 vertexShader(float4 position : attribute(0), float i : attribute(1)) : SV_Position { |
| return position; |
| } |
| |
| fragment float4 fragmentShader(float4 position : SV_Position) : SV_Target 0 { |
| return position; |
| } |
| |
| |