Skip to content

Commit

Permalink
c: allow access to gl_plain_uniforms resources
Browse files Browse the repository at this point in the history
  • Loading branch information
chyyran committed Aug 31, 2024
1 parent dae7a68 commit f895458
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions spirv_cross_c.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,8 @@ struct spvc_resources_s : ScratchMemoryAllocation
SmallVector<spvc_reflected_resource> separate_images;
SmallVector<spvc_reflected_resource> separate_samplers;
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_outputs;

Expand Down Expand Up @@ -1855,6 +1857,8 @@ bool spvc_resources_s::copy_resources(const ShaderResources &resources)
return false;
if (!copy_resources(acceleration_structures, resources.acceleration_structures))
return false;
if (!copy_resources(gl_plain_uniforms, resources.gl_plain_uniforms))
return false;
if (!copy_resources(builtin_inputs, resources.builtin_inputs))
return false;
if (!copy_resources(builtin_outputs, resources.builtin_outputs))
Expand Down Expand Up @@ -2006,6 +2010,9 @@ spvc_result spvc_resources_get_resource_list_for_type(spvc_resources resources,
list = &resources->shader_record_buffers;
break;

case SPVC_RESOURCE_TYPE_GL_PLAIN_UNIFORM:
list = &resources->gl_plain_uniforms;

default:
break;
}
Expand Down
1 change: 1 addition & 0 deletions spirv_cross_c.h
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ typedef enum spvc_resource_type
SPVC_RESOURCE_TYPE_ACCELERATION_STRUCTURE = 12,
SPVC_RESOURCE_TYPE_RAY_QUERY = 13,
SPVC_RESOURCE_TYPE_SHADER_RECORD_BUFFER = 14,
SPVC_RESOURCE_TYPE_GL_PLAIN_UNIFORM = 15,
SPVC_RESOURCE_TYPE_INT_MAX = 0x7fffffff
} spvc_resource_type;

Expand Down

0 comments on commit f895458

Please sign in to comment.