Fix CopyTextureForBrowserTests

BUG=dawn:712

Change-Id: Ie8b504a3566fae18a35029b63cf74f55dbe93b0d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/44922
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
This commit is contained in:
Ryan Harrison 2021-03-16 20:23:00 +00:00 committed by Commit Bot service account
parent ddc4712609
commit 322e451a62
1 changed files with 4 additions and 4 deletions

View File

@ -91,7 +91,7 @@ class CopyTextureForBrowserTests : public DawnTest {
var size : vec2<i32> = textureDimensions(src); var size : vec2<i32> = textureDimensions(src);
var dstTexCoord : vec2<i32> = vec2<i32>(GlobalInvocationID.xy); var dstTexCoord : vec2<i32> = vec2<i32>(GlobalInvocationID.xy);
var srcTexCoord : vec2<i32> = dstTexCoord; var srcTexCoord : vec2<i32> = dstTexCoord;
if (uniforms.dstTextureFlipY == 1) { if (uniforms.dstTextureFlipY == 1u) {
srcTexCoord.y = size.y - dstTexCoord.y - 1; srcTexCoord.y = size.y - dstTexCoord.y - 1;
} }
@ -99,11 +99,11 @@ class CopyTextureForBrowserTests : public DawnTest {
var dstColor : vec4<f32> = textureLoad(dst, dstTexCoord, 0); var dstColor : vec4<f32> = textureLoad(dst, dstTexCoord, 0);
var success : bool = all(srcColor == dstColor); var success : bool = all(srcColor == dstColor);
var outputIndex : u32 = GlobalInvocationID.y * size.x + GlobalInvocationID.x; var outputIndex : u32 = GlobalInvocationID.y * u32(size.x) + GlobalInvocationID.x;
if (success) { if (success) {
output.result[outputIndex] = u32(1); output.result[outputIndex] = 1u;
} else { } else {
output.result[outputIndex] = u32(0); output.result[outputIndex] = 0u;
} }
} }
)"); )");