Rename AddressMode::MirroredRepeat to MirrorRepeat.

This is to match the name in the WeBGPU IDL.

BUG=dawn:22

Change-Id: I0a4a7b62afa30cfd699d90efb2dd0c085778883b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/8624
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Yunchao He <yunchao.he@intel.com>
This commit is contained in:
Corentin Wallez 2019-07-08 09:36:31 +00:00 committed by Commit Bot service account
parent 7843076b01
commit a0491c9141
7 changed files with 8 additions and 8 deletions

View File

@ -18,7 +18,7 @@
"category": "enum", "category": "enum",
"values": [ "values": [
{"value": 0, "name": "repeat"}, {"value": 0, "name": "repeat"},
{"value": 1, "name": "mirrored repeat"}, {"value": 1, "name": "mirror repeat"},
{"value": 2, "name": "clamp to edge"} {"value": 2, "name": "clamp to edge"}
] ]
}, },

View File

@ -24,7 +24,7 @@ namespace dawn_native { namespace d3d12 {
switch (mode) { switch (mode) {
case dawn::AddressMode::Repeat: case dawn::AddressMode::Repeat:
return D3D12_TEXTURE_ADDRESS_MODE_WRAP; return D3D12_TEXTURE_ADDRESS_MODE_WRAP;
case dawn::AddressMode::MirroredRepeat: case dawn::AddressMode::MirrorRepeat:
return D3D12_TEXTURE_ADDRESS_MODE_MIRROR; return D3D12_TEXTURE_ADDRESS_MODE_MIRROR;
case dawn::AddressMode::ClampToEdge: case dawn::AddressMode::ClampToEdge:
return D3D12_TEXTURE_ADDRESS_MODE_CLAMP; return D3D12_TEXTURE_ADDRESS_MODE_CLAMP;

View File

@ -42,7 +42,7 @@ namespace dawn_native { namespace metal {
switch (mode) { switch (mode) {
case dawn::AddressMode::Repeat: case dawn::AddressMode::Repeat:
return MTLSamplerAddressModeRepeat; return MTLSamplerAddressModeRepeat;
case dawn::AddressMode::MirroredRepeat: case dawn::AddressMode::MirrorRepeat:
return MTLSamplerAddressModeMirrorRepeat; return MTLSamplerAddressModeMirrorRepeat;
case dawn::AddressMode::ClampToEdge: case dawn::AddressMode::ClampToEdge:
return MTLSamplerAddressModeClampToEdge; return MTLSamplerAddressModeClampToEdge;

View File

@ -61,7 +61,7 @@ namespace dawn_native { namespace opengl {
switch (mode) { switch (mode) {
case dawn::AddressMode::Repeat: case dawn::AddressMode::Repeat:
return GL_REPEAT; return GL_REPEAT;
case dawn::AddressMode::MirroredRepeat: case dawn::AddressMode::MirrorRepeat:
return GL_MIRRORED_REPEAT; return GL_MIRRORED_REPEAT;
case dawn::AddressMode::ClampToEdge: case dawn::AddressMode::ClampToEdge:
return GL_CLAMP_TO_EDGE; return GL_CLAMP_TO_EDGE;

View File

@ -25,7 +25,7 @@ namespace dawn_native { namespace vulkan {
switch (mode) { switch (mode) {
case dawn::AddressMode::Repeat: case dawn::AddressMode::Repeat:
return VK_SAMPLER_ADDRESS_MODE_REPEAT; return VK_SAMPLER_ADDRESS_MODE_REPEAT;
case dawn::AddressMode::MirroredRepeat: case dawn::AddressMode::MirrorRepeat:
return VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT; return VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT;
case dawn::AddressMode::ClampToEdge: case dawn::AddressMode::ClampToEdge:
return VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE; return VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE;

View File

@ -31,7 +31,7 @@ namespace {
}; };
AddressModeTestCase addressModes[] = { AddressModeTestCase addressModes[] = {
{ dawn::AddressMode::Repeat, 0, 255, }, { dawn::AddressMode::Repeat, 0, 255, },
{ dawn::AddressMode::MirroredRepeat, 255, 0, }, { dawn::AddressMode::MirrorRepeat, 255, 0, },
{ dawn::AddressMode::ClampToEdge, 255, 255, }, { dawn::AddressMode::ClampToEdge, 255, 255, },
}; };
} }

View File

@ -270,7 +270,7 @@ TEST_F(WireArgumentTests, StructureOfValuesArgument) {
descriptor.mipmapFilter = DAWN_FILTER_MODE_LINEAR; descriptor.mipmapFilter = DAWN_FILTER_MODE_LINEAR;
descriptor.addressModeU = DAWN_ADDRESS_MODE_CLAMP_TO_EDGE; descriptor.addressModeU = DAWN_ADDRESS_MODE_CLAMP_TO_EDGE;
descriptor.addressModeV = DAWN_ADDRESS_MODE_REPEAT; descriptor.addressModeV = DAWN_ADDRESS_MODE_REPEAT;
descriptor.addressModeW = DAWN_ADDRESS_MODE_MIRRORED_REPEAT; descriptor.addressModeW = DAWN_ADDRESS_MODE_MIRROR_REPEAT;
descriptor.lodMinClamp = kLodMin; descriptor.lodMinClamp = kLodMin;
descriptor.lodMaxClamp = kLodMax; descriptor.lodMaxClamp = kLodMax;
descriptor.compare = DAWN_COMPARE_FUNCTION_NEVER; descriptor.compare = DAWN_COMPARE_FUNCTION_NEVER;
@ -286,7 +286,7 @@ TEST_F(WireArgumentTests, StructureOfValuesArgument) {
desc->mipmapFilter == DAWN_FILTER_MODE_LINEAR && desc->mipmapFilter == DAWN_FILTER_MODE_LINEAR &&
desc->addressModeU == DAWN_ADDRESS_MODE_CLAMP_TO_EDGE && desc->addressModeU == DAWN_ADDRESS_MODE_CLAMP_TO_EDGE &&
desc->addressModeV == DAWN_ADDRESS_MODE_REPEAT && desc->addressModeV == DAWN_ADDRESS_MODE_REPEAT &&
desc->addressModeW == DAWN_ADDRESS_MODE_MIRRORED_REPEAT && desc->addressModeW == DAWN_ADDRESS_MODE_MIRROR_REPEAT &&
desc->compare == DAWN_COMPARE_FUNCTION_NEVER && desc->compare == DAWN_COMPARE_FUNCTION_NEVER &&
desc->lodMinClamp == kLodMin && desc->lodMaxClamp == kLodMax; desc->lodMinClamp == kLodMin && desc->lodMaxClamp == kLodMax;
}))) })))