mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-21 02:39:11 +00:00
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:
committed by
Commit Bot service account
parent
88f7f580bc
commit
7b615af00c
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user