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.h | |
| parent | 367f3a78a40731da45ee12b9a18c94707f1d1429 (diff) | |
Fixes based on review of vulkan-first-render PR #545 (#546)
Diffstat (limited to 'tools/render-test/render.h')
| -rw-r--r-- | tools/render-test/render.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/tools/render-test/render.h b/tools/render-test/render.h index 64857dc4f..d4385979a 100644 --- a/tools/render-test/render.h +++ b/tools/render-test/render.h @@ -214,13 +214,15 @@ class Resource: public Slang::RefObject bool canBind(BindFlag::Enum bindFlag) const { return getDescBase().canBind(bindFlag); } /// For a usage gives the required binding flags - static const BindFlag::Enum s_requiredBinding[int(Usage::CountOf)]; + static const BindFlag::Enum s_requiredBinding[]; /// Maps Usage to bind flags required protected: Resource(Type type): m_type(type) {} + static void compileTimeAsserts(); + Type m_type; }; @@ -336,10 +338,10 @@ class TextureResource: public Resource /// forall (depth levels) struct Data { - ptrdiff_t* mipRowStrides; /// The row stride for a mip map - int numMips; ///< The number of mip maps - const void*const* subResources; ///< Pointers to each full mip subResource - int numSubResources; /// The total amount of subResources. Typically = numMips * depth * arraySize + ptrdiff_t* mipRowStrides; ///< The row stride for a mip map + int numMips; ///< The number of mip maps + const void*const* subResources; ///< Pointers to each full mip subResource + int numSubResources; ///< The total amount of subResources. Typically = numMips * depth * arraySize }; /// Get the description of the texture @@ -598,7 +600,8 @@ struct RendererUtil static void getIdentityProjection(ProjectionStyle style, float projMatrix[16]); private: - static const uint8_t s_formatSize[int(Format::CountOf)]; + static void compileTimeAsserts(); + static const uint8_t s_formatSize[]; // Maps Format::XXX to a size in bytes; }; } // renderer_test |
