summaryrefslogtreecommitdiffstats
path: root/tools/render-test/d3d-util.cpp
diff options
context:
space:
mode:
authorjsmall-nvidia <jsmall@nvidia.com>2018-04-17 16:59:03 -0400
committerGitHub <noreply@github.com>2018-04-17 16:59:03 -0400
commit00389a127af8db18a3ec8fe7ad2dd114a65ac024 (patch)
tree7fa57f2f30a399f03a7967a8534eb212744de5cc /tools/render-test/d3d-util.cpp
parent15bff9162530113b426664eb0c1deb7ea9e3a90d (diff)
Feature/renderer binding (#489)
* Dx12 rendering works in test framework. * Turn on dx12 render tests. * First pass at Resource and TextureResource/BufferResource types. * Fix bug in Dx11 impl for BufferResource. * Dx12 supports TextureResource and binds using TextureResource type, and all tests pass. * Added TextureBuffer::Size type to make handling mips a little simpler. * Small improvements to Dx12 constant buffer binding Removed k prefix on an enum * First pass impl of dx11 createTextureResource Added setDefaults to TextureResource::Desc and BufferResource::Desc to simplify setup accessFlags -> cpuAccessFlags desc -> srcDesc * Split out generateTextureResource - can produce the texture using createTextureResource on the Renderer. * Added support for read mapping to Dx11 accessFlags -> cpuAccessFlags First pass at using TextureResource/BufferResource on Dx11 Some tests fail with this checkin * TextureResource working on all tests on dx11. * Construct ResourceBuffers on Dx11 and Dx12 using utility function createInputBufferResource. * First pass at OpenGl TextureResource * Small fixes to dx12 and dx11 setup. Gl working working using BufferResource and TextureResource * Tidy up around the compareSampler - looks like the previous test was incorrect. * Small documentation /naming improvements. * Fix some more small documentation issues.
Diffstat (limited to 'tools/render-test/d3d-util.cpp')
-rw-r--r--tools/render-test/d3d-util.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/tools/render-test/d3d-util.cpp b/tools/render-test/d3d-util.cpp
index 09e0891f9..70ccadddb 100644
--- a/tools/render-test/d3d-util.cpp
+++ b/tools/render-test/d3d-util.cpp
@@ -26,12 +26,11 @@ using namespace Slang;
{
switch (format)
{
- case Format::RGB_Float32:
- return DXGI_FORMAT_R32G32B32_FLOAT;
- case Format::RG_Float32:
- return DXGI_FORMAT_R32G32_FLOAT;
- default:
- return DXGI_FORMAT_UNKNOWN;
+ case Format::RGB_Float32: return DXGI_FORMAT_R32G32B32_FLOAT;
+ case Format::RG_Float32: return DXGI_FORMAT_R32G32_FLOAT;
+ case Format::R_Float32: return DXGI_FORMAT_R32_FLOAT;
+ case Format::RGBA_Unorm_UInt8: return DXGI_FORMAT_R8G8B8A8_UNORM;
+ default: return DXGI_FORMAT_UNKNOWN;
}
}