From c216f00f1eaff368229cb8430422972fcac801b7 Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Thu, 3 May 2018 17:17:05 -0400 Subject: Fixes based on review of vulkan-first-render PR #545 (#546) --- tools/render-test/render.h | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'tools/render-test/render.h') 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 -- cgit v1.2.3