From 2bf87743ffe73f041036ae62c8bf53f09215ca53 Mon Sep 17 00:00:00 2001 From: Tim Foley Date: Fri, 14 Jul 2017 10:44:42 -0700 Subject: Don't assign a `binding` to a `push_constant` buffer Fixes #12 - This was a latent issue, but the previous commit brought it to the front. - As indicated in #12, I don't allocate a descriptor-table slot to the block - Instead I allocate a `PushConstantBuffer` - Unlike what #12 asks for, I don't use a different resource type for the contents of the block - Pretty much all the logic is easiest if these continue to be just plain `Uniform` data --- slang.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'slang.h') diff --git a/slang.h b/slang.h index 84dc9d547..70f070816 100644 --- a/slang.h +++ b/slang.h @@ -440,6 +440,7 @@ extern "C" enum { SLANG_PARAMETER_CATEGORY_NONE, + SLANG_PARAMETER_CATEGORY_MIXED, SLANG_PARAMETER_CATEGORY_CONSTANT_BUFFER, SLANG_PARAMETER_CATEGORY_SHADER_RESOURCE, SLANG_PARAMETER_CATEGORY_UNORDERED_ACCESS, @@ -449,7 +450,10 @@ extern "C" SLANG_PARAMETER_CATEGORY_UNIFORM, SLANG_PARAMETER_CATEGORY_DESCRIPTOR_TABLE_SLOT, SLANG_PARAMETER_CATEGORY_SPECIALIZATION_CONSTANT, - SLANG_PARAMETER_CATEGORY_MIXED, + SLANG_PARAMETER_CATEGORY_PUSH_CONSTANT_BUFFER, + + // + SLANG_PARAMETER_CATEGORY_COUNT, }; typedef SlangUInt32 SlangStage; @@ -686,6 +690,7 @@ namespace slang { // TODO: these aren't scoped... None = SLANG_PARAMETER_CATEGORY_NONE, + Mixed = SLANG_PARAMETER_CATEGORY_MIXED, ConstantBuffer = SLANG_PARAMETER_CATEGORY_CONSTANT_BUFFER, ShaderResource = SLANG_PARAMETER_CATEGORY_SHADER_RESOURCE, UnorderedAccess = SLANG_PARAMETER_CATEGORY_UNORDERED_ACCESS, @@ -695,7 +700,7 @@ namespace slang Uniform = SLANG_PARAMETER_CATEGORY_UNIFORM, DescriptorTableSlot = SLANG_PARAMETER_CATEGORY_DESCRIPTOR_TABLE_SLOT, SpecializationConstant = SLANG_PARAMETER_CATEGORY_SPECIALIZATION_CONSTANT, - Mixed = SLANG_PARAMETER_CATEGORY_MIXED, + PushConstantBuffer = SLANG_PARAMETER_CATEGORY_PUSH_CONSTANT_BUFFER, }; struct TypeLayoutReflection -- cgit v1.2.3