Skip to content

Commit

Permalink
Fix order of ByteAddressBuffer offsets in YAML (#275)
Browse files Browse the repository at this point in the history
  • Loading branch information
spencer-lunarg authored Jul 19, 2024
1 parent 1d674a8 commit 90add1d
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 5 deletions.
46 changes: 44 additions & 2 deletions tests/test-spirv-reflect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -792,18 +792,41 @@ TEST_P(SpirvReflectTest, CheckYamlOutput) {
}

namespace {
// TODO - have this glob search all .spv files
const std::vector<const char*> all_spirv_paths = {
// clang-format off
"../tests/16bit/vert_in_out_16.spv",
"../tests/access_chains/array_length_from_access_chain.spv",
"../tests/cbuffer_unused/cbuffer_unused_001.spv",
"../tests/glsl/built_in_format.spv",
"../tests/entry_exec_mode/comp_local_size.spv",
"../tests/entry_exec_mode/geom_inv_out_vert.spv",
"../tests/execution_mode/local_size_id_spec.spv",
"../tests/execution_mode/local_size_id.spv",
"../tests/glsl/buffer_handle_0.spv",
"../tests/glsl/buffer_handle_1.spv",
"../tests/glsl/buffer_handle_2.spv",
"../tests/glsl/buffer_handle_3.spv",
"../tests/glsl/buffer_handle_4.spv",
"../tests/glsl/buffer_handle_5.spv",
"../tests/glsl/buffer_handle_6.spv",
"../tests/glsl/buffer_handle_7.spv",
"../tests/glsl/buffer_handle_8.spv",
"../tests/glsl/buffer_handle_9.spv",
"../tests/glsl/buffer_handle_uvec2_pc.spv",
"../tests/glsl/buffer_handle_uvec2_ssbo.spv",
"../tests/glsl/buffer_pointer.spv",
"../tests/glsl/built_in_format.spv",
"../tests/glsl/fn_struct_param.spv",
"../tests/glsl/frag_array_input.spv",
"../tests/glsl/frag_barycentric.spv",
"../tests/glsl/input_attachment.spv",
"../tests/glsl/io_vars_vs.spv",
"../tests/glsl/matrix_major_order_glsl.spv",
"../tests/glsl/non_writable_image.spv",
"../tests/glsl/readonly_writeonly.spv",
"../tests/glsl/runtime_array_of_array_of_struct.spv",
"../tests/glsl/storage_buffer.spv",
"../tests/glsl/texel_buffer.spv",
"../tests/hlsl/append_consume.spv",
"../tests/hlsl/array_of_structured_buffer.spv",
Expand All @@ -818,13 +841,21 @@ const std::vector<const char*> all_spirv_paths = {
"../tests/hlsl/pushconstant.spv",
"../tests/hlsl/semantics.spv",
"../tests/hlsl/structuredbuffer.spv",
"../tests/hlsl/user_type.spv",
"../tests/interface/geom_input_builtin_array.spv",
"../tests/interface/vertex_input_builtin_block.spv",
"../tests/interface/vertex_input_builtin_non_block.spv",
"../tests/issues/77/hlsl/array_from_ubo.spv",
"../tests/issues/77/hlsl/array_from_ubo_with_O0.spv",
"../tests/issues/77/hlsl/rocketz.spv",
"../tests/issues/102/function_parameter_access.spv",
"../tests/issues/178/vertex_input_struct.spv",
"../tests/issues/178/vertex_input_struct2.spv",
"../tests/issues/227/null_node.spv",
"../tests/mesh_shader_ext/mesh_shader_ext.task.hlsl.spv",
"../tests/mesh_shader_ext/mesh_shader_ext.mesh.hlsl.spv",
"../tests/multi_entrypoint/multi_entrypoint.spv",
"../tests/push_constants/non_zero_block_offset.spv",
"../tests/raytrace/rayquery_equal.cs.spv",
"../tests/raytrace/rayquery_init_ds.spv",
"../tests/raytrace/rayquery_init_gs.spv",
Expand All @@ -846,9 +877,20 @@ const std::vector<const char*> all_spirv_paths = {
"../tests/raytrace/raytracing.nv.library.spv",
"../tests/raytrace/raytracing.nv.miss.spv",
"../tests/raytrace/raytracing.nv.raygen.spv",
"../tests/spec_constants/basic.spv",
"../tests/spec_constants/convert.spv",
"../tests/spec_constants/local_size_id_10.spv",
"../tests/spec_constants/local_size_id_13.spv",
"../tests/spec_constants/ssbo_array.spv",
"../tests/spec_constants/test_32bit.spv",
"../tests/spec_constants/test_64bit.spv",
"../tests/spirv15/VertexShader.spv",
"../tests/mesh_shader_ext/mesh_shader_ext.task.hlsl.spv",
"../tests/mesh_shader_ext/mesh_shader_ext.mesh.hlsl.spv",
"../tests/user_type/byte_address_buffer_0.spv",
"../tests/user_type/byte_address_buffer_1.spv",
"../tests/user_type/byte_address_buffer_2.spv",
"../tests/user_type/byte_address_buffer_3.spv",
"../tests/user_type/rw_byte_address_buffer.spv",
"../tests/variable_access/copy_memory.spv",
// clang-format on
};
} // namespace
Expand Down
2 changes: 1 addition & 1 deletion tests/user_type/byte_address_buffer_0.spv.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ all_descriptor_bindings:
accessed: 1
uav_counter_id: 4294967295
uav_counter_binding:
ByteAddressBuffer offsets: [13, 5, 11, 4]
ByteAddressBuffer offsets: [4, 5, 11, 13]
type_description: *td1
word_offset: { binding: 129, set: 125 }
user_type: ByteAddressBuffer
Expand Down
2 changes: 1 addition & 1 deletion tests/user_type/byte_address_buffer_1.spv.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ all_descriptor_bindings:
accessed: 1
uav_counter_id: 4294967295
uav_counter_binding:
ByteAddressBuffer offsets: [2, 1]
ByteAddressBuffer offsets: [1, 2]
type_description: *td5
word_offset: { binding: 112, set: 108 }
user_type: ByteAddressBuffer
Expand Down
2 changes: 1 addition & 1 deletion tests/user_type/rw_byte_address_buffer.spv.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ all_descriptor_bindings:
accessed: 1
uav_counter_id: 4294967295
uav_counter_binding:
ByteAddressBuffer offsets: [13, 5, 11, 4]
ByteAddressBuffer offsets: [4, 5, 11, 13]
type_description: *td1
word_offset: { binding: 130, set: 126 }
user_type: RWByteAddressBuffer
Expand Down

0 comments on commit 90add1d

Please sign in to comment.