From d6130baa8528c0a5b2e1b10b87fe02d8fc1a1b1a Mon Sep 17 00:00:00 2001 From: Yong He Date: Mon, 20 Nov 2017 05:28:22 -0500 Subject: fixup global generic parameters 1. simplify RoundUpToAlignment() 2. add new a render-compute test case to cover the situation where the entry-point interface (parameter/return types of an entry-point function) is dependent on the global generic type. 3. initial fixes to get this test case to compile (but is not producing correct HLSL output yet) --- tools/render-test/render-d3d11.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'tools/render-test/render-d3d11.cpp') diff --git a/tools/render-test/render-d3d11.cpp b/tools/render-test/render-d3d11.cpp index cdd6c778e..d0280a770 100644 --- a/tools/render-test/render-d3d11.cpp +++ b/tools/render-test/render-d3d11.cpp @@ -457,10 +457,7 @@ public: UInt RoundUpToAlignment(UInt size, UInt alignment) { - if (size % alignment) - return (size / alignment + 1) * alignment; - else - return Math::Max(size, alignment); + return ((size + alignment - 1) / alignment) * alignment; } virtual Buffer* createBuffer(BufferDesc const& desc) override -- cgit v1.2.3