diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2019-09-03 14:36:55 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-09-03 14:36:55 -0400 |
| commit | b5b3a8d36c09631cbd4cf236c0280a314436748d (patch) | |
| tree | 2ae5a848815c9bcdd4006eaa2f81a8317f5df2a9 /tools/render-test/cpu-memory-binding.h | |
| parent | ce5fd43b0c9c60ad85e7c5a54161b37897640ea6 (diff) | |
CPU uniform entry point params (#1041)
* * Made entry point parameters a separate entry point
* Made CPUMemoryBinding work with entry point parameters/initialize constant buffers
* Added isCPUOnly to bindings, because entry point parameters do not layout like constant buffer
* entry-point-uniform.slang works on CPU
* EntryPointParams -> UniformEntryPointParams
Updated CPU documentation.
* Update cpu-target.md to removed completed issues.
* Only allocate CPU buffers if the size is > 0.
Small update to cpu-target doc.
Diffstat (limited to 'tools/render-test/cpu-memory-binding.h')
| -rw-r--r-- | tools/render-test/cpu-memory-binding.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/render-test/cpu-memory-binding.h b/tools/render-test/cpu-memory-binding.h index 9501c1d13..994dacacd 100644 --- a/tools/render-test/cpu-memory-binding.h +++ b/tools/render-test/cpu-memory-binding.h @@ -43,6 +43,8 @@ struct CPUMemoryBinding }; slang::VariableLayoutReflection* getParameterByName(const char* name); + slang::VariableLayoutReflection* getEntryPointParameterByName(const char* name); + Location find(const char* name); @@ -50,7 +52,7 @@ struct CPUMemoryBinding SlangResult setNewBuffer(const Location& location, const void* initialData, size_t sizeInBytes, Buffer& outBuffer); SlangResult setObject(const Location& location, void* object); SlangResult setInplace(const Location& location, const void* data, size_t sizeInBytes); - SlangResult init(slang::ShaderReflection* reflection); + SlangResult init(slang::ShaderReflection* reflection, int entryPointIndex); CPUMemoryBinding(); Buffer _allocateBuffer(size_t size); @@ -61,11 +63,15 @@ struct CPUMemoryBinding Slang::MemoryArena m_arena; ///< Storage for buffers Buffer m_rootBuffer; + Buffer m_entryPointBuffer; slang::ShaderReflection* m_reflection; // All buffers Slang::List<Buffer> m_allBuffers; + + slang::EntryPointReflection* m_entryPoint; + int m_entryPointIndex; }; } // renderer_test |
