diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2018-05-03 17:17:05 -0400 |
|---|---|---|
| committer | Tim Foley <tfoleyNV@users.noreply.github.com> | 2018-05-03 14:17:05 -0700 |
| commit | c216f00f1eaff368229cb8430422972fcac801b7 (patch) | |
| tree | c214700d1cbcdf590b2ecd2f50c9d152169275b8 /tools/render-test/render.cpp | |
| parent | 367f3a78a40731da45ee12b9a18c94707f1d1429 (diff) | |
Fixes based on review of vulkan-first-render PR #545 (#546)
Diffstat (limited to 'tools/render-test/render.cpp')
| -rw-r--r-- | tools/render-test/render.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/tools/render-test/render.cpp b/tools/render-test/render.cpp index 6c47a5afe..d366413ca 100644 --- a/tools/render-test/render.cpp +++ b/tools/render-test/render.cpp @@ -6,7 +6,7 @@ namespace renderer_test { using namespace Slang; -/* static */const Resource::BindFlag::Enum Resource::s_requiredBinding[int(Usage::CountOf)] = +/* static */const Resource::BindFlag::Enum Resource::s_requiredBinding[] = { BindFlag::VertexBuffer, // VertexBuffer BindFlag::IndexBuffer, // IndexBuffer @@ -21,6 +21,12 @@ using namespace Slang; BindFlag::Enum(BindFlag::PixelShaderResource | BindFlag::NonPixelShaderResource), // GenericRead }; + +/* static */void Resource::compileTimeAsserts() +{ + SLANG_COMPILE_TIME_ASSERT(SLANG_COUNT_OF(s_requiredBinding) == int(Usage::CountOf)); +} + static const Resource::DescBase s_emptyDescBase = {}; const Resource::DescBase& Resource::getDescBase() const @@ -38,7 +44,7 @@ const Resource::DescBase& Resource::getDescBase() const /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! RendererUtil !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */ -/* static */const uint8_t RendererUtil::s_formatSize[int(Format::CountOf)] = +/* static */const uint8_t RendererUtil::s_formatSize[] = { 0, // Unknown, @@ -53,6 +59,12 @@ const Resource::DescBase& Resource::getDescBase() const uint8_t(sizeof(uint32_t)), // D_Unorm24_S8, }; + +/* static */void RendererUtil::compileTimeAsserts() +{ + SLANG_COMPILE_TIME_ASSERT(SLANG_COUNT_OF(s_formatSize) == int(Format::CountOf)); +} + /* !!!!!!!!!!!!!!!!!!!!!!!!!!! BindingState::Desc !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */ void BindingState::Desc::addSampler(const SamplerDesc& desc, const ShaderBindSet& shaderBindSet) |
