From 58cea79d8622a08b0887dbfda8f8042e42679c8f Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Wed, 29 Jan 2020 09:02:55 -0500 Subject: Feature/test for double behavior (#1186) * Split out binding writing. * Pass in the entry type. * Take into account output type with -output-using-type Added GPULikeBindRoot Added dxbc-double-problem test. * Add the dxbc-double-problem test. --- tools/render-test/shader-input-layout.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'tools/render-test/shader-input-layout.h') diff --git a/tools/render-test/shader-input-layout.h b/tools/render-test/shader-input-layout.h index 3399df848..5b0527e0f 100644 --- a/tools/render-test/shader-input-layout.h +++ b/tools/render-test/shader-input-layout.h @@ -106,8 +106,14 @@ public: /// Put into outBuffer the value buffers that were set via addbindSetValues (which will set m_userIndex to be the entries index) static void getValueBuffers(const Slang::List& entries, const BindSet& bindSet, Slang::List& outBuffers); + /// Writes a binding, if bindRoot is set, will try to honor the underlying type when outputting. If not will dump as uint32_t hex. + static SlangResult writeBinding(BindRoot* bindRoot, const ShaderInputLayoutEntry& entry, const void* data, size_t sizeInBytes, Slang::WriterHelper writer); + + /// Write all bindings, using data from buffers + static SlangResult writeBindings(BindRoot* bindRoot, const ShaderInputLayout& layout, const List& buffers, Slang::WriterHelper writer); + /// Write bindings from values in memory from buffers - static SlangResult writeBindings(const ShaderInputLayout& layout, const Slang::List& buffers, const Slang::String& fileName); + static SlangResult writeBindings(BindRoot* bindRoot, const ShaderInputLayout& layout, const Slang::List& buffers, const Slang::String& fileName); }; void generateTextureDataRGB8(TextureData& output, const InputTextureDesc& desc); -- cgit v1.2.3