TextureFormatUtils: Remove unused functions

GetColorTextureComponent[GLSL,WGSL]TypePrefix() are no longer used.

And also move the two remaining WGSL functions together, and rename for consistency's sake.

Change-Id: If70f195b7185fca9337ec5c12c74efa25ae6ce4c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/37901
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
This commit is contained in:
Ben Clayton
2021-01-21 14:18:19 +00:00
committed by Commit Bot service account
parent 88f7f580bc
commit 7b615af00c
4 changed files with 35 additions and 228 deletions

View File

@@ -286,7 +286,7 @@ fn IsEqualTo(pixel : vec4<f32>, expected : vec4<f32>) -> bool {
}
std::string CommonReadOnlyTestCode(wgpu::TextureFormat format, bool is2DArray = false) {
std::string componentFmt = utils::GetColorTextureComponentWGSLType(format);
std::string componentFmt = utils::GetWGSLColorTextureComponentType(format);
auto texelType = "vec4<" + componentFmt + ">";
auto* layerCount = is2DArray ? "textureNumLayers(storageImage0)" : "1";
auto* textureLoad = is2DArray ? "textureLoad(storageImage0, vec2<i32>(x, y), i32(layer))"
@@ -320,7 +320,7 @@ fn IsEqualTo(pixel : vec4<f32>, expected : vec4<f32>) -> bool {
std::string CommonWriteOnlyTestCode(const char* stage,
wgpu::TextureFormat format,
bool is2DArray = false) {
std::string componentFmt = utils::GetColorTextureComponentWGSLType(format);
std::string componentFmt = utils::GetWGSLColorTextureComponentType(format);
auto texelType = "vec4<" + componentFmt + ">";
auto* layerCount = is2DArray ? "textureNumLayers(storageImage0)" : "1";
auto* textureStore = is2DArray

View File

@@ -160,7 +160,7 @@ class TextureFormatTest : public DawnTest {
})");
// Compute the WGSL type of the texture's data.
const char* type = utils::GetColorTextureComponentWGSLType(sampleFormatInfo.format);
const char* type = utils::GetWGSLColorTextureComponentType(sampleFormatInfo.format);
std::ostringstream fsSource;
fsSource << "[[group(0), binding(0)]] var<uniform_constant> myTexture : texture_2d<" << type