Remove SPVC toggles and excise remaining references
BUG=dawn:521 Change-Id: Ib6428ca366a70d73096f9b4442c1b7fb69a539ba Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/28142 Reviewed-by: Austin Eng <enga@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
This commit is contained in:
parent
b44ca92f1c
commit
2cdb9f1ed1
|
@ -1056,7 +1056,6 @@ namespace dawn_native {
|
||||||
|
|
||||||
void DeviceBase::SetDefaultToggles() {
|
void DeviceBase::SetDefaultToggles() {
|
||||||
SetToggle(Toggle::LazyClearResourceOnFirstUse, true);
|
SetToggle(Toggle::LazyClearResourceOnFirstUse, true);
|
||||||
SetToggle(Toggle::UseSpvc, false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DeviceBase::ApplyToggleOverrides(const DeviceDescriptor* deviceDescriptor) {
|
void DeviceBase::ApplyToggleOverrides(const DeviceDescriptor* deviceDescriptor) {
|
||||||
|
|
|
@ -93,16 +93,6 @@ namespace dawn_native {
|
||||||
{Toggle::SkipValidation,
|
{Toggle::SkipValidation,
|
||||||
{"skip_validation", "Skip expensive validation of Dawn commands.",
|
{"skip_validation", "Skip expensive validation of Dawn commands.",
|
||||||
"https://crbug.com/dawn/271"}},
|
"https://crbug.com/dawn/271"}},
|
||||||
{Toggle::UseSpvc,
|
|
||||||
{"use_spvc",
|
|
||||||
"Enable use of spvc for shader compilation, instead of accessing spirv_cross "
|
|
||||||
"directly.",
|
|
||||||
"https://crbug.com/dawn/288"}},
|
|
||||||
{Toggle::UseSpvcParser,
|
|
||||||
{"use_spvc_parser",
|
|
||||||
"Enable usage of spvc's internal parsing and IR generation code, instead of "
|
|
||||||
"spirv_cross's.",
|
|
||||||
"https://crbug.com/dawn/288"}},
|
|
||||||
{Toggle::VulkanUseD32S8,
|
{Toggle::VulkanUseD32S8,
|
||||||
{"vulkan_use_d32s8",
|
{"vulkan_use_d32s8",
|
||||||
"Vulkan mandates support of either D32_FLOAT_S8 or D24_UNORM_S8. When available the "
|
"Vulkan mandates support of either D32_FLOAT_S8 or D24_UNORM_S8. When available the "
|
||||||
|
|
|
@ -34,8 +34,6 @@ namespace dawn_native {
|
||||||
UseD3D12RenderPass,
|
UseD3D12RenderPass,
|
||||||
UseD3D12ResidencyManagement,
|
UseD3D12ResidencyManagement,
|
||||||
SkipValidation,
|
SkipValidation,
|
||||||
UseSpvc,
|
|
||||||
UseSpvcParser,
|
|
||||||
VulkanUseD32S8,
|
VulkanUseD32S8,
|
||||||
MetalDisableSamplerCompare,
|
MetalDisableSamplerCompare,
|
||||||
DisableBaseVertex,
|
DisableBaseVertex,
|
||||||
|
|
|
@ -230,72 +230,6 @@ void DawnTestEnvironment::ParseArgs(int argc, char** argv) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcmp("--use-spvc", argv[i]) == 0) {
|
|
||||||
if (mSpvcFlagSeen) {
|
|
||||||
dawn::WarningLog() << "Multiple flags passed in that force whether or not to use "
|
|
||||||
"the spvc. This may lead to unexpected behaviour.";
|
|
||||||
}
|
|
||||||
ASSERT(!mSpvcFlagSeen);
|
|
||||||
|
|
||||||
mUseSpvc = true;
|
|
||||||
mSpvcFlagSeen = true;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (strcmp("--no-use-spvc", argv[i]) == 0) {
|
|
||||||
if (mSpvcFlagSeen) {
|
|
||||||
dawn::WarningLog() << "Multiple flags passed in that force whether or not to use "
|
|
||||||
"the spvc. This may lead to unexpected behaviour.";
|
|
||||||
}
|
|
||||||
ASSERT(!mSpvcFlagSeen);
|
|
||||||
|
|
||||||
mUseSpvc = false;
|
|
||||||
mSpvcFlagSeen = true;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (strcmp("--use-spvc-parser", argv[i]) == 0) {
|
|
||||||
if (mSpvcParserFlagSeen) {
|
|
||||||
dawn::WarningLog() << "Multiple flags passed in that force whether or not to use "
|
|
||||||
"the spvc parser. This may cause unexpected behaviour.";
|
|
||||||
}
|
|
||||||
ASSERT(!mSpvcParserFlagSeen);
|
|
||||||
|
|
||||||
if (!mUseSpvc) {
|
|
||||||
if (mSpvcFlagSeen) {
|
|
||||||
dawn::ErrorLog()
|
|
||||||
<< "Overriding force disabling of spvc since it is required for using the "
|
|
||||||
"spvc parser. This indicates a likely misconfiguration.";
|
|
||||||
} else {
|
|
||||||
dawn::InfoLog()
|
|
||||||
<< "Enabling spvc since it is required for using the spvc parser.";
|
|
||||||
}
|
|
||||||
ASSERT(!mSpvcFlagSeen);
|
|
||||||
}
|
|
||||||
|
|
||||||
mUseSpvc = true; // It's impossible to use the spvc parser without using spvc, so
|
|
||||||
// turning on mUseSpvc implicitly.
|
|
||||||
mUseSpvcParser = true;
|
|
||||||
mSpvcParserFlagSeen = true;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (strcmp("--no-use-spvc-parser", argv[i]) == 0) {
|
|
||||||
if (mSpvcParserFlagSeen) {
|
|
||||||
dawn::WarningLog() << "Multiple flags passed in that force whether or not to use "
|
|
||||||
"the spvc parser. This may cause unexpected behaviour.";
|
|
||||||
}
|
|
||||||
ASSERT(!mSpvcParserFlagSeen);
|
|
||||||
|
|
||||||
// Intentionally not changing mUseSpvc, since the dependency is one-way. This will
|
|
||||||
// not correctly handle the case where spvc is off by default, then there is a spvc
|
|
||||||
// parser on flag followed by a off flag, but that is already being indicated as a
|
|
||||||
// misuse.
|
|
||||||
mUseSpvcParser = false;
|
|
||||||
mSpvcParserFlagSeen = true;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
constexpr const char kVendorIdFilterArg[] = "--adapter-vendor-id=";
|
constexpr const char kVendorIdFilterArg[] = "--adapter-vendor-id=";
|
||||||
argLen = sizeof(kVendorIdFilterArg) - 1;
|
argLen = sizeof(kVendorIdFilterArg) - 1;
|
||||||
if (strncmp(argv[i], kVendorIdFilterArg, argLen) == 0) {
|
if (strncmp(argv[i], kVendorIdFilterArg, argLen) == 0) {
|
||||||
|
@ -356,12 +290,6 @@ void DawnTestEnvironment::ParseArgs(int argc, char** argv) {
|
||||||
" -c, --begin-capture-on-startup: Begin debug capture on startup "
|
" -c, --begin-capture-on-startup: Begin debug capture on startup "
|
||||||
"(defaults to no capture)\n"
|
"(defaults to no capture)\n"
|
||||||
" --skip-validation: Skip Dawn validation\n"
|
" --skip-validation: Skip Dawn validation\n"
|
||||||
" --use-spvc: Use spvc for accessing spirv-cross\n"
|
|
||||||
" --no-use-spvc: Do not use spvc for accessing spirv-cross\n"
|
|
||||||
" --use-spvc-parser: Use spvc's spir-v parsing insteads of spirv-cross's, "
|
|
||||||
"implies --use-spvc\n"
|
|
||||||
" --no-use-spvc-parser: Do no use spvc's spir-v parsing insteads of "
|
|
||||||
"spirv-cross's\n"
|
|
||||||
" --adapter-vendor-id: Select adapter by vendor id to run end2end tests"
|
" --adapter-vendor-id: Select adapter by vendor id to run end2end tests"
|
||||||
"on multi-GPU systems \n"
|
"on multi-GPU systems \n"
|
||||||
" --exclusive-device-type-preference: Comma-delimited list of preferred device "
|
" --exclusive-device-type-preference: Comma-delimited list of preferred device "
|
||||||
|
@ -488,12 +416,6 @@ void DawnTestEnvironment::PrintTestConfigurationAndAdapterInfo() const {
|
||||||
<< "\n"
|
<< "\n"
|
||||||
"SkipDawnValidation: "
|
"SkipDawnValidation: "
|
||||||
<< (mSkipDawnValidation ? "true" : "false")
|
<< (mSkipDawnValidation ? "true" : "false")
|
||||||
<< "\n"
|
|
||||||
"UseSpvc: "
|
|
||||||
<< (mUseSpvc ? "true" : "false")
|
|
||||||
<< "\n"
|
|
||||||
"UseSpvcParser: "
|
|
||||||
<< (mUseSpvcParser ? "true" : "false")
|
|
||||||
<< "\n"
|
<< "\n"
|
||||||
"BeginCaptureOnStartup: "
|
"BeginCaptureOnStartup: "
|
||||||
<< (mBeginCaptureOnStartup ? "true" : "false")
|
<< (mBeginCaptureOnStartup ? "true" : "false")
|
||||||
|
@ -543,14 +465,6 @@ bool DawnTestEnvironment::IsDawnValidationSkipped() const {
|
||||||
return mSkipDawnValidation;
|
return mSkipDawnValidation;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DawnTestEnvironment::IsSpvcBeingUsed() const {
|
|
||||||
return mUseSpvc;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool DawnTestEnvironment::IsSpvcParserBeingUsed() const {
|
|
||||||
return mUseSpvcParser;
|
|
||||||
}
|
|
||||||
|
|
||||||
dawn_native::Instance* DawnTestEnvironment::GetInstance() const {
|
dawn_native::Instance* DawnTestEnvironment::GetInstance() const {
|
||||||
return mInstance.get();
|
return mInstance.get();
|
||||||
}
|
}
|
||||||
|
@ -696,14 +610,6 @@ bool DawnTestBase::IsDawnValidationSkipped() const {
|
||||||
return gTestEnv->IsDawnValidationSkipped();
|
return gTestEnv->IsDawnValidationSkipped();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DawnTestBase::IsSpvcBeingUsed() const {
|
|
||||||
return gTestEnv->IsSpvcBeingUsed();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool DawnTestBase::IsSpvcParserBeingUsed() const {
|
|
||||||
return gTestEnv->IsSpvcParserBeingUsed();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool DawnTestBase::IsAsan() const {
|
bool DawnTestBase::IsAsan() const {
|
||||||
#if defined(ADDRESS_SANITIZER)
|
#if defined(ADDRESS_SANITIZER)
|
||||||
return true;
|
return true;
|
||||||
|
@ -790,24 +696,6 @@ void DawnTestBase::SetUp() {
|
||||||
deviceDescriptor.forceEnabledToggles.push_back(kSkipValidationToggle);
|
deviceDescriptor.forceEnabledToggles.push_back(kSkipValidationToggle);
|
||||||
}
|
}
|
||||||
|
|
||||||
static constexpr char kUseSpvcToggle[] = "use_spvc";
|
|
||||||
static constexpr char kUseSpvcParserToggle[] = "use_spvc_parser";
|
|
||||||
if (gTestEnv->IsSpvcBeingUsed()) {
|
|
||||||
ASSERT(gTestEnv->GetInstance()->GetToggleInfo(kUseSpvcToggle) != nullptr);
|
|
||||||
deviceDescriptor.forceEnabledToggles.push_back(kUseSpvcToggle);
|
|
||||||
|
|
||||||
if (gTestEnv->IsSpvcParserBeingUsed()) {
|
|
||||||
ASSERT(gTestEnv->GetInstance()->GetToggleInfo(kUseSpvcParserToggle) != nullptr);
|
|
||||||
deviceDescriptor.forceEnabledToggles.push_back(kUseSpvcParserToggle);
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
// Turning on spvc parser should always turn on spvc.
|
|
||||||
ASSERT(!gTestEnv->IsSpvcParserBeingUsed());
|
|
||||||
ASSERT(gTestEnv->GetInstance()->GetToggleInfo(kUseSpvcToggle) != nullptr);
|
|
||||||
deviceDescriptor.forceDisabledToggles.push_back(kUseSpvcToggle);
|
|
||||||
}
|
|
||||||
|
|
||||||
backendDevice = mBackendAdapter.CreateDevice(&deviceDescriptor);
|
backendDevice = mBackendAdapter.CreateDevice(&deviceDescriptor);
|
||||||
ASSERT_NE(nullptr, backendDevice);
|
ASSERT_NE(nullptr, backendDevice);
|
||||||
|
|
||||||
|
|
|
@ -191,8 +191,6 @@ class DawnTestEnvironment : public testing::Environment {
|
||||||
bool UsesWire() const;
|
bool UsesWire() const;
|
||||||
bool IsBackendValidationEnabled() const;
|
bool IsBackendValidationEnabled() const;
|
||||||
bool IsDawnValidationSkipped() const;
|
bool IsDawnValidationSkipped() const;
|
||||||
bool IsSpvcBeingUsed() const;
|
|
||||||
bool IsSpvcParserBeingUsed() const;
|
|
||||||
dawn_native::Instance* GetInstance() const;
|
dawn_native::Instance* GetInstance() const;
|
||||||
bool HasVendorIdFilter() const;
|
bool HasVendorIdFilter() const;
|
||||||
uint32_t GetVendorIdFilter() const;
|
uint32_t GetVendorIdFilter() const;
|
||||||
|
@ -210,10 +208,6 @@ class DawnTestEnvironment : public testing::Environment {
|
||||||
bool mUseWire = false;
|
bool mUseWire = false;
|
||||||
bool mEnableBackendValidation = false;
|
bool mEnableBackendValidation = false;
|
||||||
bool mSkipDawnValidation = false;
|
bool mSkipDawnValidation = false;
|
||||||
bool mUseSpvc = false;
|
|
||||||
bool mSpvcFlagSeen = false;
|
|
||||||
bool mUseSpvcParser = false;
|
|
||||||
bool mSpvcParserFlagSeen = false;
|
|
||||||
bool mBeginCaptureOnStartup = false;
|
bool mBeginCaptureOnStartup = false;
|
||||||
bool mHasVendorIdFilter = false;
|
bool mHasVendorIdFilter = false;
|
||||||
uint32_t mVendorIdFilter = 0;
|
uint32_t mVendorIdFilter = 0;
|
||||||
|
@ -256,8 +250,6 @@ class DawnTestBase {
|
||||||
bool UsesWire() const;
|
bool UsesWire() const;
|
||||||
bool IsBackendValidationEnabled() const;
|
bool IsBackendValidationEnabled() const;
|
||||||
bool IsDawnValidationSkipped() const;
|
bool IsDawnValidationSkipped() const;
|
||||||
bool IsSpvcBeingUsed() const;
|
|
||||||
bool IsSpvcParserBeingUsed() const;
|
|
||||||
|
|
||||||
bool IsAsan() const;
|
bool IsAsan() const;
|
||||||
|
|
||||||
|
|
|
@ -1095,12 +1095,6 @@ TEST_P(BindGroupTests, ReadonlyStorage) {
|
||||||
// used correctly. The test loads a different value from each binding, and writes 1 to a storage
|
// used correctly. The test loads a different value from each binding, and writes 1 to a storage
|
||||||
// buffer if all values are correct.
|
// buffer if all values are correct.
|
||||||
TEST_P(BindGroupTests, ReallyLargeBindGroup) {
|
TEST_P(BindGroupTests, ReallyLargeBindGroup) {
|
||||||
// When we run dawn_end2end_tests with "--use-spvc-parser", extracting the binding type of a
|
|
||||||
// read-only image will always return shaderc_spvc_binding_type_writeonly_storage_texture.
|
|
||||||
// TODO(jiawei.shao@intel.com): enable this test when we specify "--use-spvc-parser" after the
|
|
||||||
// bug in spvc parser is fixed.
|
|
||||||
DAWN_SKIP_TEST_IF(IsD3D12() && IsSpvcParserBeingUsed());
|
|
||||||
|
|
||||||
std::string interface = "#version 450\n";
|
std::string interface = "#version 450\n";
|
||||||
std::string body;
|
std::string body;
|
||||||
uint32_t binding = 0;
|
uint32_t binding = 0;
|
||||||
|
|
|
@ -401,10 +401,6 @@ class BufferZeroInitTest : public DawnTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
void TestBufferZeroInitAsIndirectBufferForDispatchIndirect(uint64_t indirectBufferOffset) {
|
void TestBufferZeroInitAsIndirectBufferForDispatchIndirect(uint64_t indirectBufferOffset) {
|
||||||
// See https://github.com/google/shaderc/issues/1123 for more details.
|
|
||||||
// TODO(jiawei.shao@intel.com): enable this test when the related SPVC issue is fixed.
|
|
||||||
DAWN_SKIP_TEST_IF(IsD3D12() && IsSpvcParserBeingUsed());
|
|
||||||
|
|
||||||
constexpr wgpu::TextureFormat kColorAttachmentFormat = wgpu::TextureFormat::RGBA8Unorm;
|
constexpr wgpu::TextureFormat kColorAttachmentFormat = wgpu::TextureFormat::RGBA8Unorm;
|
||||||
constexpr wgpu::Color kClearColorGreen = {0.f, 1.f, 0.f, 1.f};
|
constexpr wgpu::Color kClearColorGreen = {0.f, 1.f, 0.f, 1.f};
|
||||||
|
|
||||||
|
@ -971,10 +967,6 @@ TEST_P(BufferZeroInitTest, Copy2DArrayTextureToBuffer) {
|
||||||
// Test that the buffer will be lazy initialized correctly when its first use is to be bound as a
|
// Test that the buffer will be lazy initialized correctly when its first use is to be bound as a
|
||||||
// uniform buffer.
|
// uniform buffer.
|
||||||
TEST_P(BufferZeroInitTest, BoundAsUniformBuffer) {
|
TEST_P(BufferZeroInitTest, BoundAsUniformBuffer) {
|
||||||
// See https://github.com/google/shaderc/issues/1123 for more details.
|
|
||||||
// TODO(jiawei.shao@intel.com): enable this test when the related SPVC issue is fixed.
|
|
||||||
DAWN_SKIP_TEST_IF(IsD3D12() && IsSpvcParserBeingUsed());
|
|
||||||
|
|
||||||
const char* computeShader = R"(
|
const char* computeShader = R"(
|
||||||
#version 450
|
#version 450
|
||||||
layout(set = 0, binding = 0, std140) uniform UBO {
|
layout(set = 0, binding = 0, std140) uniform UBO {
|
||||||
|
@ -1011,10 +1003,6 @@ TEST_P(BufferZeroInitTest, BoundAsUniformBuffer) {
|
||||||
// Test that the buffer will be lazy initialized correctly when its first use is to be bound as a
|
// Test that the buffer will be lazy initialized correctly when its first use is to be bound as a
|
||||||
// read-only storage buffer.
|
// read-only storage buffer.
|
||||||
TEST_P(BufferZeroInitTest, BoundAsReadonlyStorageBuffer) {
|
TEST_P(BufferZeroInitTest, BoundAsReadonlyStorageBuffer) {
|
||||||
// See https://github.com/google/shaderc/issues/1123 for more details.
|
|
||||||
// TODO(jiawei.shao@intel.com): enable this test when the related SPVC issue is fixed.
|
|
||||||
DAWN_SKIP_TEST_IF(IsD3D12() && IsSpvcParserBeingUsed());
|
|
||||||
|
|
||||||
const char* computeShader = R"(
|
const char* computeShader = R"(
|
||||||
#version 450
|
#version 450
|
||||||
layout(set = 0, binding = 0, std140) readonly buffer SSBO {
|
layout(set = 0, binding = 0, std140) readonly buffer SSBO {
|
||||||
|
@ -1051,10 +1039,6 @@ TEST_P(BufferZeroInitTest, BoundAsReadonlyStorageBuffer) {
|
||||||
// Test that the buffer will be lazy initialized correctly when its first use is to be bound as a
|
// Test that the buffer will be lazy initialized correctly when its first use is to be bound as a
|
||||||
// storage buffer.
|
// storage buffer.
|
||||||
TEST_P(BufferZeroInitTest, BoundAsStorageBuffer) {
|
TEST_P(BufferZeroInitTest, BoundAsStorageBuffer) {
|
||||||
// See https://github.com/google/shaderc/issues/1123 for more details.
|
|
||||||
// TODO(jiawei.shao@intel.com): enable this test when the related SPVC issue is fixed.
|
|
||||||
DAWN_SKIP_TEST_IF(IsD3D12() && IsSpvcParserBeingUsed());
|
|
||||||
|
|
||||||
const char* computeShader = R"(
|
const char* computeShader = R"(
|
||||||
#version 450
|
#version 450
|
||||||
layout(set = 0, binding = 0, std140) buffer SSBO {
|
layout(set = 0, binding = 0, std140) buffer SSBO {
|
||||||
|
|
|
@ -703,12 +703,6 @@ TEST_P(StorageTextureTests, BindGroupLayoutWithStorageTextureBindingType) {
|
||||||
|
|
||||||
// Test that read-only storage textures are supported in compute shader.
|
// Test that read-only storage textures are supported in compute shader.
|
||||||
TEST_P(StorageTextureTests, ReadonlyStorageTextureInComputeShader) {
|
TEST_P(StorageTextureTests, ReadonlyStorageTextureInComputeShader) {
|
||||||
// When we run dawn_end2end_tests with "--use-spvc-parser", extracting the binding type of a
|
|
||||||
// read-only image will always return shaderc_spvc_binding_type_writeonly_storage_texture.
|
|
||||||
// TODO(jiawei.shao@intel.com): enable this test when we specify "--use-spvc-parser" after the
|
|
||||||
// bug in spvc parser is fixed.
|
|
||||||
DAWN_SKIP_TEST_IF(IsD3D12() && IsSpvcParserBeingUsed());
|
|
||||||
|
|
||||||
for (wgpu::TextureFormat format : utils::kAllTextureFormats) {
|
for (wgpu::TextureFormat format : utils::kAllTextureFormats) {
|
||||||
if (!utils::TextureFormatSupportsStorageTexture(format)) {
|
if (!utils::TextureFormatSupportsStorageTexture(format)) {
|
||||||
continue;
|
continue;
|
||||||
|
@ -743,12 +737,6 @@ TEST_P(StorageTextureTests, ReadonlyStorageTextureInComputeShader) {
|
||||||
|
|
||||||
// Test that read-only storage textures are supported in vertex shader.
|
// Test that read-only storage textures are supported in vertex shader.
|
||||||
TEST_P(StorageTextureTests, ReadonlyStorageTextureInVertexShader) {
|
TEST_P(StorageTextureTests, ReadonlyStorageTextureInVertexShader) {
|
||||||
// When we run dawn_end2end_tests with "--use-spvc-parser", extracting the binding type of a
|
|
||||||
// read-only image will always return shaderc_spvc_binding_type_writeonly_storage_texture.
|
|
||||||
// TODO(jiawei.shao@intel.com): enable this test when we specify "--use-spvc-parser" after the
|
|
||||||
// bug in spvc parser is fixed.
|
|
||||||
DAWN_SKIP_TEST_IF(IsSpvcParserBeingUsed());
|
|
||||||
|
|
||||||
for (wgpu::TextureFormat format : utils::kAllTextureFormats) {
|
for (wgpu::TextureFormat format : utils::kAllTextureFormats) {
|
||||||
if (!utils::TextureFormatSupportsStorageTexture(format)) {
|
if (!utils::TextureFormatSupportsStorageTexture(format)) {
|
||||||
continue;
|
continue;
|
||||||
|
@ -789,12 +777,6 @@ TEST_P(StorageTextureTests, ReadonlyStorageTextureInVertexShader) {
|
||||||
|
|
||||||
// Test that read-only storage textures are supported in fragment shader.
|
// Test that read-only storage textures are supported in fragment shader.
|
||||||
TEST_P(StorageTextureTests, ReadonlyStorageTextureInFragmentShader) {
|
TEST_P(StorageTextureTests, ReadonlyStorageTextureInFragmentShader) {
|
||||||
// When we run dawn_end2end_tests with "--use-spvc-parser", extracting the binding type of a
|
|
||||||
// read-only image will always return shaderc_spvc_binding_type_writeonly_storage_texture.
|
|
||||||
// TODO(jiawei.shao@intel.com): enable this test when we specify "--use-spvc-parser" after the
|
|
||||||
// bug in spvc parser is fixed.
|
|
||||||
DAWN_SKIP_TEST_IF(IsSpvcParserBeingUsed());
|
|
||||||
|
|
||||||
for (wgpu::TextureFormat format : utils::kAllTextureFormats) {
|
for (wgpu::TextureFormat format : utils::kAllTextureFormats) {
|
||||||
if (!utils::TextureFormatSupportsStorageTexture(format)) {
|
if (!utils::TextureFormatSupportsStorageTexture(format)) {
|
||||||
continue;
|
continue;
|
||||||
|
@ -827,12 +809,6 @@ TEST_P(StorageTextureTests, ReadonlyStorageTextureInFragmentShader) {
|
||||||
|
|
||||||
// Test that write-only storage textures are supported in compute shader.
|
// Test that write-only storage textures are supported in compute shader.
|
||||||
TEST_P(StorageTextureTests, WriteonlyStorageTextureInComputeShader) {
|
TEST_P(StorageTextureTests, WriteonlyStorageTextureInComputeShader) {
|
||||||
// When we run dawn_end2end_tests with "--use-spvc-parser", extracting the binding type of a
|
|
||||||
// read-only image will always return shaderc_spvc_binding_type_writeonly_storage_texture.
|
|
||||||
// TODO(jiawei.shao@intel.com): enable this test when we specify "--use-spvc-parser" after the
|
|
||||||
// bug in spvc parser is fixed.
|
|
||||||
DAWN_SKIP_TEST_IF(IsD3D12() && IsSpvcParserBeingUsed());
|
|
||||||
|
|
||||||
for (wgpu::TextureFormat format : utils::kAllTextureFormats) {
|
for (wgpu::TextureFormat format : utils::kAllTextureFormats) {
|
||||||
if (!utils::TextureFormatSupportsStorageTexture(format)) {
|
if (!utils::TextureFormatSupportsStorageTexture(format)) {
|
||||||
continue;
|
continue;
|
||||||
|
@ -860,12 +836,6 @@ TEST_P(StorageTextureTests, WriteonlyStorageTextureInComputeShader) {
|
||||||
// Test that reading from one read-only storage texture then writing into another write-only storage
|
// Test that reading from one read-only storage texture then writing into another write-only storage
|
||||||
// texture in one dispatch are supported in compute shader.
|
// texture in one dispatch are supported in compute shader.
|
||||||
TEST_P(StorageTextureTests, ReadWriteDifferentStorageTextureInOneDispatchInComputeShader) {
|
TEST_P(StorageTextureTests, ReadWriteDifferentStorageTextureInOneDispatchInComputeShader) {
|
||||||
// When we run dawn_end2end_tests with "--use-spvc-parser", extracting the binding type of a
|
|
||||||
// read-only image will always return shaderc_spvc_binding_type_writeonly_storage_texture.
|
|
||||||
// TODO(jiawei.shao@intel.com): enable this test when we specify "--use-spvc-parser" after the
|
|
||||||
// bug in spvc parser is fixed.
|
|
||||||
DAWN_SKIP_TEST_IF(IsD3D12() && IsSpvcParserBeingUsed());
|
|
||||||
|
|
||||||
for (wgpu::TextureFormat format : utils::kAllTextureFormats) {
|
for (wgpu::TextureFormat format : utils::kAllTextureFormats) {
|
||||||
if (!utils::TextureFormatSupportsStorageTexture(format)) {
|
if (!utils::TextureFormatSupportsStorageTexture(format)) {
|
||||||
continue;
|
continue;
|
||||||
|
@ -898,12 +868,6 @@ TEST_P(StorageTextureTests, ReadWriteDifferentStorageTextureInOneDispatchInCompu
|
||||||
|
|
||||||
// Test that write-only storage textures are supported in fragment shader.
|
// Test that write-only storage textures are supported in fragment shader.
|
||||||
TEST_P(StorageTextureTests, WriteonlyStorageTextureInFragmentShader) {
|
TEST_P(StorageTextureTests, WriteonlyStorageTextureInFragmentShader) {
|
||||||
// When we run dawn_end2end_tests with "--use-spvc-parser", extracting the binding type of a
|
|
||||||
// read-only image will always return shaderc_spvc_binding_type_writeonly_storage_texture.
|
|
||||||
// TODO(jiawei.shao@intel.com): enable this test when we specify "--use-spvc-parser" after the
|
|
||||||
// bug in spvc parser is fixed.
|
|
||||||
DAWN_SKIP_TEST_IF(IsD3D12() && IsSpvcParserBeingUsed());
|
|
||||||
|
|
||||||
for (wgpu::TextureFormat format : utils::kAllTextureFormats) {
|
for (wgpu::TextureFormat format : utils::kAllTextureFormats) {
|
||||||
if (!utils::TextureFormatSupportsStorageTexture(format)) {
|
if (!utils::TextureFormatSupportsStorageTexture(format)) {
|
||||||
continue;
|
continue;
|
||||||
|
@ -931,12 +895,6 @@ TEST_P(StorageTextureTests, WriteonlyStorageTextureInFragmentShader) {
|
||||||
|
|
||||||
// Verify 2D array read-only storage texture works correctly.
|
// Verify 2D array read-only storage texture works correctly.
|
||||||
TEST_P(StorageTextureTests, Readonly2DArrayStorageTexture) {
|
TEST_P(StorageTextureTests, Readonly2DArrayStorageTexture) {
|
||||||
// When we run dawn_end2end_tests with "--use-spvc-parser", extracting the binding type of a
|
|
||||||
// read-only image will always return shaderc_spvc_binding_type_writeonly_storage_texture.
|
|
||||||
// TODO(jiawei.shao@intel.com): enable this test when we specify "--use-spvc-parser" after the
|
|
||||||
// bug in spvc parser is fixed.
|
|
||||||
DAWN_SKIP_TEST_IF(IsSpvcParserBeingUsed());
|
|
||||||
|
|
||||||
constexpr uint32_t kArrayLayerCount = 3u;
|
constexpr uint32_t kArrayLayerCount = 3u;
|
||||||
|
|
||||||
constexpr wgpu::TextureFormat kTextureFormat = wgpu::TextureFormat::R32Uint;
|
constexpr wgpu::TextureFormat kTextureFormat = wgpu::TextureFormat::R32Uint;
|
||||||
|
@ -969,12 +927,6 @@ TEST_P(StorageTextureTests, Readonly2DArrayStorageTexture) {
|
||||||
|
|
||||||
// Verify 2D array write-only storage texture works correctly.
|
// Verify 2D array write-only storage texture works correctly.
|
||||||
TEST_P(StorageTextureTests, Writeonly2DArrayStorageTexture) {
|
TEST_P(StorageTextureTests, Writeonly2DArrayStorageTexture) {
|
||||||
// When we run dawn_end2end_tests with "--use-spvc-parser", extracting the binding type of a
|
|
||||||
// read-only image will always return shaderc_spvc_binding_type_writeonly_storage_texture.
|
|
||||||
// TODO(jiawei.shao@intel.com): enable this test when we specify "--use-spvc-parser" after the
|
|
||||||
// bug in spvc parser is fixed.
|
|
||||||
DAWN_SKIP_TEST_IF(IsD3D12() && IsSpvcParserBeingUsed());
|
|
||||||
|
|
||||||
constexpr uint32_t kArrayLayerCount = 3u;
|
constexpr uint32_t kArrayLayerCount = 3u;
|
||||||
|
|
||||||
constexpr wgpu::TextureFormat kTextureFormat = wgpu::TextureFormat::R32Uint;
|
constexpr wgpu::TextureFormat kTextureFormat = wgpu::TextureFormat::R32Uint;
|
||||||
|
@ -1037,12 +989,6 @@ class StorageTextureZeroInitTests : public StorageTextureTests {
|
||||||
// Verify that the texture is correctly cleared to 0 before its first usage as a read-only storage
|
// Verify that the texture is correctly cleared to 0 before its first usage as a read-only storage
|
||||||
// texture in a render pass.
|
// texture in a render pass.
|
||||||
TEST_P(StorageTextureZeroInitTests, ReadonlyStorageTextureClearsToZeroInRenderPass) {
|
TEST_P(StorageTextureZeroInitTests, ReadonlyStorageTextureClearsToZeroInRenderPass) {
|
||||||
// When we run dawn_end2end_tests with "--use-spvc-parser", extracting the binding type of a
|
|
||||||
// read-only image will always return shaderc_spvc_binding_type_writeonly_storage_texture.
|
|
||||||
// TODO(jiawei.shao@intel.com): enable this test when we specify "--use-spvc-parser" after the
|
|
||||||
// bug in spvc parser is fixed.
|
|
||||||
DAWN_SKIP_TEST_IF(IsSpvcParserBeingUsed());
|
|
||||||
|
|
||||||
wgpu::Texture readonlyStorageTexture =
|
wgpu::Texture readonlyStorageTexture =
|
||||||
CreateTexture(wgpu::TextureFormat::R32Uint, wgpu::TextureUsage::Storage);
|
CreateTexture(wgpu::TextureFormat::R32Uint, wgpu::TextureUsage::Storage);
|
||||||
|
|
||||||
|
@ -1069,12 +1015,6 @@ TEST_P(StorageTextureZeroInitTests, ReadonlyStorageTextureClearsToZeroInRenderPa
|
||||||
// Verify that the texture is correctly cleared to 0 before its first usage as a read-only storage
|
// Verify that the texture is correctly cleared to 0 before its first usage as a read-only storage
|
||||||
// texture in a compute pass.
|
// texture in a compute pass.
|
||||||
TEST_P(StorageTextureZeroInitTests, ReadonlyStorageTextureClearsToZeroInComputePass) {
|
TEST_P(StorageTextureZeroInitTests, ReadonlyStorageTextureClearsToZeroInComputePass) {
|
||||||
// When we run dawn_end2end_tests with "--use-spvc-parser", extracting the binding type of a
|
|
||||||
// read-only image will always return shaderc_spvc_binding_type_writeonly_storage_texture.
|
|
||||||
// TODO(jiawei.shao@intel.com): enable this test when we specify "--use-spvc-parser" after the
|
|
||||||
// bug in spvc parser is fixed.
|
|
||||||
DAWN_SKIP_TEST_IF(IsSpvcParserBeingUsed());
|
|
||||||
|
|
||||||
wgpu::Texture readonlyStorageTexture =
|
wgpu::Texture readonlyStorageTexture =
|
||||||
CreateTexture(wgpu::TextureFormat::R32Uint, wgpu::TextureUsage::Storage);
|
CreateTexture(wgpu::TextureFormat::R32Uint, wgpu::TextureUsage::Storage);
|
||||||
|
|
||||||
|
@ -1102,12 +1042,6 @@ TEST_P(StorageTextureZeroInitTests, ReadonlyStorageTextureClearsToZeroInComputeP
|
||||||
// Verify that the texture is correctly cleared to 0 before its first usage as a write-only storage
|
// Verify that the texture is correctly cleared to 0 before its first usage as a write-only storage
|
||||||
// storage texture in a render pass.
|
// storage texture in a render pass.
|
||||||
TEST_P(StorageTextureZeroInitTests, WriteonlyStorageTextureClearsToZeroInRenderPass) {
|
TEST_P(StorageTextureZeroInitTests, WriteonlyStorageTextureClearsToZeroInRenderPass) {
|
||||||
// When we run dawn_end2end_tests with "--use-spvc-parser", extracting the binding type of a
|
|
||||||
// read-only image will always return shaderc_spvc_binding_type_writeonly_storage_texture.
|
|
||||||
// TODO(jiawei.shao@intel.com): enable this test when we specify "--use-spvc-parser" after the
|
|
||||||
// bug in spvc parser is fixed.
|
|
||||||
DAWN_SKIP_TEST_IF(IsD3D12() && IsSpvcParserBeingUsed());
|
|
||||||
|
|
||||||
// Prepare the write-only storage texture.
|
// Prepare the write-only storage texture.
|
||||||
constexpr uint32_t kTexelSizeR32Uint = 4u;
|
constexpr uint32_t kTexelSizeR32Uint = 4u;
|
||||||
wgpu::Texture writeonlyStorageTexture = CreateTexture(
|
wgpu::Texture writeonlyStorageTexture = CreateTexture(
|
||||||
|
@ -1121,12 +1055,6 @@ TEST_P(StorageTextureZeroInitTests, WriteonlyStorageTextureClearsToZeroInRenderP
|
||||||
// Verify that the texture is correctly cleared to 0 before its first usage as a write-only storage
|
// Verify that the texture is correctly cleared to 0 before its first usage as a write-only storage
|
||||||
// texture in a compute pass.
|
// texture in a compute pass.
|
||||||
TEST_P(StorageTextureZeroInitTests, WriteonlyStorageTextureClearsToZeroInComputePass) {
|
TEST_P(StorageTextureZeroInitTests, WriteonlyStorageTextureClearsToZeroInComputePass) {
|
||||||
// When we run dawn_end2end_tests with "--use-spvc-parser", extracting the binding type of a
|
|
||||||
// read-only image will always return shaderc_spvc_binding_type_writeonly_storage_texture.
|
|
||||||
// TODO(jiawei.shao@intel.com): enable this test when we specify "--use-spvc-parser" after the
|
|
||||||
// bug in spvc parser is fixed.
|
|
||||||
DAWN_SKIP_TEST_IF(IsD3D12() && IsSpvcParserBeingUsed());
|
|
||||||
|
|
||||||
// Prepare the write-only storage texture.
|
// Prepare the write-only storage texture.
|
||||||
constexpr uint32_t kTexelSizeR32Uint = 4u;
|
constexpr uint32_t kTexelSizeR32Uint = 4u;
|
||||||
wgpu::Texture writeonlyStorageTexture = CreateTexture(
|
wgpu::Texture writeonlyStorageTexture = CreateTexture(
|
||||||
|
|
|
@ -19,15 +19,15 @@
|
||||||
#include "utils/ComboRenderPipelineDescriptor.h"
|
#include "utils/ComboRenderPipelineDescriptor.h"
|
||||||
#include "utils/WGPUHelpers.h"
|
#include "utils/WGPUHelpers.h"
|
||||||
|
|
||||||
|
// TODO(rharrison): Re-enable as part of https://bugs.chromium.org/p/dawn/issues/detail?id=523
|
||||||
|
|
||||||
// Vertex buffer robustness tests that clamping is applied on vertex attributes. This would happen
|
// Vertex buffer robustness tests that clamping is applied on vertex attributes. This would happen
|
||||||
// on backends where vertex pulling is enabled, such as Metal.
|
// on backends where vertex pulling is enabled, such as Metal.
|
||||||
|
|
||||||
class VertexBufferRobustnessTest : public DawnTest {
|
class VertexBufferRobustnessTest : public DawnTest {
|
||||||
protected:
|
protected:
|
||||||
void SetUp() override {
|
void SetUp() override {
|
||||||
DawnTest::SetUp();
|
DawnTest::SetUp();
|
||||||
// SPVC must be used currently, since we rely on the robustness pass in it
|
GTEST_SKIP();
|
||||||
DAWN_SKIP_TEST_IF(!IsSpvcBeingUsed());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Creates a vertex module that tests an expression with given attributes. If successful, the
|
// Creates a vertex module that tests an expression with given attributes. If successful, the
|
||||||
|
|
|
@ -116,7 +116,6 @@ TEST_F(ShaderModuleValidationTest, NoChainedDescriptor) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Test that it is not allowed to use combined texture and sampler.
|
// Test that it is not allowed to use combined texture and sampler.
|
||||||
// TODO(jiawei.shao@intel.com): support extracting combined texture and sampler in spvc.
|
|
||||||
TEST_F(ShaderModuleValidationTest, CombinedTextureAndSampler) {
|
TEST_F(ShaderModuleValidationTest, CombinedTextureAndSampler) {
|
||||||
const char* shader = R"(
|
const char* shader = R"(
|
||||||
#version 450
|
#version 450
|
||||||
|
|
|
@ -42,7 +42,6 @@ endif()
|
||||||
if (NOT TARGET shaderc)
|
if (NOT TARGET shaderc)
|
||||||
set(SHADERC_SKIP_TESTS ON CACHE BOOL "" FORCE)
|
set(SHADERC_SKIP_TESTS ON CACHE BOOL "" FORCE)
|
||||||
set(SHADERC_SKIP_INSTALL ON CACHE BOOL "" FORCE)
|
set(SHADERC_SKIP_INSTALL ON CACHE BOOL "" FORCE)
|
||||||
set(SHADERC_ENABLE_SPVC ON CACHE BOOL "" FORCE)
|
|
||||||
|
|
||||||
# Change the default value of SHADERC_ENABLE_SHARED_CRT to ON as that's what matches the
|
# Change the default value of SHADERC_ENABLE_SHARED_CRT to ON as that's what matches the
|
||||||
# CMake defaults better.
|
# CMake defaults better.
|
||||||
|
@ -50,9 +49,6 @@ if (NOT TARGET shaderc)
|
||||||
option(SHADERC_ENABLE_SHARED_CRT "Use the shared CRT instead of the static CRT" ON CACHE BOOL "" FORCE)
|
option(SHADERC_ENABLE_SHARED_CRT "Use the shared CRT instead of the static CRT" ON CACHE BOOL "" FORCE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Let SPVC's CMakeLists.txt deal with configuring SPIRV-Cross
|
|
||||||
set(SPIRV_CROSS_ENABLE_TESTS OFF CACHE BOOL "" FORCE)
|
|
||||||
|
|
||||||
message(STATUS "Dawn: using shaderc at ${DAWN_SHADERC_DIR}")
|
message(STATUS "Dawn: using shaderc at ${DAWN_SHADERC_DIR}")
|
||||||
add_subdirectory(${DAWN_SHADERC_DIR})
|
add_subdirectory(${DAWN_SHADERC_DIR})
|
||||||
endif()
|
endif()
|
||||||
|
|
Loading…
Reference in New Issue