This repository has been archived by the owner on Sep 2, 2024. It is now read-only.
Add missing resources types to ShaderResources. #1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Updates to SPIRV-Cross have introduced new types to
ShaderResources
that are not currently available in this crate. One of which wasgl_plain_uniforms
which meant that GLSL uniforms that were not declared in a UBO could not be accessed or renamed. See KhronosGroup/SPIRV-Cross#2190 for details about that issue.This pull request adds the missing fields and updates the wrapper code to set them. This also involved updating the bindings to use the new wrapper fields. The fields added are
acceleration_structures
,gl_plain_uniforms
andshader_record_buffers
. Due to this,ShaderResources
now contains all fields from it's corresponding structure in SPIRV-Cross except for the builtin values.As this added new publicly accessible fields to
ShaderResources
, this introduces a major change for semantic version compatibility. However, this pull request does not require that the dependency on SPIRV-Cross be updated as the fields were already included in the version of SPIRV-Cross that is currently in use by this crate.I decided not to contribute this to the original spirv_cross crate as that crate was so outdated and depended on an older version of SPIRV-Cross that did not have the fields I wanted to use. Instead, I though that I would contribute it here in case it was useful as this crate seems to be more up-to-date.