summaryrefslogtreecommitdiff
path: root/tools/render-test/resource-d3d12.h
diff options
context:
space:
mode:
authorjsmall-nvidia <jsmall@nvidia.com>2018-04-10 17:53:03 -0400
committerGitHub <noreply@github.com>2018-04-10 17:53:03 -0400
commitc4004b32ca2c0effb455ec847114240db3cb993b (patch)
tree7530f131892e2973929948e61e46e957d38510a2 /tools/render-test/resource-d3d12.h
parent5298ccf7da486d0010c6157974d5dd9a5556f265 (diff)
Feature/dx12 compute (#482)
* Dx12 rendering works in test framework. * Turn on dx12 render tests. * Getting simpler dx12 compute tests to work. * With expected data in test - check for specialized and then for the default, so that multiple test can share the same expected data, but specialized cases can still be set. * Fixed construction and binding on dx12 textures. * Control which render apis used in test from command line. * Small aesthetic fixes in render-test/main.cpp. * Fix binding problem for uavs/srvs dx12. Previously tried to create srv/uav for StorageBuffers (like dx11 does), but the binding breaks as you can end up with two srvs using the same register. First pass at fixing problems with Texture creation for dx12 - assertions were hit with 3d or array textures. * Fixes to improve Dx12 setup shader resource views for cubemaps/arrays. * Fixed d3d12 textureSamplingTest - problem was that cubemap/array textures were not being uploaded correctly. * Changed the order of how binding of constant buffers (as just set on the Renderer) indexes. Previously they were given the lowest indices, but they clashed with the indices from the 'Binding'. Changing this means all tests run on d3d12. * Add code to allow use of warp (although not command line switchable yet). Fix problem setting up raw UAV - as identified by warp. * Added RenderApiUtil - which can detect if a render api is potentially available. * Moved render flag testing/parsing into RenderApiUtil. * Fix signed/unsigned warning. * Fixes around enums prefixed with k on the review of feature/dx12 compute branch.
Diffstat (limited to 'tools/render-test/resource-d3d12.h')
-rw-r--r--tools/render-test/resource-d3d12.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/render-test/resource-d3d12.h b/tools/render-test/resource-d3d12.h
index a6537a7d7..1de915489 100644
--- a/tools/render-test/resource-d3d12.h
+++ b/tools/render-test/resource-d3d12.h
@@ -108,12 +108,12 @@ struct D3D12ResourceBase
/// True if a resource is set
SLANG_FORCE_INLINE bool isSet() const { return m_resource != nullptr; }
- /// Coercable into ID3D12Resource
+ /// Coercible into ID3D12Resource
SLANG_FORCE_INLINE operator ID3D12Resource*() const { return m_resource; }
/// restore previous state
#if SLANG_ENABLE_CONSERVATIVE_RESOURCE_BARRIERS
- NV_FORCE_INLINE Void restore(Dx12BarrierSubmitter& submitter) { transition(m_prevState, submitter); }
+ SLANG_FORCE_INLINE Void restore(D3D12BarrierSubmitter& submitter) { transition(m_prevState, submitter); }
#else
SLANG_FORCE_INLINE void restore(D3D12BarrierSubmitter& submitter) { SLANG_UNUSED(submitter) }
#endif
@@ -132,9 +132,9 @@ protected:
/// This is protected so as clients cannot slice the class, and so state tracking is lost
~D3D12ResourceBase() {}
- ID3D12Resource* m_resource;
- D3D12_RESOURCE_STATES m_state;
- D3D12_RESOURCE_STATES m_prevState;
+ ID3D12Resource* m_resource; ///< The resource (ref counted)
+ D3D12_RESOURCE_STATES m_state; ///< The current tracked expected state, if all associated transitions have completed on ID3D12CommandList
+ D3D12_RESOURCE_STATES m_prevState; ///< The previous state
};
struct D3D12Resource : public D3D12ResourceBase