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:
parent
7843076b01
commit
a0491c9141
|
@ -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"}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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, },
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
||||||
})))
|
})))
|
||||||
|
|
Loading…
Reference in New Issue