diff --git a/examples/Animometer.cpp b/examples/Animometer.cpp index 2b1873a5dd..fb113f61cb 100644 --- a/examples/Animometer.cpp +++ b/examples/Animometer.cpp @@ -65,14 +65,14 @@ void init() { scalar : f32; scalarOffset : f32; }; - [[set(0), binding(0)]] var c : Constants; + [[group(0), binding(0)]] var c : Constants; struct VertexOut { [[location(0)]] v_color : vec4; [[builtin(position)]] Position : vec4; }; - [[stage(vertex)]] fn main([[builtin(vertex_idx)]] VertexIndex : u32) -> VertexOut { + [[stage(vertex)]] fn main([[builtin(vertex_index)]] VertexIndex : u32) -> VertexOut { var positions : array, 3> = array, 3>( vec4( 0.0, 0.1, 0.0, 1.0), vec4(-0.1, -0.1, 0.0, 1.0), diff --git a/src/dawn_native/ShaderModule.cpp b/src/dawn_native/ShaderModule.cpp index 4a05cb1db8..18c8cb13bb 100644 --- a/src/dawn_native/ShaderModule.cpp +++ b/src/dawn_native/ShaderModule.cpp @@ -53,65 +53,65 @@ namespace dawn_native { tint::transform::VertexFormat ToTintVertexFormat(wgpu::VertexFormat format) { switch (format) { case wgpu::VertexFormat::Uint8x2: - return tint::transform::VertexFormat::kVec2U8; + return tint::transform::VertexFormat::kUint8x2; case wgpu::VertexFormat::Uint8x4: - return tint::transform::VertexFormat::kVec4U8; + return tint::transform::VertexFormat::kUint8x4; case wgpu::VertexFormat::Sint8x2: - return tint::transform::VertexFormat::kVec2I8; + return tint::transform::VertexFormat::kSint8x2; case wgpu::VertexFormat::Sint8x4: - return tint::transform::VertexFormat::kVec4I8; + return tint::transform::VertexFormat::kSint8x4; case wgpu::VertexFormat::Unorm8x2: - return tint::transform::VertexFormat::kVec2U8Norm; + return tint::transform::VertexFormat::kUnorm8x2; case wgpu::VertexFormat::Unorm8x4: - return tint::transform::VertexFormat::kVec4U8Norm; + return tint::transform::VertexFormat::kUnorm8x4; case wgpu::VertexFormat::Snorm8x2: - return tint::transform::VertexFormat::kVec2I8Norm; + return tint::transform::VertexFormat::kSnorm8x2; case wgpu::VertexFormat::Snorm8x4: - return tint::transform::VertexFormat::kVec4I8Norm; + return tint::transform::VertexFormat::kSnorm8x4; case wgpu::VertexFormat::Uint16x2: - return tint::transform::VertexFormat::kVec2U16; + return tint::transform::VertexFormat::kUint16x2; case wgpu::VertexFormat::Uint16x4: - return tint::transform::VertexFormat::kVec4U16; + return tint::transform::VertexFormat::kUint16x4; case wgpu::VertexFormat::Sint16x2: - return tint::transform::VertexFormat::kVec2I16; + return tint::transform::VertexFormat::kSint16x2; case wgpu::VertexFormat::Sint16x4: - return tint::transform::VertexFormat::kVec4I16; + return tint::transform::VertexFormat::kSint16x4; case wgpu::VertexFormat::Unorm16x2: - return tint::transform::VertexFormat::kVec2U16Norm; + return tint::transform::VertexFormat::kUnorm16x2; case wgpu::VertexFormat::Unorm16x4: - return tint::transform::VertexFormat::kVec4U16Norm; + return tint::transform::VertexFormat::kUnorm16x4; case wgpu::VertexFormat::Snorm16x2: - return tint::transform::VertexFormat::kVec2I16Norm; + return tint::transform::VertexFormat::kSnorm16x2; case wgpu::VertexFormat::Snorm16x4: - return tint::transform::VertexFormat::kVec4I16Norm; + return tint::transform::VertexFormat::kSnorm16x4; case wgpu::VertexFormat::Float16x2: - return tint::transform::VertexFormat::kVec2F16; + return tint::transform::VertexFormat::kFloat16x2; case wgpu::VertexFormat::Float16x4: - return tint::transform::VertexFormat::kVec4F16; + return tint::transform::VertexFormat::kFloat16x4; case wgpu::VertexFormat::Float32: - return tint::transform::VertexFormat::kF32; + return tint::transform::VertexFormat::kFloat32; case wgpu::VertexFormat::Float32x2: - return tint::transform::VertexFormat::kVec2F32; + return tint::transform::VertexFormat::kFloat32x2; case wgpu::VertexFormat::Float32x3: - return tint::transform::VertexFormat::kVec3F32; + return tint::transform::VertexFormat::kFloat32x3; case wgpu::VertexFormat::Float32x4: - return tint::transform::VertexFormat::kVec4F32; + return tint::transform::VertexFormat::kFloat32x4; case wgpu::VertexFormat::Uint32: - return tint::transform::VertexFormat::kU32; + return tint::transform::VertexFormat::kUint32; case wgpu::VertexFormat::Uint32x2: - return tint::transform::VertexFormat::kVec2U32; + return tint::transform::VertexFormat::kUint32x2; case wgpu::VertexFormat::Uint32x3: - return tint::transform::VertexFormat::kVec3U32; + return tint::transform::VertexFormat::kUint32x3; case wgpu::VertexFormat::Uint32x4: - return tint::transform::VertexFormat::kVec4U32; + return tint::transform::VertexFormat::kUint32x4; case wgpu::VertexFormat::Sint32: - return tint::transform::VertexFormat::kI32; + return tint::transform::VertexFormat::kSint32; case wgpu::VertexFormat::Sint32x2: - return tint::transform::VertexFormat::kVec2I32; + return tint::transform::VertexFormat::kSint32x2; case wgpu::VertexFormat::Sint32x3: - return tint::transform::VertexFormat::kVec3I32; + return tint::transform::VertexFormat::kSint32x3; case wgpu::VertexFormat::Sint32x4: - return tint::transform::VertexFormat::kVec4I32; + return tint::transform::VertexFormat::kSint32x4; case wgpu::VertexFormat::Undefined: break; diff --git a/src/tests/end2end/ComputeCopyStorageBufferTests.cpp b/src/tests/end2end/ComputeCopyStorageBufferTests.cpp index a118c29506..bdf9093162 100644 --- a/src/tests/end2end/ComputeCopyStorageBufferTests.cpp +++ b/src/tests/end2end/ComputeCopyStorageBufferTests.cpp @@ -96,8 +96,8 @@ TEST_P(ComputeCopyStorageBufferTests, SizedArrayOfBasic) { }; // TODO(crbug.com/tint/386): Use the same struct type - [[set(0), binding(0)]] var src : Buf1; - [[set(0), binding(1)]] var dst : Buf2; + [[group(0), binding(0)]] var src : Buf1; + [[group(0), binding(1)]] var dst : Buf2; [[stage(compute), workgroup_size(1)]] fn main([[builtin(global_invocation_id)]] GlobalInvocationID : vec3) { @@ -123,8 +123,8 @@ TEST_P(ComputeCopyStorageBufferTests, SizedArrayOfStruct) { }; // TODO(crbug.com/tint/386): Use the same struct type - [[set(0), binding(0)]] var src : Buf1; - [[set(0), binding(1)]] var dst : Buf2; + [[group(0), binding(0)]] var src : Buf1; + [[group(0), binding(1)]] var dst : Buf2; [[stage(compute), workgroup_size(1)]] fn main([[builtin(global_invocation_id)]] GlobalInvocationID : vec3) { @@ -145,8 +145,8 @@ TEST_P(ComputeCopyStorageBufferTests, UnsizedArrayOfBasic) { }; // TODO(crbug.com/tint/386): Use the same struct type - [[set(0), binding(0)]] var src : Buf1; - [[set(0), binding(1)]] var dst : Buf2; + [[group(0), binding(0)]] var src : Buf1; + [[group(0), binding(1)]] var dst : Buf2; [[stage(compute), workgroup_size(1)]] fn main([[builtin(global_invocation_id)]] GlobalInvocationID : vec3) { diff --git a/src/tests/end2end/ComputeLayoutMemoryBufferTests.cpp b/src/tests/end2end/ComputeLayoutMemoryBufferTests.cpp index b1d3c5c1ff..0f4e46b9c6 100644 --- a/src/tests/end2end/ComputeLayoutMemoryBufferTests.cpp +++ b/src/tests/end2end/ComputeLayoutMemoryBufferTests.cpp @@ -190,9 +190,9 @@ struct Data { code : u32; }; -[[set(0), binding(0)]] var<{input_qualifiers}> input : Input; -[[set(0), binding(1)]] var output : Output; -[[set(0), binding(2)]] var status : Status; +[[group(0), binding(0)]] var<{input_qualifiers}> input : Input; +[[group(0), binding(1)]] var output : Output; +[[group(0), binding(2)]] var status : Status; [[stage(compute), workgroup_size(1,1,1)]] fn main() { diff --git a/src/tests/end2end/D3D12VideoViewsTests.cpp b/src/tests/end2end/D3D12VideoViewsTests.cpp index 67bc48cec3..187cbb7578 100644 --- a/src/tests/end2end/D3D12VideoViewsTests.cpp +++ b/src/tests/end2end/D3D12VideoViewsTests.cpp @@ -297,8 +297,8 @@ TEST_P(D3D12VideoViewsTests, NV12SampleYtoR) { renderPipelineDescriptor.vertex.module = GetTestVertexShaderModule(); renderPipelineDescriptor.cFragment.module = utils::CreateShaderModule(device, R"( - [[set(0), binding(0)]] var sampler0 : sampler; - [[set(0), binding(1)]] var texture : texture_2d; + [[group(0), binding(0)]] var sampler0 : sampler; + [[group(0), binding(1)]] var texture : texture_2d; [[stage(fragment)]] fn main([[location(0)]] texCoord : vec2) -> [[location(0)]] vec4 { @@ -348,8 +348,8 @@ TEST_P(D3D12VideoViewsTests, NV12SampleUVtoRG) { renderPipelineDescriptor.vertex.module = GetTestVertexShaderModule(); renderPipelineDescriptor.cFragment.module = utils::CreateShaderModule(device, R"( - [[set(0), binding(0)]] var sampler0 : sampler; - [[set(0), binding(1)]] var texture : texture_2d; + [[group(0), binding(0)]] var sampler0 : sampler; + [[group(0), binding(1)]] var texture : texture_2d; [[stage(fragment)]] fn main([[location(0)]] texCoord : vec2) -> [[location(0)]] vec4 { @@ -408,9 +408,9 @@ TEST_P(D3D12VideoViewsTests, NV12SampleYUVtoRGB) { renderPipelineDescriptor.vertex.module = GetTestVertexShaderModule(); renderPipelineDescriptor.cFragment.module = utils::CreateShaderModule(device, R"( - [[set(0), binding(0)]] var sampler0 : sampler; - [[set(0), binding(1)]] var lumaTexture : texture_2d; - [[set(0), binding(2)]] var chromaTexture : texture_2d; + [[group(0), binding(0)]] var sampler0 : sampler; + [[group(0), binding(1)]] var lumaTexture : texture_2d; + [[group(0), binding(2)]] var chromaTexture : texture_2d; [[stage(fragment)]] fn main([[location(0)]] texCoord : vec2) -> [[location(0)]] vec4 { diff --git a/src/tests/end2end/ExternalTextureTests.cpp b/src/tests/end2end/ExternalTextureTests.cpp index da16777573..00de5faa27 100644 --- a/src/tests/end2end/ExternalTextureTests.cpp +++ b/src/tests/end2end/ExternalTextureTests.cpp @@ -63,7 +63,7 @@ TEST_P(ExternalTextureTests, CreateExternalTextureSuccess) { TEST_P(ExternalTextureTests, SampleExternalTexture) { wgpu::ShaderModule vsModule = utils::CreateShaderModule(device, R"( - [[stage(vertex)]] fn main([[builtin(vertex_idx)]] VertexIndex : u32) -> [[builtin(position)]] vec4 { + [[stage(vertex)]] fn main([[builtin(vertex_index)]] VertexIndex : u32) -> [[builtin(position)]] vec4 { var positions : array, 3> = array, 3>( vec4(-1.0, 1.0, 0.0, 1.0), vec4(-1.0, -1.0, 0.0, 1.0),