c: allow access to gl_plain_uniforms resources

This commit is contained in:
chyyran 2024-08-31 17:02:30 -04:00
parent dae7a689d9
commit b2171de6e5
3 changed files with 10 additions and 2 deletions

View File

@ -246,7 +246,7 @@ set(spirv-cross-util-sources
${CMAKE_CURRENT_SOURCE_DIR}/spirv_cross_util.hpp) ${CMAKE_CURRENT_SOURCE_DIR}/spirv_cross_util.hpp)
set(spirv-cross-abi-major 0) set(spirv-cross-abi-major 0)
set(spirv-cross-abi-minor 62) set(spirv-cross-abi-minor 63)
set(spirv-cross-abi-patch 0) set(spirv-cross-abi-patch 0)
set(SPIRV_CROSS_VERSION ${spirv-cross-abi-major}.${spirv-cross-abi-minor}.${spirv-cross-abi-patch}) set(SPIRV_CROSS_VERSION ${spirv-cross-abi-major}.${spirv-cross-abi-minor}.${spirv-cross-abi-patch})

View File

@ -198,6 +198,8 @@ struct spvc_resources_s : ScratchMemoryAllocation
SmallVector<spvc_reflected_resource> separate_images; SmallVector<spvc_reflected_resource> separate_images;
SmallVector<spvc_reflected_resource> separate_samplers; SmallVector<spvc_reflected_resource> separate_samplers;
SmallVector<spvc_reflected_resource> acceleration_structures; SmallVector<spvc_reflected_resource> acceleration_structures;
SmallVector<spvc_reflected_resource> gl_plain_uniforms;
SmallVector<spvc_reflected_builtin_resource> builtin_inputs; SmallVector<spvc_reflected_builtin_resource> builtin_inputs;
SmallVector<spvc_reflected_builtin_resource> builtin_outputs; SmallVector<spvc_reflected_builtin_resource> builtin_outputs;
@ -1855,6 +1857,8 @@ bool spvc_resources_s::copy_resources(const ShaderResources &resources)
return false; return false;
if (!copy_resources(acceleration_structures, resources.acceleration_structures)) if (!copy_resources(acceleration_structures, resources.acceleration_structures))
return false; return false;
if (!copy_resources(gl_plain_uniforms, resources.gl_plain_uniforms))
return false;
if (!copy_resources(builtin_inputs, resources.builtin_inputs)) if (!copy_resources(builtin_inputs, resources.builtin_inputs))
return false; return false;
if (!copy_resources(builtin_outputs, resources.builtin_outputs)) if (!copy_resources(builtin_outputs, resources.builtin_outputs))
@ -2006,6 +2010,9 @@ spvc_result spvc_resources_get_resource_list_for_type(spvc_resources resources,
list = &resources->shader_record_buffers; list = &resources->shader_record_buffers;
break; break;
case SPVC_RESOURCE_TYPE_GL_PLAIN_UNIFORM:
list = &resources->gl_plain_uniforms;
default: default:
break; break;
} }

View File

@ -40,7 +40,7 @@ extern "C" {
/* Bumped if ABI or API breaks backwards compatibility. */ /* Bumped if ABI or API breaks backwards compatibility. */
#define SPVC_C_API_VERSION_MAJOR 0 #define SPVC_C_API_VERSION_MAJOR 0
/* Bumped if APIs or enumerations are added in a backwards compatible way. */ /* Bumped if APIs or enumerations are added in a backwards compatible way. */
#define SPVC_C_API_VERSION_MINOR 62 #define SPVC_C_API_VERSION_MINOR 63
/* Bumped if internal implementation details change. */ /* Bumped if internal implementation details change. */
#define SPVC_C_API_VERSION_PATCH 0 #define SPVC_C_API_VERSION_PATCH 0
@ -226,6 +226,7 @@ typedef enum spvc_resource_type
SPVC_RESOURCE_TYPE_ACCELERATION_STRUCTURE = 12, SPVC_RESOURCE_TYPE_ACCELERATION_STRUCTURE = 12,
SPVC_RESOURCE_TYPE_RAY_QUERY = 13, SPVC_RESOURCE_TYPE_RAY_QUERY = 13,
SPVC_RESOURCE_TYPE_SHADER_RECORD_BUFFER = 14, SPVC_RESOURCE_TYPE_SHADER_RECORD_BUFFER = 14,
SPVC_RESOURCE_TYPE_GL_PLAIN_UNIFORM = 15,
SPVC_RESOURCE_TYPE_INT_MAX = 0x7fffffff SPVC_RESOURCE_TYPE_INT_MAX = 0x7fffffff
} spvc_resource_type; } spvc_resource_type;