Rework API graphique Vulkan - EnTT pour ECS + Chargement modèle 3D assimp + SDL3 pour events input et fenetre + mesh texture camera transform ok + attention tous les assets nouveaus ne sont pas commités et il y a du code test en dur dans scene addentity + restructuration globale
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
glslangValidator -V -S frag -g0 --ku -o function_parameter_access.spv function_parameter_access.glsl
|
||||
*/
|
||||
|
||||
#version 450
|
||||
|
||||
layout(binding = 0) uniform sampler Sampler;
|
||||
layout(binding = 1) uniform texture2D Texture;
|
||||
layout(binding = 2) uniform sampler2D Sampler2D;
|
||||
|
||||
layout(binding = 3) uniform sampler NeverAccessedSampler;
|
||||
layout(binding = 4) uniform texture2D NeverAccessedTexture;
|
||||
layout(binding = 5) uniform sampler2D NeverAccessedSampler2D;
|
||||
|
||||
layout(location = 0) out vec4 color;
|
||||
|
||||
vec4 access_sampler_and_texture(texture2D t, sampler s, vec2 coord)
|
||||
{
|
||||
vec4 ret = texture(sampler2D(t, s), coord);
|
||||
return vec4(5.0) * ret;
|
||||
}
|
||||
|
||||
vec4 access_combined_sampler(sampler2D s)
|
||||
{
|
||||
vec2 coord = vec2(0.5, 0.5);
|
||||
vec4 ret = texture(s, coord);
|
||||
return vec4(1.0, 2.0, 3.0, 1.0) * ret;
|
||||
}
|
||||
|
||||
vec4 call_access_functions(texture2D t, sampler s)
|
||||
{
|
||||
return access_combined_sampler(Sampler2D) + access_sampler_and_texture(t, s, vec2(0.25, 0.75));
|
||||
}
|
||||
|
||||
vec4 never_called(texture2D t, sampler s, float u, float v)
|
||||
{
|
||||
vec4 ret = texture(sampler2D(t, s), vec2(u, v));
|
||||
return vec4(-3.0) * ret;
|
||||
}
|
||||
|
||||
vec4 never_called_2(vec2 coord)
|
||||
{
|
||||
vec4 ret = texture(sampler2D(NeverAccessedTexture, NeverAccessedSampler), coord);
|
||||
ret *= texture(NeverAccessedSampler2D, coord);
|
||||
return ret;
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
color = vec4(-1.0) * call_access_functions(Texture, Sampler);
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1,327 @@
|
||||
%YAML 1.1
|
||||
---
|
||||
all_type_descriptions:
|
||||
- &td0
|
||||
id: 9
|
||||
op: 26
|
||||
type_name:
|
||||
struct_member_name:
|
||||
storage_class: -1 # NOT APPLICABLE
|
||||
type_flags: 0x00020000 # EXTERNAL_SAMPLER
|
||||
decoration_flags: 0x00000000 # NONE
|
||||
traits:
|
||||
numeric:
|
||||
scalar: { width: 0, signedness: 0 }
|
||||
vector: { component_count: 0 }
|
||||
matrix: { column_count: 0, row_count: 0, stride: 0 }
|
||||
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
|
||||
array: { dims_count: 0, dims: [], stride: 0 }
|
||||
member_count: 0
|
||||
members:
|
||||
- &td1
|
||||
id: 7
|
||||
op: 25
|
||||
type_name:
|
||||
struct_member_name:
|
||||
storage_class: -1 # NOT APPLICABLE
|
||||
type_flags: 0x00010008 # EXTERNAL_IMAGE FLOAT
|
||||
decoration_flags: 0x00000000 # NONE
|
||||
traits:
|
||||
numeric:
|
||||
scalar: { width: 32, signedness: 0 }
|
||||
vector: { component_count: 0 }
|
||||
matrix: { column_count: 0, row_count: 0, stride: 0 }
|
||||
image: { dim: 1, depth: 0, arrayed: 0, ms: 0, sampled: 1, image_format: 0 } # dim=2D image_format=Unknown
|
||||
array: { dims_count: 0, dims: [], stride: 0 }
|
||||
member_count: 0
|
||||
members:
|
||||
- &td2
|
||||
id: 20
|
||||
op: 27
|
||||
type_name:
|
||||
struct_member_name:
|
||||
storage_class: -1 # NOT APPLICABLE
|
||||
type_flags: 0x00050008 # EXTERNAL_SAMPLED_IMAGE EXTERNAL_IMAGE FLOAT
|
||||
decoration_flags: 0x00000000 # NONE
|
||||
traits:
|
||||
numeric:
|
||||
scalar: { width: 32, signedness: 0 }
|
||||
vector: { component_count: 0 }
|
||||
matrix: { column_count: 0, row_count: 0, stride: 0 }
|
||||
image: { dim: 1, depth: 0, arrayed: 0, ms: 0, sampled: 1, image_format: 0 } # dim=2D image_format=Unknown
|
||||
array: { dims_count: 0, dims: [], stride: 0 }
|
||||
member_count: 0
|
||||
members:
|
||||
- &td3
|
||||
id: 13
|
||||
op: 23
|
||||
type_name:
|
||||
struct_member_name:
|
||||
storage_class: -1 # NOT APPLICABLE
|
||||
type_flags: 0x00000108 # VECTOR FLOAT
|
||||
decoration_flags: 0x00000000 # NONE
|
||||
traits:
|
||||
numeric:
|
||||
scalar: { width: 32, signedness: 0 }
|
||||
vector: { component_count: 4 }
|
||||
matrix: { column_count: 0, row_count: 0, stride: 0 }
|
||||
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
|
||||
array: { dims_count: 0, dims: [], stride: 0 }
|
||||
member_count: 0
|
||||
members:
|
||||
all_block_variables:
|
||||
- &bv0
|
||||
name:
|
||||
offset: 0
|
||||
absolute_offset: 0
|
||||
size: 0
|
||||
padded_size: 0
|
||||
decorations: 0x00000000 # NONE
|
||||
numeric:
|
||||
scalar: { width: 0, signedness: 0 }
|
||||
vector: { component_count: 0 }
|
||||
matrix: { column_count: 0, row_count: 0, stride: 0 }
|
||||
array: { dims_count: 0, dims: [], stride: 0 }
|
||||
flags: 0x00000000 # NONE
|
||||
member_count: 0
|
||||
members:
|
||||
type_description:
|
||||
- &bv1
|
||||
name:
|
||||
offset: 0
|
||||
absolute_offset: 0
|
||||
size: 0
|
||||
padded_size: 0
|
||||
decorations: 0x00000000 # NONE
|
||||
numeric:
|
||||
scalar: { width: 0, signedness: 0 }
|
||||
vector: { component_count: 0 }
|
||||
matrix: { column_count: 0, row_count: 0, stride: 0 }
|
||||
array: { dims_count: 0, dims: [], stride: 0 }
|
||||
flags: 0x00000000 # NONE
|
||||
member_count: 0
|
||||
members:
|
||||
type_description:
|
||||
- &bv2
|
||||
name:
|
||||
offset: 0
|
||||
absolute_offset: 0
|
||||
size: 0
|
||||
padded_size: 0
|
||||
decorations: 0x00000000 # NONE
|
||||
numeric:
|
||||
scalar: { width: 0, signedness: 0 }
|
||||
vector: { component_count: 0 }
|
||||
matrix: { column_count: 0, row_count: 0, stride: 0 }
|
||||
array: { dims_count: 0, dims: [], stride: 0 }
|
||||
flags: 0x00000000 # NONE
|
||||
member_count: 0
|
||||
members:
|
||||
type_description:
|
||||
- &bv3
|
||||
name:
|
||||
offset: 0
|
||||
absolute_offset: 0
|
||||
size: 0
|
||||
padded_size: 0
|
||||
decorations: 0x00000000 # NONE
|
||||
numeric:
|
||||
scalar: { width: 0, signedness: 0 }
|
||||
vector: { component_count: 0 }
|
||||
matrix: { column_count: 0, row_count: 0, stride: 0 }
|
||||
array: { dims_count: 0, dims: [], stride: 0 }
|
||||
flags: 0x00000000 # NONE
|
||||
member_count: 0
|
||||
members:
|
||||
type_description:
|
||||
- &bv4
|
||||
name:
|
||||
offset: 0
|
||||
absolute_offset: 0
|
||||
size: 0
|
||||
padded_size: 0
|
||||
decorations: 0x00000000 # NONE
|
||||
numeric:
|
||||
scalar: { width: 0, signedness: 0 }
|
||||
vector: { component_count: 0 }
|
||||
matrix: { column_count: 0, row_count: 0, stride: 0 }
|
||||
array: { dims_count: 0, dims: [], stride: 0 }
|
||||
flags: 0x00000000 # NONE
|
||||
member_count: 0
|
||||
members:
|
||||
type_description:
|
||||
- &bv5
|
||||
name:
|
||||
offset: 0
|
||||
absolute_offset: 0
|
||||
size: 0
|
||||
padded_size: 0
|
||||
decorations: 0x00000000 # NONE
|
||||
numeric:
|
||||
scalar: { width: 0, signedness: 0 }
|
||||
vector: { component_count: 0 }
|
||||
matrix: { column_count: 0, row_count: 0, stride: 0 }
|
||||
array: { dims_count: 0, dims: [], stride: 0 }
|
||||
flags: 0x00000000 # NONE
|
||||
member_count: 0
|
||||
members:
|
||||
type_description:
|
||||
all_descriptor_bindings:
|
||||
- &db0
|
||||
spirv_id: 117
|
||||
name:
|
||||
binding: 0
|
||||
input_attachment_index: 0
|
||||
set: 0
|
||||
decoration_flags: 0x00000000 # NONE
|
||||
descriptor_type: 0 # VK_DESCRIPTOR_TYPE_SAMPLER
|
||||
resource_type: 1 # SAMPLER
|
||||
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
|
||||
block: *bv0 #
|
||||
array: { dims_count: 0, dims: [] }
|
||||
accessed: 1
|
||||
uav_counter_id: 4294967295
|
||||
uav_counter_binding:
|
||||
type_description: *td0
|
||||
word_offset: { binding: 76, set: 72 }
|
||||
- &db1
|
||||
spirv_id: 116
|
||||
name:
|
||||
binding: 1
|
||||
input_attachment_index: 0
|
||||
set: 0
|
||||
decoration_flags: 0x00000000 # NONE
|
||||
descriptor_type: 2 # VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE
|
||||
resource_type: 4 # SRV
|
||||
image: { dim: 1, depth: 0, arrayed: 0, ms: 0, sampled: 1, image_format: 0 } # dim=2D image_format=Unknown
|
||||
block: *bv1 #
|
||||
array: { dims_count: 0, dims: [] }
|
||||
accessed: 1
|
||||
uav_counter_id: 4294967295
|
||||
uav_counter_binding:
|
||||
type_description: *td1
|
||||
word_offset: { binding: 68, set: 64 }
|
||||
- &db2
|
||||
spirv_id: 71
|
||||
name:
|
||||
binding: 2
|
||||
input_attachment_index: 0
|
||||
set: 0
|
||||
decoration_flags: 0x00000000 # NONE
|
||||
descriptor_type: 1 # VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER
|
||||
resource_type: 5 # ???
|
||||
image: { dim: 1, depth: 0, arrayed: 0, ms: 0, sampled: 1, image_format: 0 } # dim=2D image_format=Unknown
|
||||
block: *bv2 #
|
||||
array: { dims_count: 0, dims: [] }
|
||||
accessed: 1
|
||||
uav_counter_id: 4294967295
|
||||
uav_counter_binding:
|
||||
type_description: *td2
|
||||
word_offset: { binding: 32, set: 28 }
|
||||
- &db3
|
||||
spirv_id: 98
|
||||
name:
|
||||
binding: 3
|
||||
input_attachment_index: 0
|
||||
set: 0
|
||||
decoration_flags: 0x00000000 # NONE
|
||||
descriptor_type: 0 # VK_DESCRIPTOR_TYPE_SAMPLER
|
||||
resource_type: 1 # SAMPLER
|
||||
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
|
||||
block: *bv3 #
|
||||
array: { dims_count: 0, dims: [] }
|
||||
accessed: 0
|
||||
uav_counter_id: 4294967295
|
||||
uav_counter_binding:
|
||||
type_description: *td0
|
||||
word_offset: { binding: 48, set: 44 }
|
||||
- &db4
|
||||
spirv_id: 96
|
||||
name:
|
||||
binding: 4
|
||||
input_attachment_index: 0
|
||||
set: 0
|
||||
decoration_flags: 0x00000000 # NONE
|
||||
descriptor_type: 2 # VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE
|
||||
resource_type: 4 # SRV
|
||||
image: { dim: 1, depth: 0, arrayed: 0, ms: 0, sampled: 1, image_format: 0 } # dim=2D image_format=Unknown
|
||||
block: *bv4 #
|
||||
array: { dims_count: 0, dims: [] }
|
||||
accessed: 0
|
||||
uav_counter_id: 4294967295
|
||||
uav_counter_binding:
|
||||
type_description: *td1
|
||||
word_offset: { binding: 40, set: 36 }
|
||||
- &db5
|
||||
spirv_id: 103
|
||||
name:
|
||||
binding: 5
|
||||
input_attachment_index: 0
|
||||
set: 0
|
||||
decoration_flags: 0x00000000 # NONE
|
||||
descriptor_type: 1 # VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER
|
||||
resource_type: 5 # ???
|
||||
image: { dim: 1, depth: 0, arrayed: 0, ms: 0, sampled: 1, image_format: 0 } # dim=2D image_format=Unknown
|
||||
block: *bv5 #
|
||||
array: { dims_count: 0, dims: [] }
|
||||
accessed: 0
|
||||
uav_counter_id: 4294967295
|
||||
uav_counter_binding:
|
||||
type_description: *td2
|
||||
word_offset: { binding: 56, set: 52 }
|
||||
all_interface_variables:
|
||||
- &iv0
|
||||
spirv_id: 113
|
||||
name:
|
||||
location: 0
|
||||
storage_class: 3 # Output
|
||||
semantic:
|
||||
decoration_flags: 0x00000000 # NONE
|
||||
built_in: -1 # ??? (-1)
|
||||
numeric:
|
||||
scalar: { width: 32, signedness: 0 }
|
||||
vector: { component_count: 4 }
|
||||
matrix: { column_count: 0, row_count: 0, stride: 0 }
|
||||
array: { dims_count: 0, dims: [], stride: 0 }
|
||||
member_count: 0
|
||||
members:
|
||||
format: 109 # VK_FORMAT_R32G32B32A32_SFLOAT
|
||||
type_description: *td3
|
||||
word_offset: { location: 60 }
|
||||
module:
|
||||
generator: 8 # Khronos Glslang Reference Front End
|
||||
entry_point_name: "main"
|
||||
entry_point_id: 4
|
||||
source_language: 0 # Unknown
|
||||
source_language_version: 0
|
||||
spirv_execution_model: 4 # Fragment
|
||||
shader_stage: 0x00000010 # PS
|
||||
descriptor_binding_count: 6
|
||||
descriptor_bindings:
|
||||
- *db0 #
|
||||
- *db1 #
|
||||
- *db2 #
|
||||
- *db3 #
|
||||
- *db4 #
|
||||
- *db5 #
|
||||
descriptor_set_count: 1
|
||||
descriptor_sets:
|
||||
- set: 0
|
||||
binding_count: 6
|
||||
bindings:
|
||||
- *db0 #
|
||||
- *db1 #
|
||||
- *db2 #
|
||||
- *db3 #
|
||||
- *db4 #
|
||||
- *db5 #
|
||||
input_variable_count: 0,
|
||||
input_variables:
|
||||
output_variable_count: 1,
|
||||
output_variables:
|
||||
- *iv0 #
|
||||
push_constant_count: 0,
|
||||
push_constants:
|
||||
specialization_constant_count: 0,
|
||||
specialization_constants:
|
||||
...
|
||||
BIN
lib/All/SPIRV-Reflect/tests/issues/178/vertex_input_struct.spv
Normal file
BIN
lib/All/SPIRV-Reflect/tests/issues/178/vertex_input_struct.spv
Normal file
Binary file not shown.
@@ -0,0 +1,137 @@
|
||||
%YAML 1.1
|
||||
---
|
||||
all_type_descriptions:
|
||||
- &td0
|
||||
id: 6
|
||||
op: 22
|
||||
type_name:
|
||||
struct_member_name: "alice"
|
||||
storage_class: 0 # UniformConstant
|
||||
type_flags: 0x00000008 # FLOAT
|
||||
decoration_flags: 0x00000000 # NONE
|
||||
traits:
|
||||
numeric:
|
||||
scalar: { width: 32, signedness: 0 }
|
||||
vector: { component_count: 0 }
|
||||
matrix: { column_count: 0, row_count: 0, stride: 0 }
|
||||
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
|
||||
array: { dims_count: 0, dims: [], stride: 0 }
|
||||
member_count: 0
|
||||
members:
|
||||
- &td1
|
||||
id: 7
|
||||
op: 23
|
||||
type_name:
|
||||
struct_member_name: "bob"
|
||||
storage_class: 0 # UniformConstant
|
||||
type_flags: 0x00000108 # VECTOR FLOAT
|
||||
decoration_flags: 0x00000000 # NONE
|
||||
traits:
|
||||
numeric:
|
||||
scalar: { width: 32, signedness: 0 }
|
||||
vector: { component_count: 4 }
|
||||
matrix: { column_count: 0, row_count: 0, stride: 0 }
|
||||
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
|
||||
array: { dims_count: 0, dims: [], stride: 0 }
|
||||
member_count: 0
|
||||
members:
|
||||
- &td2
|
||||
id: 3
|
||||
op: 30
|
||||
type_name: "Communicators"
|
||||
struct_member_name:
|
||||
storage_class: -1 # NOT APPLICABLE
|
||||
type_flags: 0x10080000 # STRUCT EXTERNAL_BLOCK
|
||||
decoration_flags: 0x00000001 # BLOCK
|
||||
traits:
|
||||
numeric:
|
||||
scalar: { width: 0, signedness: 0 }
|
||||
vector: { component_count: 0 }
|
||||
matrix: { column_count: 0, row_count: 0, stride: 0 }
|
||||
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
|
||||
array: { dims_count: 0, dims: [], stride: 0 }
|
||||
member_count: 2
|
||||
members:
|
||||
- *td0
|
||||
- *td1
|
||||
all_block_variables:
|
||||
all_descriptor_bindings:
|
||||
all_interface_variables:
|
||||
- &iv0
|
||||
spirv_id: 0
|
||||
name:
|
||||
location: 9
|
||||
storage_class: 1 # Input
|
||||
semantic:
|
||||
decoration_flags: 0x00000000 # NONE
|
||||
built_in: 0 # Position
|
||||
numeric:
|
||||
scalar: { width: 32, signedness: 0 }
|
||||
vector: { component_count: 0 }
|
||||
matrix: { column_count: 0, row_count: 0, stride: 0 }
|
||||
array: { dims_count: 0, dims: [], stride: 0 }
|
||||
member_count: 0
|
||||
members:
|
||||
format: 100 # VK_FORMAT_R32_SFLOAT
|
||||
type_description: *td0
|
||||
word_offset: { location: 0 }
|
||||
- &iv1
|
||||
spirv_id: 0
|
||||
name:
|
||||
location: 11
|
||||
storage_class: 1 # Input
|
||||
semantic:
|
||||
decoration_flags: 0x00000000 # NONE
|
||||
built_in: 0 # Position
|
||||
numeric:
|
||||
scalar: { width: 32, signedness: 0 }
|
||||
vector: { component_count: 4 }
|
||||
matrix: { column_count: 0, row_count: 0, stride: 0 }
|
||||
array: { dims_count: 0, dims: [], stride: 0 }
|
||||
member_count: 0
|
||||
members:
|
||||
format: 109 # VK_FORMAT_R32G32B32A32_SFLOAT
|
||||
type_description: *td1
|
||||
word_offset: { location: 0 }
|
||||
- &iv2
|
||||
spirv_id: 2
|
||||
name:
|
||||
location: 4294967295
|
||||
storage_class: 1 # Input
|
||||
semantic:
|
||||
decoration_flags: 0x00000001 # BLOCK
|
||||
built_in: 0, 0 # [Position, Position]
|
||||
numeric:
|
||||
scalar: { width: 0, signedness: 0 }
|
||||
vector: { component_count: 0 }
|
||||
matrix: { column_count: 0, row_count: 0, stride: 0 }
|
||||
array: { dims_count: 0, dims: [], stride: 0 }
|
||||
member_count: 2
|
||||
members:
|
||||
- *iv0 #
|
||||
- *iv1 #
|
||||
format: 0 # VK_FORMAT_UNDEFINED
|
||||
type_description: *td2
|
||||
word_offset: { location: 0 }
|
||||
module:
|
||||
generator: 7 # Khronos SPIR-V Tools Assembler
|
||||
entry_point_name: "main"
|
||||
entry_point_id: 1
|
||||
source_language: 0 # Unknown
|
||||
source_language_version: 0
|
||||
spirv_execution_model: 0 # Vertex
|
||||
shader_stage: 0x00000001 # VS
|
||||
descriptor_binding_count: 0
|
||||
descriptor_bindings:
|
||||
descriptor_set_count: 0
|
||||
descriptor_sets:
|
||||
input_variable_count: 1,
|
||||
input_variables:
|
||||
- *iv2 #
|
||||
output_variable_count: 0,
|
||||
output_variables:
|
||||
push_constant_count: 0,
|
||||
push_constants:
|
||||
specialization_constant_count: 0,
|
||||
specialization_constants:
|
||||
...
|
||||
BIN
lib/All/SPIRV-Reflect/tests/issues/178/vertex_input_struct2.spv
Normal file
BIN
lib/All/SPIRV-Reflect/tests/issues/178/vertex_input_struct2.spv
Normal file
Binary file not shown.
@@ -0,0 +1,174 @@
|
||||
%YAML 1.1
|
||||
---
|
||||
all_type_descriptions:
|
||||
- &td0
|
||||
id: 6
|
||||
op: 22
|
||||
type_name:
|
||||
struct_member_name:
|
||||
storage_class: 0 # UniformConstant
|
||||
type_flags: 0x00000008 # FLOAT
|
||||
decoration_flags: 0x00000000 # NONE
|
||||
traits:
|
||||
numeric:
|
||||
scalar: { width: 32, signedness: 0 }
|
||||
vector: { component_count: 0 }
|
||||
matrix: { column_count: 0, row_count: 0, stride: 0 }
|
||||
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
|
||||
array: { dims_count: 0, dims: [], stride: 0 }
|
||||
member_count: 0
|
||||
members:
|
||||
- &td1
|
||||
id: 7
|
||||
op: 23
|
||||
type_name:
|
||||
struct_member_name:
|
||||
storage_class: 0 # UniformConstant
|
||||
type_flags: 0x00000108 # VECTOR FLOAT
|
||||
decoration_flags: 0x00000000 # NONE
|
||||
traits:
|
||||
numeric:
|
||||
scalar: { width: 32, signedness: 0 }
|
||||
vector: { component_count: 4 }
|
||||
matrix: { column_count: 0, row_count: 0, stride: 0 }
|
||||
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
|
||||
array: { dims_count: 0, dims: [], stride: 0 }
|
||||
member_count: 0
|
||||
members:
|
||||
- &td2
|
||||
id: 11
|
||||
op: 28
|
||||
type_name:
|
||||
struct_member_name:
|
||||
storage_class: 0 # UniformConstant
|
||||
type_flags: 0x20000308 # ARRAY MATRIX VECTOR FLOAT
|
||||
decoration_flags: 0x00000000 # NONE
|
||||
traits:
|
||||
numeric:
|
||||
scalar: { width: 32, signedness: 0 }
|
||||
vector: { component_count: 4 }
|
||||
matrix: { column_count: 2, row_count: 4, stride: 0 }
|
||||
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
|
||||
array: { dims_count: 1, dims: [2,], stride: 0 }
|
||||
member_count: 0
|
||||
members:
|
||||
- &td3
|
||||
id: 3
|
||||
op: 30
|
||||
type_name:
|
||||
struct_member_name:
|
||||
storage_class: -1 # NOT APPLICABLE
|
||||
type_flags: 0x10080000 # STRUCT EXTERNAL_BLOCK
|
||||
decoration_flags: 0x00000001 # BLOCK
|
||||
traits:
|
||||
numeric:
|
||||
scalar: { width: 0, signedness: 0 }
|
||||
vector: { component_count: 0 }
|
||||
matrix: { column_count: 0, row_count: 0, stride: 0 }
|
||||
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
|
||||
array: { dims_count: 0, dims: [], stride: 0 }
|
||||
member_count: 3
|
||||
members:
|
||||
- *td0
|
||||
- *td1
|
||||
- *td2
|
||||
all_block_variables:
|
||||
all_descriptor_bindings:
|
||||
all_interface_variables:
|
||||
- &iv0
|
||||
spirv_id: 0
|
||||
name:
|
||||
location: 2
|
||||
storage_class: 1 # Input
|
||||
semantic:
|
||||
decoration_flags: 0x00000000 # NONE
|
||||
built_in: 0 # Position
|
||||
numeric:
|
||||
scalar: { width: 32, signedness: 0 }
|
||||
vector: { component_count: 0 }
|
||||
matrix: { column_count: 0, row_count: 0, stride: 0 }
|
||||
array: { dims_count: 0, dims: [], stride: 0 }
|
||||
member_count: 0
|
||||
members:
|
||||
format: 100 # VK_FORMAT_R32_SFLOAT
|
||||
type_description: *td0
|
||||
word_offset: { location: 0 }
|
||||
- &iv1
|
||||
spirv_id: 0
|
||||
name:
|
||||
location: 4
|
||||
storage_class: 1 # Input
|
||||
semantic:
|
||||
decoration_flags: 0x00000000 # NONE
|
||||
built_in: 0 # Position
|
||||
numeric:
|
||||
scalar: { width: 32, signedness: 0 }
|
||||
vector: { component_count: 4 }
|
||||
matrix: { column_count: 0, row_count: 0, stride: 0 }
|
||||
array: { dims_count: 0, dims: [], stride: 0 }
|
||||
member_count: 0
|
||||
members:
|
||||
format: 109 # VK_FORMAT_R32G32B32A32_SFLOAT
|
||||
type_description: *td1
|
||||
word_offset: { location: 0 }
|
||||
- &iv2
|
||||
spirv_id: 0
|
||||
name:
|
||||
location: 6
|
||||
storage_class: 1 # Input
|
||||
semantic:
|
||||
decoration_flags: 0x00000000 # NONE
|
||||
built_in: 0 # Position
|
||||
numeric:
|
||||
scalar: { width: 32, signedness: 0 }
|
||||
vector: { component_count: 4 }
|
||||
matrix: { column_count: 2, row_count: 4, stride: 0 }
|
||||
array: { dims_count: 1, dims: [2,], stride: 0 }
|
||||
member_count: 0
|
||||
members:
|
||||
format: 109 # VK_FORMAT_R32G32B32A32_SFLOAT
|
||||
type_description: *td2
|
||||
word_offset: { location: 0 }
|
||||
- &iv3
|
||||
spirv_id: 2
|
||||
name:
|
||||
location: 4294967295
|
||||
storage_class: 1 # Input
|
||||
semantic:
|
||||
decoration_flags: 0x00000001 # BLOCK
|
||||
built_in: 0, 0, 0 # [Position, Position, Position]
|
||||
numeric:
|
||||
scalar: { width: 0, signedness: 0 }
|
||||
vector: { component_count: 0 }
|
||||
matrix: { column_count: 0, row_count: 0, stride: 0 }
|
||||
array: { dims_count: 0, dims: [], stride: 0 }
|
||||
member_count: 3
|
||||
members:
|
||||
- *iv0 #
|
||||
- *iv1 #
|
||||
- *iv2 #
|
||||
format: 0 # VK_FORMAT_UNDEFINED
|
||||
type_description: *td3
|
||||
word_offset: { location: 0 }
|
||||
module:
|
||||
generator: 7 # Khronos SPIR-V Tools Assembler
|
||||
entry_point_name: "main"
|
||||
entry_point_id: 1
|
||||
source_language: 0 # Unknown
|
||||
source_language_version: 0
|
||||
spirv_execution_model: 0 # Vertex
|
||||
shader_stage: 0x00000001 # VS
|
||||
descriptor_binding_count: 0
|
||||
descriptor_bindings:
|
||||
descriptor_set_count: 0
|
||||
descriptor_sets:
|
||||
input_variable_count: 1,
|
||||
input_variables:
|
||||
- *iv3 #
|
||||
output_variable_count: 0,
|
||||
output_variables:
|
||||
push_constant_count: 0,
|
||||
push_constants:
|
||||
specialization_constant_count: 0,
|
||||
specialization_constants:
|
||||
...
|
||||
1
lib/All/SPIRV-Reflect/tests/issues/227/README.md
Normal file
1
lib/All/SPIRV-Reflect/tests/issues/227/README.md
Normal file
@@ -0,0 +1 @@
|
||||
Note that null_node.spv and null_type.spv are not valid SPIR-V inputs, can not be decompiled into GLSL, and are solely provided to prevent regressions for a specific null pointer dereference bug (https://github.com/KhronosGroup/SPIRV-Reflect/issues/227).
|
||||
BIN
lib/All/SPIRV-Reflect/tests/issues/227/null_node.spv
Normal file
BIN
lib/All/SPIRV-Reflect/tests/issues/227/null_node.spv
Normal file
Binary file not shown.
257
lib/All/SPIRV-Reflect/tests/issues/227/null_node.spv.yaml
Normal file
257
lib/All/SPIRV-Reflect/tests/issues/227/null_node.spv.yaml
Normal file
@@ -0,0 +1,257 @@
|
||||
%YAML 1.1
|
||||
---
|
||||
all_type_descriptions:
|
||||
- &td0
|
||||
id: 6
|
||||
op: 22
|
||||
type_name:
|
||||
struct_member_name: "a"
|
||||
storage_class: 0 # UniformConstant
|
||||
type_flags: 0x00000008 # FLOAT
|
||||
decoration_flags: 0x00000000 # NONE
|
||||
traits:
|
||||
numeric:
|
||||
scalar: { width: 32, signedness: 0 }
|
||||
vector: { component_count: 0 }
|
||||
matrix: { column_count: 0, row_count: 0, stride: 0 }
|
||||
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
|
||||
array: { dims_count: 0, dims: [], stride: 0 }
|
||||
member_count: 0
|
||||
members:
|
||||
- &td1
|
||||
id: 7
|
||||
op: 23
|
||||
type_name:
|
||||
struct_member_name: "b"
|
||||
storage_class: 0 # UniformConstant
|
||||
type_flags: 0x00000108 # VECTOR FLOAT
|
||||
decoration_flags: 0x00000000 # NONE
|
||||
traits:
|
||||
numeric:
|
||||
scalar: { width: 32, signedness: 0 }
|
||||
vector: { component_count: 3 }
|
||||
matrix: { column_count: 0, row_count: 0, stride: 0 }
|
||||
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
|
||||
array: { dims_count: 0, dims: [], stride: 0 }
|
||||
member_count: 0
|
||||
members:
|
||||
- &td2
|
||||
id: 8
|
||||
op: 24
|
||||
type_name:
|
||||
struct_member_name: "c"
|
||||
storage_class: 0 # UniformConstant
|
||||
type_flags: 0x00000308 # MATRIX VECTOR FLOAT
|
||||
decoration_flags: 0x00000000 # NONE
|
||||
traits:
|
||||
numeric:
|
||||
scalar: { width: 32, signedness: 0 }
|
||||
vector: { component_count: 3 }
|
||||
matrix: { column_count: 3, row_count: 3, stride: 16 }
|
||||
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
|
||||
array: { dims_count: 0, dims: [], stride: 0 }
|
||||
member_count: 0
|
||||
members:
|
||||
- &td3
|
||||
id: 11
|
||||
op: 28
|
||||
type_name:
|
||||
struct_member_name: "d"
|
||||
storage_class: 0 # UniformConstant
|
||||
type_flags: 0x20000008 # ARRAY FLOAT
|
||||
decoration_flags: 0x00000000 # NONE
|
||||
traits:
|
||||
numeric:
|
||||
scalar: { width: 32, signedness: 0 }
|
||||
vector: { component_count: 0 }
|
||||
matrix: { column_count: 0, row_count: 0, stride: 0 }
|
||||
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
|
||||
array: { dims_count: 1, dims: [4,], stride: 4 }
|
||||
member_count: 0
|
||||
members:
|
||||
- &td4
|
||||
id: 12
|
||||
op: 29
|
||||
type_name:
|
||||
struct_member_name: "e"
|
||||
storage_class: 0 # UniformConstant
|
||||
type_flags: 0x20000008 # ARRAY FLOAT
|
||||
decoration_flags: 0x00000000 # NONE
|
||||
traits:
|
||||
numeric:
|
||||
scalar: { width: 32, signedness: 0 }
|
||||
vector: { component_count: 0 }
|
||||
matrix: { column_count: 0, row_count: 0, stride: 0 }
|
||||
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
|
||||
array: { dims_count: 1, dims: [0,], stride: 4 }
|
||||
member_count: 0
|
||||
members:
|
||||
- &td5
|
||||
id: 13
|
||||
op: 30
|
||||
type_name: "ssbo"
|
||||
struct_member_name:
|
||||
storage_class: -1 # NOT APPLICABLE
|
||||
type_flags: 0x10080000 # STRUCT EXTERNAL_BLOCK
|
||||
decoration_flags: 0x00000001 # BLOCK
|
||||
traits:
|
||||
numeric:
|
||||
scalar: { width: 0, signedness: 0 }
|
||||
vector: { component_count: 0 }
|
||||
matrix: { column_count: 0, row_count: 0, stride: 0 }
|
||||
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
|
||||
array: { dims_count: 0, dims: [], stride: 0 }
|
||||
member_count: 5
|
||||
members:
|
||||
- *td0
|
||||
- *td1
|
||||
- *td2
|
||||
- *td3
|
||||
- *td4
|
||||
all_block_variables:
|
||||
- &bv0
|
||||
name: "a"
|
||||
offset: 0
|
||||
absolute_offset: 0
|
||||
size: 4
|
||||
padded_size: 4
|
||||
decorations: 0x00000000 # NONE
|
||||
numeric:
|
||||
scalar: { width: 32, signedness: 0 }
|
||||
vector: { component_count: 0 }
|
||||
matrix: { column_count: 0, row_count: 0, stride: 0 }
|
||||
array: { dims_count: 0, dims: [], stride: 0 }
|
||||
flags: 0x00000000 # NONE
|
||||
member_count: 0
|
||||
members:
|
||||
type_description: *td0
|
||||
- &bv1
|
||||
name: "b"
|
||||
offset: 16
|
||||
absolute_offset: 16
|
||||
size: 12
|
||||
padded_size: 12
|
||||
decorations: 0x00000000 # NONE
|
||||
numeric:
|
||||
scalar: { width: 32, signedness: 0 }
|
||||
vector: { component_count: 3 }
|
||||
matrix: { column_count: 0, row_count: 0, stride: 0 }
|
||||
array: { dims_count: 0, dims: [], stride: 0 }
|
||||
flags: 0x00000001 # UNUSED
|
||||
member_count: 0
|
||||
members:
|
||||
type_description: *td1
|
||||
- &bv2
|
||||
name: "c"
|
||||
offset: 32
|
||||
absolute_offset: 32
|
||||
size: 48
|
||||
padded_size: 48
|
||||
decorations: 0x00000008 # COLUMN_MAJOR
|
||||
numeric:
|
||||
scalar: { width: 32, signedness: 0 }
|
||||
vector: { component_count: 3 }
|
||||
matrix: { column_count: 3, row_count: 3, stride: 16 }
|
||||
array: { dims_count: 0, dims: [], stride: 0 }
|
||||
flags: 0x00000000 # NONE
|
||||
member_count: 0
|
||||
members:
|
||||
type_description: *td2
|
||||
- &bv3
|
||||
name: "d"
|
||||
offset: 80
|
||||
absolute_offset: 80
|
||||
size: 16
|
||||
padded_size: 16
|
||||
decorations: 0x00000000 # NONE
|
||||
numeric:
|
||||
scalar: { width: 32, signedness: 0 }
|
||||
vector: { component_count: 0 }
|
||||
matrix: { column_count: 0, row_count: 0, stride: 0 }
|
||||
array: { dims_count: 1, dims: [4,], stride: 4 }
|
||||
flags: 0x00000000 # NONE
|
||||
member_count: 0
|
||||
members:
|
||||
type_description: *td3
|
||||
- &bv4
|
||||
name: "e"
|
||||
offset: 96
|
||||
absolute_offset: 96
|
||||
size: 0
|
||||
padded_size: 0
|
||||
decorations: 0x00000000 # NONE
|
||||
numeric:
|
||||
scalar: { width: 32, signedness: 0 }
|
||||
vector: { component_count: 0 }
|
||||
matrix: { column_count: 0, row_count: 0, stride: 0 }
|
||||
array: { dims_count: 0, dims: [], stride: 0 }
|
||||
flags: 0x00000001 # UNUSED
|
||||
member_count: 0
|
||||
members:
|
||||
type_description: *td4
|
||||
- &bv5
|
||||
name: ""
|
||||
offset: 0
|
||||
absolute_offset: 0
|
||||
size: 0
|
||||
padded_size: 0
|
||||
decorations: 0x00000000 # NONE
|
||||
numeric:
|
||||
scalar: { width: 0, signedness: 0 }
|
||||
vector: { component_count: 0 }
|
||||
matrix: { column_count: 0, row_count: 0, stride: 0 }
|
||||
array: { dims_count: 0, dims: [], stride: 0 }
|
||||
flags: 0x00000000 # NONE
|
||||
member_count: 5
|
||||
members:
|
||||
- *bv0
|
||||
- *bv1
|
||||
- *bv2
|
||||
- *bv3
|
||||
- *bv4
|
||||
type_description: *td5
|
||||
all_descriptor_bindings:
|
||||
- &db0
|
||||
spirv_id: 15
|
||||
name: ""
|
||||
binding: 0
|
||||
input_attachment_index: 0
|
||||
set: 0
|
||||
decoration_flags: 0x00000000 # NONE
|
||||
descriptor_type: 7 # VK_DESCRIPTOR_TYPE_STORAGE_BUFFER
|
||||
resource_type: 8 # UAV
|
||||
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
|
||||
block: *bv5 # ""
|
||||
array: { dims_count: 0, dims: [] }
|
||||
accessed: 1
|
||||
uav_counter_id: 4294967295
|
||||
uav_counter_binding:
|
||||
type_description: *td5
|
||||
word_offset: { binding: 114, set: 110 }
|
||||
all_interface_variables:
|
||||
module:
|
||||
generator: 8 # Khronos Glslang Reference Front End
|
||||
entry_point_name: "main"
|
||||
entry_point_id: 4
|
||||
source_language: 2 # GLSL
|
||||
source_language_version: 450
|
||||
spirv_execution_model: 5 # GLCompute
|
||||
shader_stage: 0x00000020 # CS
|
||||
descriptor_binding_count: 1
|
||||
descriptor_bindings:
|
||||
- *db0 # ""
|
||||
descriptor_set_count: 1
|
||||
descriptor_sets:
|
||||
- set: 0
|
||||
binding_count: 1
|
||||
bindings:
|
||||
- *db0 # ""
|
||||
input_variable_count: 0,
|
||||
input_variables:
|
||||
output_variable_count: 0,
|
||||
output_variables:
|
||||
push_constant_count: 0,
|
||||
push_constants:
|
||||
specialization_constant_count: 0,
|
||||
specialization_constants:
|
||||
...
|
||||
14
lib/All/SPIRV-Reflect/tests/issues/68/64_bit_float.glsl
Normal file
14
lib/All/SPIRV-Reflect/tests/issues/68/64_bit_float.glsl
Normal file
@@ -0,0 +1,14 @@
|
||||
#version 460 core
|
||||
#extension GL_ARB_separate_shader_objects : enable
|
||||
|
||||
layout(location=0) in dvec2 position;
|
||||
layout(location=1) in double in_thing;
|
||||
|
||||
layout(location=0) out VertexData {
|
||||
double out_thing;
|
||||
} VertexOut;
|
||||
|
||||
void main() {
|
||||
gl_Position = vec4(position, 0.0, 1.0);
|
||||
VertexOut.out_thing = in_thing;
|
||||
}
|
||||
112
lib/All/SPIRV-Reflect/tests/issues/68/sample_spv.h
Normal file
112
lib/All/SPIRV-Reflect/tests/issues/68/sample_spv.h
Normal file
@@ -0,0 +1,112 @@
|
||||
#ifndef SAMPLE_SPV_H
|
||||
#define SAMPLE_SPV_H
|
||||
|
||||
/* Source from sample.hlsl
|
||||
|
||||
#version 460 core
|
||||
#extension GL_ARB_separate_shader_objects : enable
|
||||
|
||||
layout(location=0) in dvec2 position;
|
||||
layout(location=1) in double in_thing;
|
||||
|
||||
layout(location=0) out VertexData {
|
||||
double out_thing;
|
||||
} VertexOut;
|
||||
|
||||
void main() {
|
||||
gl_Position = vec4(position, 0.0, 1.0);
|
||||
VertexOut.out_thing = in_thing;
|
||||
}
|
||||
|
||||
|
||||
*/
|
||||
|
||||
// Imported from file 'sample.spv'
|
||||
const uint32_t k_sample_spv[] = {
|
||||
0x07230203,0x00010000,0x000d000a,0x00000026,
|
||||
0x00000000,0x00020011,0x00000001,0x00020011,
|
||||
0x0000000a,0x0006000b,0x00000001,0x4c534c47,
|
||||
0x6474732e,0x3035342e,0x00000000,0x0003000e,
|
||||
0x00000000,0x00000001,0x0009000f,0x00000000,
|
||||
0x00000004,0x6e69616d,0x00000000,0x0000000d,
|
||||
0x00000013,0x00000020,0x00000022,0x00030003,
|
||||
0x00000002,0x000001cc,0x00090004,0x415f4c47,
|
||||
0x735f4252,0x72617065,0x5f657461,0x64616873,
|
||||
0x6f5f7265,0x63656a62,0x00007374,0x000a0004,
|
||||
0x475f4c47,0x4c474f4f,0x70635f45,0x74735f70,
|
||||
0x5f656c79,0x656e696c,0x7269645f,0x69746365,
|
||||
0x00006576,0x00080004,0x475f4c47,0x4c474f4f,
|
||||
0x6e695f45,0x64756c63,0x69645f65,0x74636572,
|
||||
0x00657669,0x00040005,0x00000004,0x6e69616d,
|
||||
0x00000000,0x00060005,0x0000000b,0x505f6c67,
|
||||
0x65567265,0x78657472,0x00000000,0x00060006,
|
||||
0x0000000b,0x00000000,0x505f6c67,0x7469736f,
|
||||
0x006e6f69,0x00070006,0x0000000b,0x00000001,
|
||||
0x505f6c67,0x746e696f,0x657a6953,0x00000000,
|
||||
0x00070006,0x0000000b,0x00000002,0x435f6c67,
|
||||
0x4470696c,0x61747369,0x0065636e,0x00070006,
|
||||
0x0000000b,0x00000003,0x435f6c67,0x446c6c75,
|
||||
0x61747369,0x0065636e,0x00030005,0x0000000d,
|
||||
0x00000000,0x00050005,0x00000013,0x69736f70,
|
||||
0x6e6f6974,0x00000000,0x00050005,0x0000001e,
|
||||
0x74726556,0x61447865,0x00006174,0x00060006,
|
||||
0x0000001e,0x00000000,0x5f74756f,0x6e696874,
|
||||
0x00000067,0x00050005,0x00000020,0x74726556,
|
||||
0x754f7865,0x00000074,0x00050005,0x00000022,
|
||||
0x745f6e69,0x676e6968,0x00000000,0x00050048,
|
||||
0x0000000b,0x00000000,0x0000000b,0x00000000,
|
||||
0x00050048,0x0000000b,0x00000001,0x0000000b,
|
||||
0x00000001,0x00050048,0x0000000b,0x00000002,
|
||||
0x0000000b,0x00000003,0x00050048,0x0000000b,
|
||||
0x00000003,0x0000000b,0x00000004,0x00030047,
|
||||
0x0000000b,0x00000002,0x00040047,0x00000013,
|
||||
0x0000001e,0x00000000,0x00030047,0x0000001e,
|
||||
0x00000002,0x00040047,0x00000020,0x0000001e,
|
||||
0x00000000,0x00040047,0x00000022,0x0000001e,
|
||||
0x00000001,0x00020013,0x00000002,0x00030021,
|
||||
0x00000003,0x00000002,0x00030016,0x00000006,
|
||||
0x00000020,0x00040017,0x00000007,0x00000006,
|
||||
0x00000004,0x00040015,0x00000008,0x00000020,
|
||||
0x00000000,0x0004002b,0x00000008,0x00000009,
|
||||
0x00000001,0x0004001c,0x0000000a,0x00000006,
|
||||
0x00000009,0x0006001e,0x0000000b,0x00000007,
|
||||
0x00000006,0x0000000a,0x0000000a,0x00040020,
|
||||
0x0000000c,0x00000003,0x0000000b,0x0004003b,
|
||||
0x0000000c,0x0000000d,0x00000003,0x00040015,
|
||||
0x0000000e,0x00000020,0x00000001,0x0004002b,
|
||||
0x0000000e,0x0000000f,0x00000000,0x00030016,
|
||||
0x00000010,0x00000040,0x00040017,0x00000011,
|
||||
0x00000010,0x00000002,0x00040020,0x00000012,
|
||||
0x00000001,0x00000011,0x0004003b,0x00000012,
|
||||
0x00000013,0x00000001,0x00040017,0x00000015,
|
||||
0x00000006,0x00000002,0x0004002b,0x00000006,
|
||||
0x00000017,0x00000000,0x0004002b,0x00000006,
|
||||
0x00000018,0x3f800000,0x00040020,0x0000001c,
|
||||
0x00000003,0x00000007,0x0003001e,0x0000001e,
|
||||
0x00000010,0x00040020,0x0000001f,0x00000003,
|
||||
0x0000001e,0x0004003b,0x0000001f,0x00000020,
|
||||
0x00000003,0x00040020,0x00000021,0x00000001,
|
||||
0x00000010,0x0004003b,0x00000021,0x00000022,
|
||||
0x00000001,0x00040020,0x00000024,0x00000003,
|
||||
0x00000010,0x00050036,0x00000002,0x00000004,
|
||||
0x00000000,0x00000003,0x000200f8,0x00000005,
|
||||
0x0004003d,0x00000011,0x00000014,0x00000013,
|
||||
0x00040073,0x00000015,0x00000016,0x00000014,
|
||||
0x00050051,0x00000006,0x00000019,0x00000016,
|
||||
0x00000000,0x00050051,0x00000006,0x0000001a,
|
||||
0x00000016,0x00000001,0x00070050,0x00000007,
|
||||
0x0000001b,0x00000019,0x0000001a,0x00000017,
|
||||
0x00000018,0x00050041,0x0000001c,0x0000001d,
|
||||
0x0000000d,0x0000000f,0x0003003e,0x0000001d,
|
||||
0x0000001b,0x0004003d,0x00000010,0x00000023,
|
||||
0x00000022,0x00050041,0x00000024,0x00000025,
|
||||
0x00000020,0x0000000f,0x0003003e,0x00000025,
|
||||
0x00000023,0x000100fd,0x00010038
|
||||
};
|
||||
|
||||
/* SPIRV Disassembly
|
||||
|
||||
|
||||
*/
|
||||
|
||||
#endif // SAMPLE_SPV_H
|
||||
@@ -0,0 +1,38 @@
|
||||
struct S_cbPerObjectBones
|
||||
{
|
||||
float4 v4Bones[4095];
|
||||
};
|
||||
|
||||
shared cbuffer _cbPerObjectBones : register(b4)
|
||||
{
|
||||
S_cbPerObjectBones cbPerObjectBones;
|
||||
};
|
||||
|
||||
struct v2f
|
||||
{
|
||||
float4 HPosition: SV_POSITION;
|
||||
float4 Position: POSITION;
|
||||
};
|
||||
|
||||
struct a2v_StandardWeighted
|
||||
{
|
||||
float4 Position: POSITION0;
|
||||
int4 Indices: BLENDINDICES;
|
||||
};
|
||||
|
||||
float3x4 FailFunc(int4 i, float4 v4Bones[4095])
|
||||
{
|
||||
float4 mRow1 = v4Bones[i.x+0];
|
||||
return float3x4(mRow1, mRow1, mRow1);
|
||||
}
|
||||
|
||||
v2f Test_VS(a2v_StandardWeighted input)
|
||||
{
|
||||
v2f OUT=(v2f)0;
|
||||
float4 inputPosition = float4(input.Position.xyz, 1);
|
||||
int4 i = input.Indices;
|
||||
float3x4 mMatrix = FailFunc(i, cbPerObjectBones.v4Bones);
|
||||
float4 v4Position = float4(mul(mMatrix, inputPosition), 1);
|
||||
OUT.Position = v4Position;
|
||||
return OUT;
|
||||
}
|
||||
BIN
lib/All/SPIRV-Reflect/tests/issues/77/hlsl/array_from_ubo.spv
Normal file
BIN
lib/All/SPIRV-Reflect/tests/issues/77/hlsl/array_from_ubo.spv
Normal file
Binary file not shown.
@@ -0,0 +1,262 @@
|
||||
%YAML 1.1
|
||||
---
|
||||
all_type_descriptions:
|
||||
- &td0
|
||||
id: 9
|
||||
op: 28
|
||||
type_name:
|
||||
struct_member_name: "v4Bones"
|
||||
storage_class: 0 # UniformConstant
|
||||
type_flags: 0x20000108 # ARRAY VECTOR FLOAT
|
||||
decoration_flags: 0x00000000 # NONE
|
||||
traits:
|
||||
numeric:
|
||||
scalar: { width: 32, signedness: 0 }
|
||||
vector: { component_count: 4 }
|
||||
matrix: { column_count: 0, row_count: 0, stride: 0 }
|
||||
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
|
||||
array: { dims_count: 1, dims: [4095,], stride: 16 }
|
||||
member_count: 0
|
||||
members:
|
||||
- &td1
|
||||
id: 7
|
||||
op: 30
|
||||
type_name: "S_cbPerObjectBones"
|
||||
struct_member_name: "cbPerObjectBones"
|
||||
storage_class: 0 # UniformConstant
|
||||
type_flags: 0x10080000 # STRUCT EXTERNAL_BLOCK
|
||||
decoration_flags: 0x00000000 # NONE
|
||||
traits:
|
||||
numeric:
|
||||
scalar: { width: 0, signedness: 0 }
|
||||
vector: { component_count: 0 }
|
||||
matrix: { column_count: 0, row_count: 0, stride: 0 }
|
||||
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
|
||||
array: { dims_count: 0, dims: [], stride: 0 }
|
||||
member_count: 1
|
||||
members:
|
||||
- *td0
|
||||
- &td2
|
||||
id: 6
|
||||
op: 30
|
||||
type_name: "type._cbPerObjectBones"
|
||||
struct_member_name:
|
||||
storage_class: -1 # NOT APPLICABLE
|
||||
type_flags: 0x10080000 # STRUCT EXTERNAL_BLOCK
|
||||
decoration_flags: 0x00000001 # BLOCK
|
||||
traits:
|
||||
numeric:
|
||||
scalar: { width: 0, signedness: 0 }
|
||||
vector: { component_count: 0 }
|
||||
matrix: { column_count: 0, row_count: 0, stride: 0 }
|
||||
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
|
||||
array: { dims_count: 0, dims: [], stride: 0 }
|
||||
member_count: 1
|
||||
members:
|
||||
- *td1
|
||||
- &td3
|
||||
id: 11
|
||||
op: 23
|
||||
type_name:
|
||||
struct_member_name:
|
||||
storage_class: -1 # NOT APPLICABLE
|
||||
type_flags: 0x00000108 # VECTOR FLOAT
|
||||
decoration_flags: 0x00000000 # NONE
|
||||
traits:
|
||||
numeric:
|
||||
scalar: { width: 32, signedness: 0 }
|
||||
vector: { component_count: 4 }
|
||||
matrix: { column_count: 0, row_count: 0, stride: 0 }
|
||||
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
|
||||
array: { dims_count: 0, dims: [], stride: 0 }
|
||||
member_count: 0
|
||||
members:
|
||||
- &td4
|
||||
id: 19
|
||||
op: 23
|
||||
type_name:
|
||||
struct_member_name:
|
||||
storage_class: -1 # NOT APPLICABLE
|
||||
type_flags: 0x00000104 # VECTOR INT
|
||||
decoration_flags: 0x00000000 # NONE
|
||||
traits:
|
||||
numeric:
|
||||
scalar: { width: 32, signedness: 1 }
|
||||
vector: { component_count: 4 }
|
||||
matrix: { column_count: 0, row_count: 0, stride: 0 }
|
||||
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
|
||||
array: { dims_count: 0, dims: [], stride: 0 }
|
||||
member_count: 0
|
||||
members:
|
||||
all_block_variables:
|
||||
- &bv0
|
||||
name: "v4Bones"
|
||||
offset: 0
|
||||
absolute_offset: 0
|
||||
size: 65520
|
||||
padded_size: 65520
|
||||
decorations: 0x00000000 # NONE
|
||||
numeric:
|
||||
scalar: { width: 32, signedness: 0 }
|
||||
vector: { component_count: 4 }
|
||||
matrix: { column_count: 0, row_count: 0, stride: 0 }
|
||||
array: { dims_count: 1, dims: [4095,], stride: 16 }
|
||||
flags: 0x00000000 # NONE
|
||||
member_count: 0
|
||||
members:
|
||||
type_description: *td0
|
||||
- &bv1
|
||||
name: "cbPerObjectBones"
|
||||
offset: 0
|
||||
absolute_offset: 0
|
||||
size: 65520
|
||||
padded_size: 65520
|
||||
decorations: 0x00000000 # NONE
|
||||
numeric:
|
||||
scalar: { width: 0, signedness: 0 }
|
||||
vector: { component_count: 0 }
|
||||
matrix: { column_count: 0, row_count: 0, stride: 0 }
|
||||
array: { dims_count: 0, dims: [], stride: 0 }
|
||||
flags: 0x00000000 # NONE
|
||||
member_count: 1
|
||||
members:
|
||||
- *bv0
|
||||
type_description: *td1
|
||||
- &bv2
|
||||
name: "_cbPerObjectBones"
|
||||
offset: 0
|
||||
absolute_offset: 0
|
||||
size: 65520
|
||||
padded_size: 65520
|
||||
decorations: 0x00000000 # NONE
|
||||
numeric:
|
||||
scalar: { width: 0, signedness: 0 }
|
||||
vector: { component_count: 0 }
|
||||
matrix: { column_count: 0, row_count: 0, stride: 0 }
|
||||
array: { dims_count: 0, dims: [], stride: 0 }
|
||||
flags: 0x00000000 # NONE
|
||||
member_count: 1
|
||||
members:
|
||||
- *bv1
|
||||
type_description: *td2
|
||||
all_descriptor_bindings:
|
||||
- &db0
|
||||
spirv_id: 8
|
||||
name: "_cbPerObjectBones"
|
||||
binding: 4
|
||||
input_attachment_index: 0
|
||||
set: 0
|
||||
decoration_flags: 0x00000000 # NONE
|
||||
descriptor_type: 6 # VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER
|
||||
resource_type: 2 # CBV
|
||||
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
|
||||
block: *bv2 # "_cbPerObjectBones"
|
||||
array: { dims_count: 0, dims: [] }
|
||||
accessed: 1
|
||||
uav_counter_id: 4294967295
|
||||
uav_counter_binding:
|
||||
type_description: *td2
|
||||
word_offset: { binding: 105, set: 101 }
|
||||
all_interface_variables:
|
||||
- &iv0
|
||||
spirv_id: 2
|
||||
name: "in.var.POSITION0"
|
||||
location: 0
|
||||
storage_class: 1 # Input
|
||||
semantic:
|
||||
decoration_flags: 0x00000000 # NONE
|
||||
built_in: -1 # ??? (-1)
|
||||
numeric:
|
||||
scalar: { width: 32, signedness: 0 }
|
||||
vector: { component_count: 4 }
|
||||
matrix: { column_count: 0, row_count: 0, stride: 0 }
|
||||
array: { dims_count: 0, dims: [], stride: 0 }
|
||||
member_count: 0
|
||||
members:
|
||||
format: 109 # VK_FORMAT_R32G32B32A32_SFLOAT
|
||||
type_description: *td3
|
||||
word_offset: { location: 89 }
|
||||
- &iv1
|
||||
spirv_id: 3
|
||||
name: "in.var.BLENDINDICES"
|
||||
location: 1
|
||||
storage_class: 1 # Input
|
||||
semantic:
|
||||
decoration_flags: 0x00000000 # NONE
|
||||
built_in: -1 # ??? (-1)
|
||||
numeric:
|
||||
scalar: { width: 32, signedness: 1 }
|
||||
vector: { component_count: 4 }
|
||||
matrix: { column_count: 0, row_count: 0, stride: 0 }
|
||||
array: { dims_count: 0, dims: [], stride: 0 }
|
||||
member_count: 0
|
||||
members:
|
||||
format: 108 # VK_FORMAT_R32G32B32A32_SINT
|
||||
type_description: *td4
|
||||
word_offset: { location: 93 }
|
||||
- &iv2
|
||||
spirv_id: 4
|
||||
name:
|
||||
location: 4294967295
|
||||
storage_class: 3 # Output
|
||||
semantic:
|
||||
decoration_flags: 0x00000010 # BUILT_IN
|
||||
built_in: 0 # Position
|
||||
numeric:
|
||||
scalar: { width: 32, signedness: 0 }
|
||||
vector: { component_count: 4 }
|
||||
matrix: { column_count: 0, row_count: 0, stride: 0 }
|
||||
array: { dims_count: 0, dims: [], stride: 0 }
|
||||
member_count: 0
|
||||
members:
|
||||
format: 109 # VK_FORMAT_R32G32B32A32_SFLOAT
|
||||
type_description: *td3
|
||||
word_offset: { location: 0 }
|
||||
- &iv3
|
||||
spirv_id: 5
|
||||
name: "out.var.POSITION"
|
||||
location: 0
|
||||
storage_class: 3 # Output
|
||||
semantic:
|
||||
decoration_flags: 0x00000000 # NONE
|
||||
built_in: -1 # ??? (-1)
|
||||
numeric:
|
||||
scalar: { width: 32, signedness: 0 }
|
||||
vector: { component_count: 4 }
|
||||
matrix: { column_count: 0, row_count: 0, stride: 0 }
|
||||
array: { dims_count: 0, dims: [], stride: 0 }
|
||||
member_count: 0
|
||||
members:
|
||||
format: 109 # VK_FORMAT_R32G32B32A32_SFLOAT
|
||||
type_description: *td3
|
||||
word_offset: { location: 97 }
|
||||
module:
|
||||
generator: 14 # Google spiregg
|
||||
entry_point_name: "Test_VS"
|
||||
entry_point_id: 1
|
||||
source_language: 5 # HLSL
|
||||
source_language_version: 600
|
||||
spirv_execution_model: 0 # Vertex
|
||||
shader_stage: 0x00000001 # VS
|
||||
descriptor_binding_count: 1
|
||||
descriptor_bindings:
|
||||
- *db0 # "_cbPerObjectBones"
|
||||
descriptor_set_count: 1
|
||||
descriptor_sets:
|
||||
- set: 0
|
||||
binding_count: 1
|
||||
bindings:
|
||||
- *db0 # "_cbPerObjectBones"
|
||||
input_variable_count: 2,
|
||||
input_variables:
|
||||
- *iv0 # "in.var.POSITION0"
|
||||
- *iv1 # "in.var.BLENDINDICES"
|
||||
output_variable_count: 2,
|
||||
output_variables:
|
||||
- *iv2 #
|
||||
- *iv3 # "out.var.POSITION"
|
||||
push_constant_count: 0,
|
||||
push_constants:
|
||||
specialization_constant_count: 0,
|
||||
specialization_constants:
|
||||
...
|
||||
Binary file not shown.
@@ -0,0 +1,262 @@
|
||||
%YAML 1.1
|
||||
---
|
||||
all_type_descriptions:
|
||||
- &td0
|
||||
id: 18
|
||||
op: 28
|
||||
type_name:
|
||||
struct_member_name: "v4Bones"
|
||||
storage_class: 0 # UniformConstant
|
||||
type_flags: 0x20000108 # ARRAY VECTOR FLOAT
|
||||
decoration_flags: 0x00000000 # NONE
|
||||
traits:
|
||||
numeric:
|
||||
scalar: { width: 32, signedness: 0 }
|
||||
vector: { component_count: 4 }
|
||||
matrix: { column_count: 0, row_count: 0, stride: 0 }
|
||||
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
|
||||
array: { dims_count: 1, dims: [4095,], stride: 16 }
|
||||
member_count: 0
|
||||
members:
|
||||
- &td1
|
||||
id: 17
|
||||
op: 30
|
||||
type_name: "S_cbPerObjectBones"
|
||||
struct_member_name: "cbPerObjectBones"
|
||||
storage_class: 0 # UniformConstant
|
||||
type_flags: 0x10080000 # STRUCT EXTERNAL_BLOCK
|
||||
decoration_flags: 0x00000000 # NONE
|
||||
traits:
|
||||
numeric:
|
||||
scalar: { width: 0, signedness: 0 }
|
||||
vector: { component_count: 0 }
|
||||
matrix: { column_count: 0, row_count: 0, stride: 0 }
|
||||
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
|
||||
array: { dims_count: 0, dims: [], stride: 0 }
|
||||
member_count: 1
|
||||
members:
|
||||
- *td0
|
||||
- &td2
|
||||
id: 16
|
||||
op: 30
|
||||
type_name: "type._cbPerObjectBones"
|
||||
struct_member_name:
|
||||
storage_class: -1 # NOT APPLICABLE
|
||||
type_flags: 0x10080000 # STRUCT EXTERNAL_BLOCK
|
||||
decoration_flags: 0x00000001 # BLOCK
|
||||
traits:
|
||||
numeric:
|
||||
scalar: { width: 0, signedness: 0 }
|
||||
vector: { component_count: 0 }
|
||||
matrix: { column_count: 0, row_count: 0, stride: 0 }
|
||||
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
|
||||
array: { dims_count: 0, dims: [], stride: 0 }
|
||||
member_count: 1
|
||||
members:
|
||||
- *td1
|
||||
- &td3
|
||||
id: 8
|
||||
op: 23
|
||||
type_name:
|
||||
struct_member_name:
|
||||
storage_class: -1 # NOT APPLICABLE
|
||||
type_flags: 0x00000108 # VECTOR FLOAT
|
||||
decoration_flags: 0x00000000 # NONE
|
||||
traits:
|
||||
numeric:
|
||||
scalar: { width: 32, signedness: 0 }
|
||||
vector: { component_count: 4 }
|
||||
matrix: { column_count: 0, row_count: 0, stride: 0 }
|
||||
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
|
||||
array: { dims_count: 0, dims: [], stride: 0 }
|
||||
member_count: 0
|
||||
members:
|
||||
- &td4
|
||||
id: 23
|
||||
op: 23
|
||||
type_name:
|
||||
struct_member_name:
|
||||
storage_class: -1 # NOT APPLICABLE
|
||||
type_flags: 0x00000104 # VECTOR INT
|
||||
decoration_flags: 0x00000000 # NONE
|
||||
traits:
|
||||
numeric:
|
||||
scalar: { width: 32, signedness: 1 }
|
||||
vector: { component_count: 4 }
|
||||
matrix: { column_count: 0, row_count: 0, stride: 0 }
|
||||
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
|
||||
array: { dims_count: 0, dims: [], stride: 0 }
|
||||
member_count: 0
|
||||
members:
|
||||
all_block_variables:
|
||||
- &bv0
|
||||
name: "v4Bones"
|
||||
offset: 0
|
||||
absolute_offset: 0
|
||||
size: 65520
|
||||
padded_size: 65520
|
||||
decorations: 0x00000000 # NONE
|
||||
numeric:
|
||||
scalar: { width: 32, signedness: 0 }
|
||||
vector: { component_count: 4 }
|
||||
matrix: { column_count: 0, row_count: 0, stride: 0 }
|
||||
array: { dims_count: 1, dims: [4095,], stride: 16 }
|
||||
flags: 0x00000000 # NONE
|
||||
member_count: 0
|
||||
members:
|
||||
type_description: *td0
|
||||
- &bv1
|
||||
name: "cbPerObjectBones"
|
||||
offset: 0
|
||||
absolute_offset: 0
|
||||
size: 65520
|
||||
padded_size: 65520
|
||||
decorations: 0x00000000 # NONE
|
||||
numeric:
|
||||
scalar: { width: 0, signedness: 0 }
|
||||
vector: { component_count: 0 }
|
||||
matrix: { column_count: 0, row_count: 0, stride: 0 }
|
||||
array: { dims_count: 0, dims: [], stride: 0 }
|
||||
flags: 0x00000000 # NONE
|
||||
member_count: 1
|
||||
members:
|
||||
- *bv0
|
||||
type_description: *td1
|
||||
- &bv2
|
||||
name: "_cbPerObjectBones"
|
||||
offset: 0
|
||||
absolute_offset: 0
|
||||
size: 65520
|
||||
padded_size: 65520
|
||||
decorations: 0x00000000 # NONE
|
||||
numeric:
|
||||
scalar: { width: 0, signedness: 0 }
|
||||
vector: { component_count: 0 }
|
||||
matrix: { column_count: 0, row_count: 0, stride: 0 }
|
||||
array: { dims_count: 0, dims: [], stride: 0 }
|
||||
flags: 0x00000000 # NONE
|
||||
member_count: 1
|
||||
members:
|
||||
- *bv1
|
||||
type_description: *td2
|
||||
all_descriptor_bindings:
|
||||
- &db0
|
||||
spirv_id: 6
|
||||
name: "_cbPerObjectBones"
|
||||
binding: 4
|
||||
input_attachment_index: 0
|
||||
set: 0
|
||||
decoration_flags: 0x00000000 # NONE
|
||||
descriptor_type: 6 # VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER
|
||||
resource_type: 2 # CBV
|
||||
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
|
||||
block: *bv2 # "_cbPerObjectBones"
|
||||
array: { dims_count: 0, dims: [] }
|
||||
accessed: 1
|
||||
uav_counter_id: 4294967295
|
||||
uav_counter_binding:
|
||||
type_description: *td2
|
||||
word_offset: { binding: 213, set: 209 }
|
||||
all_interface_variables:
|
||||
- &iv0
|
||||
spirv_id: 2
|
||||
name: "in.var.POSITION0"
|
||||
location: 0
|
||||
storage_class: 1 # Input
|
||||
semantic:
|
||||
decoration_flags: 0x00000000 # NONE
|
||||
built_in: -1 # ??? (-1)
|
||||
numeric:
|
||||
scalar: { width: 32, signedness: 0 }
|
||||
vector: { component_count: 4 }
|
||||
matrix: { column_count: 0, row_count: 0, stride: 0 }
|
||||
array: { dims_count: 0, dims: [], stride: 0 }
|
||||
member_count: 0
|
||||
members:
|
||||
format: 109 # VK_FORMAT_R32G32B32A32_SFLOAT
|
||||
type_description: *td3
|
||||
word_offset: { location: 197 }
|
||||
- &iv1
|
||||
spirv_id: 3
|
||||
name: "in.var.BLENDINDICES"
|
||||
location: 1
|
||||
storage_class: 1 # Input
|
||||
semantic:
|
||||
decoration_flags: 0x00000000 # NONE
|
||||
built_in: -1 # ??? (-1)
|
||||
numeric:
|
||||
scalar: { width: 32, signedness: 1 }
|
||||
vector: { component_count: 4 }
|
||||
matrix: { column_count: 0, row_count: 0, stride: 0 }
|
||||
array: { dims_count: 0, dims: [], stride: 0 }
|
||||
member_count: 0
|
||||
members:
|
||||
format: 108 # VK_FORMAT_R32G32B32A32_SINT
|
||||
type_description: *td4
|
||||
word_offset: { location: 201 }
|
||||
- &iv2
|
||||
spirv_id: 4
|
||||
name:
|
||||
location: 4294967295
|
||||
storage_class: 3 # Output
|
||||
semantic:
|
||||
decoration_flags: 0x00000010 # BUILT_IN
|
||||
built_in: 0 # Position
|
||||
numeric:
|
||||
scalar: { width: 32, signedness: 0 }
|
||||
vector: { component_count: 4 }
|
||||
matrix: { column_count: 0, row_count: 0, stride: 0 }
|
||||
array: { dims_count: 0, dims: [], stride: 0 }
|
||||
member_count: 0
|
||||
members:
|
||||
format: 109 # VK_FORMAT_R32G32B32A32_SFLOAT
|
||||
type_description: *td3
|
||||
word_offset: { location: 0 }
|
||||
- &iv3
|
||||
spirv_id: 5
|
||||
name: "out.var.POSITION"
|
||||
location: 0
|
||||
storage_class: 3 # Output
|
||||
semantic:
|
||||
decoration_flags: 0x00000000 # NONE
|
||||
built_in: -1 # ??? (-1)
|
||||
numeric:
|
||||
scalar: { width: 32, signedness: 0 }
|
||||
vector: { component_count: 4 }
|
||||
matrix: { column_count: 0, row_count: 0, stride: 0 }
|
||||
array: { dims_count: 0, dims: [], stride: 0 }
|
||||
member_count: 0
|
||||
members:
|
||||
format: 109 # VK_FORMAT_R32G32B32A32_SFLOAT
|
||||
type_description: *td3
|
||||
word_offset: { location: 205 }
|
||||
module:
|
||||
generator: 14 # Google spiregg
|
||||
entry_point_name: "Test_VS"
|
||||
entry_point_id: 1
|
||||
source_language: 5 # HLSL
|
||||
source_language_version: 600
|
||||
spirv_execution_model: 0 # Vertex
|
||||
shader_stage: 0x00000001 # VS
|
||||
descriptor_binding_count: 1
|
||||
descriptor_bindings:
|
||||
- *db0 # "_cbPerObjectBones"
|
||||
descriptor_set_count: 1
|
||||
descriptor_sets:
|
||||
- set: 0
|
||||
binding_count: 1
|
||||
bindings:
|
||||
- *db0 # "_cbPerObjectBones"
|
||||
input_variable_count: 2,
|
||||
input_variables:
|
||||
- *iv0 # "in.var.POSITION0"
|
||||
- *iv1 # "in.var.BLENDINDICES"
|
||||
output_variable_count: 2,
|
||||
output_variables:
|
||||
- *iv2 #
|
||||
- *iv3 # "out.var.POSITION"
|
||||
push_constant_count: 0,
|
||||
push_constants:
|
||||
specialization_constant_count: 0,
|
||||
specialization_constants:
|
||||
...
|
||||
42
lib/All/SPIRV-Reflect/tests/issues/77/hlsl/rocketz.hlsl
Normal file
42
lib/All/SPIRV-Reflect/tests/issues/77/hlsl/rocketz.hlsl
Normal file
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
|
||||
Compile command:
|
||||
dxc.exe -T vs_6_0 -spirv -E Test_VS -Fo rocketz.spv rocketz.hlsl
|
||||
|
||||
*/
|
||||
|
||||
struct S_cbPerObjectBones {
|
||||
float4 v4Bones[4095];
|
||||
};
|
||||
|
||||
shared cbuffer _cbPerObjectBones : register(b4)
|
||||
{
|
||||
S_cbPerObjectBones cbPerObjectBones;
|
||||
};
|
||||
|
||||
struct v2f {
|
||||
float4 HPosition : SV_POSITION;
|
||||
float4 Position : POSITION;
|
||||
};
|
||||
|
||||
struct a2v_StandardWeighted {
|
||||
float4 Position : POSITION0;
|
||||
int4 Indices : BLENDINDICES;
|
||||
};
|
||||
|
||||
float3x4 FailFunc(int4 i, float4 v4Bones[4095])
|
||||
{
|
||||
float4 mRow1 = v4Bones[i.x + 0];
|
||||
return float3x4(mRow1, mRow1, mRow1);
|
||||
}
|
||||
|
||||
v2f Test_VS(a2v_StandardWeighted input)
|
||||
{
|
||||
v2f OUT = (v2f)0;
|
||||
float4 inputPosition = float4(input.Position.xyz, 1);
|
||||
int4 i = input.Indices;
|
||||
float3x4 mMatrix = FailFunc(i, cbPerObjectBones.v4Bones);
|
||||
float4 v4Position = float4(mul(mMatrix, inputPosition), 1);
|
||||
OUT.Position = v4Position;
|
||||
return OUT;
|
||||
}
|
||||
BIN
lib/All/SPIRV-Reflect/tests/issues/77/hlsl/rocketz.spv
Normal file
BIN
lib/All/SPIRV-Reflect/tests/issues/77/hlsl/rocketz.spv
Normal file
Binary file not shown.
262
lib/All/SPIRV-Reflect/tests/issues/77/hlsl/rocketz.spv.yaml
Normal file
262
lib/All/SPIRV-Reflect/tests/issues/77/hlsl/rocketz.spv.yaml
Normal file
@@ -0,0 +1,262 @@
|
||||
%YAML 1.1
|
||||
---
|
||||
all_type_descriptions:
|
||||
- &td0
|
||||
id: 9
|
||||
op: 28
|
||||
type_name:
|
||||
struct_member_name: "v4Bones"
|
||||
storage_class: 0 # UniformConstant
|
||||
type_flags: 0x20000108 # ARRAY VECTOR FLOAT
|
||||
decoration_flags: 0x00000000 # NONE
|
||||
traits:
|
||||
numeric:
|
||||
scalar: { width: 32, signedness: 0 }
|
||||
vector: { component_count: 4 }
|
||||
matrix: { column_count: 0, row_count: 0, stride: 0 }
|
||||
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
|
||||
array: { dims_count: 1, dims: [4095,], stride: 16 }
|
||||
member_count: 0
|
||||
members:
|
||||
- &td1
|
||||
id: 7
|
||||
op: 30
|
||||
type_name: "S_cbPerObjectBones"
|
||||
struct_member_name: "cbPerObjectBones"
|
||||
storage_class: 0 # UniformConstant
|
||||
type_flags: 0x10080000 # STRUCT EXTERNAL_BLOCK
|
||||
decoration_flags: 0x00000000 # NONE
|
||||
traits:
|
||||
numeric:
|
||||
scalar: { width: 0, signedness: 0 }
|
||||
vector: { component_count: 0 }
|
||||
matrix: { column_count: 0, row_count: 0, stride: 0 }
|
||||
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
|
||||
array: { dims_count: 0, dims: [], stride: 0 }
|
||||
member_count: 1
|
||||
members:
|
||||
- *td0
|
||||
- &td2
|
||||
id: 6
|
||||
op: 30
|
||||
type_name: "type._cbPerObjectBones"
|
||||
struct_member_name:
|
||||
storage_class: -1 # NOT APPLICABLE
|
||||
type_flags: 0x10080000 # STRUCT EXTERNAL_BLOCK
|
||||
decoration_flags: 0x00000001 # BLOCK
|
||||
traits:
|
||||
numeric:
|
||||
scalar: { width: 0, signedness: 0 }
|
||||
vector: { component_count: 0 }
|
||||
matrix: { column_count: 0, row_count: 0, stride: 0 }
|
||||
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
|
||||
array: { dims_count: 0, dims: [], stride: 0 }
|
||||
member_count: 1
|
||||
members:
|
||||
- *td1
|
||||
- &td3
|
||||
id: 11
|
||||
op: 23
|
||||
type_name:
|
||||
struct_member_name:
|
||||
storage_class: -1 # NOT APPLICABLE
|
||||
type_flags: 0x00000108 # VECTOR FLOAT
|
||||
decoration_flags: 0x00000000 # NONE
|
||||
traits:
|
||||
numeric:
|
||||
scalar: { width: 32, signedness: 0 }
|
||||
vector: { component_count: 4 }
|
||||
matrix: { column_count: 0, row_count: 0, stride: 0 }
|
||||
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
|
||||
array: { dims_count: 0, dims: [], stride: 0 }
|
||||
member_count: 0
|
||||
members:
|
||||
- &td4
|
||||
id: 19
|
||||
op: 23
|
||||
type_name:
|
||||
struct_member_name:
|
||||
storage_class: -1 # NOT APPLICABLE
|
||||
type_flags: 0x00000104 # VECTOR INT
|
||||
decoration_flags: 0x00000000 # NONE
|
||||
traits:
|
||||
numeric:
|
||||
scalar: { width: 32, signedness: 1 }
|
||||
vector: { component_count: 4 }
|
||||
matrix: { column_count: 0, row_count: 0, stride: 0 }
|
||||
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
|
||||
array: { dims_count: 0, dims: [], stride: 0 }
|
||||
member_count: 0
|
||||
members:
|
||||
all_block_variables:
|
||||
- &bv0
|
||||
name: "v4Bones"
|
||||
offset: 0
|
||||
absolute_offset: 0
|
||||
size: 65520
|
||||
padded_size: 65520
|
||||
decorations: 0x00000000 # NONE
|
||||
numeric:
|
||||
scalar: { width: 32, signedness: 0 }
|
||||
vector: { component_count: 4 }
|
||||
matrix: { column_count: 0, row_count: 0, stride: 0 }
|
||||
array: { dims_count: 1, dims: [4095,], stride: 16 }
|
||||
flags: 0x00000000 # NONE
|
||||
member_count: 0
|
||||
members:
|
||||
type_description: *td0
|
||||
- &bv1
|
||||
name: "cbPerObjectBones"
|
||||
offset: 0
|
||||
absolute_offset: 0
|
||||
size: 65520
|
||||
padded_size: 65520
|
||||
decorations: 0x00000000 # NONE
|
||||
numeric:
|
||||
scalar: { width: 0, signedness: 0 }
|
||||
vector: { component_count: 0 }
|
||||
matrix: { column_count: 0, row_count: 0, stride: 0 }
|
||||
array: { dims_count: 0, dims: [], stride: 0 }
|
||||
flags: 0x00000000 # NONE
|
||||
member_count: 1
|
||||
members:
|
||||
- *bv0
|
||||
type_description: *td1
|
||||
- &bv2
|
||||
name: "_cbPerObjectBones"
|
||||
offset: 0
|
||||
absolute_offset: 0
|
||||
size: 65520
|
||||
padded_size: 65520
|
||||
decorations: 0x00000000 # NONE
|
||||
numeric:
|
||||
scalar: { width: 0, signedness: 0 }
|
||||
vector: { component_count: 0 }
|
||||
matrix: { column_count: 0, row_count: 0, stride: 0 }
|
||||
array: { dims_count: 0, dims: [], stride: 0 }
|
||||
flags: 0x00000000 # NONE
|
||||
member_count: 1
|
||||
members:
|
||||
- *bv1
|
||||
type_description: *td2
|
||||
all_descriptor_bindings:
|
||||
- &db0
|
||||
spirv_id: 8
|
||||
name: "_cbPerObjectBones"
|
||||
binding: 4
|
||||
input_attachment_index: 0
|
||||
set: 0
|
||||
decoration_flags: 0x00000000 # NONE
|
||||
descriptor_type: 6 # VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER
|
||||
resource_type: 2 # CBV
|
||||
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
|
||||
block: *bv2 # "_cbPerObjectBones"
|
||||
array: { dims_count: 0, dims: [] }
|
||||
accessed: 1
|
||||
uav_counter_id: 4294967295
|
||||
uav_counter_binding:
|
||||
type_description: *td2
|
||||
word_offset: { binding: 105, set: 101 }
|
||||
all_interface_variables:
|
||||
- &iv0
|
||||
spirv_id: 2
|
||||
name: "in.var.POSITION0"
|
||||
location: 0
|
||||
storage_class: 1 # Input
|
||||
semantic:
|
||||
decoration_flags: 0x00000000 # NONE
|
||||
built_in: -1 # ??? (-1)
|
||||
numeric:
|
||||
scalar: { width: 32, signedness: 0 }
|
||||
vector: { component_count: 4 }
|
||||
matrix: { column_count: 0, row_count: 0, stride: 0 }
|
||||
array: { dims_count: 0, dims: [], stride: 0 }
|
||||
member_count: 0
|
||||
members:
|
||||
format: 109 # VK_FORMAT_R32G32B32A32_SFLOAT
|
||||
type_description: *td3
|
||||
word_offset: { location: 89 }
|
||||
- &iv1
|
||||
spirv_id: 3
|
||||
name: "in.var.BLENDINDICES"
|
||||
location: 1
|
||||
storage_class: 1 # Input
|
||||
semantic:
|
||||
decoration_flags: 0x00000000 # NONE
|
||||
built_in: -1 # ??? (-1)
|
||||
numeric:
|
||||
scalar: { width: 32, signedness: 1 }
|
||||
vector: { component_count: 4 }
|
||||
matrix: { column_count: 0, row_count: 0, stride: 0 }
|
||||
array: { dims_count: 0, dims: [], stride: 0 }
|
||||
member_count: 0
|
||||
members:
|
||||
format: 108 # VK_FORMAT_R32G32B32A32_SINT
|
||||
type_description: *td4
|
||||
word_offset: { location: 93 }
|
||||
- &iv2
|
||||
spirv_id: 4
|
||||
name:
|
||||
location: 4294967295
|
||||
storage_class: 3 # Output
|
||||
semantic:
|
||||
decoration_flags: 0x00000010 # BUILT_IN
|
||||
built_in: 0 # Position
|
||||
numeric:
|
||||
scalar: { width: 32, signedness: 0 }
|
||||
vector: { component_count: 4 }
|
||||
matrix: { column_count: 0, row_count: 0, stride: 0 }
|
||||
array: { dims_count: 0, dims: [], stride: 0 }
|
||||
member_count: 0
|
||||
members:
|
||||
format: 109 # VK_FORMAT_R32G32B32A32_SFLOAT
|
||||
type_description: *td3
|
||||
word_offset: { location: 0 }
|
||||
- &iv3
|
||||
spirv_id: 5
|
||||
name: "out.var.POSITION"
|
||||
location: 0
|
||||
storage_class: 3 # Output
|
||||
semantic:
|
||||
decoration_flags: 0x00000000 # NONE
|
||||
built_in: -1 # ??? (-1)
|
||||
numeric:
|
||||
scalar: { width: 32, signedness: 0 }
|
||||
vector: { component_count: 4 }
|
||||
matrix: { column_count: 0, row_count: 0, stride: 0 }
|
||||
array: { dims_count: 0, dims: [], stride: 0 }
|
||||
member_count: 0
|
||||
members:
|
||||
format: 109 # VK_FORMAT_R32G32B32A32_SFLOAT
|
||||
type_description: *td3
|
||||
word_offset: { location: 97 }
|
||||
module:
|
||||
generator: 14 # Google spiregg
|
||||
entry_point_name: "Test_VS"
|
||||
entry_point_id: 1
|
||||
source_language: 5 # HLSL
|
||||
source_language_version: 600
|
||||
spirv_execution_model: 0 # Vertex
|
||||
shader_stage: 0x00000001 # VS
|
||||
descriptor_binding_count: 1
|
||||
descriptor_bindings:
|
||||
- *db0 # "_cbPerObjectBones"
|
||||
descriptor_set_count: 1
|
||||
descriptor_sets:
|
||||
- set: 0
|
||||
binding_count: 1
|
||||
bindings:
|
||||
- *db0 # "_cbPerObjectBones"
|
||||
input_variable_count: 2,
|
||||
input_variables:
|
||||
- *iv0 # "in.var.POSITION0"
|
||||
- *iv1 # "in.var.BLENDINDICES"
|
||||
output_variable_count: 2,
|
||||
output_variables:
|
||||
- *iv2 #
|
||||
- *iv3 # "out.var.POSITION"
|
||||
push_constant_count: 0,
|
||||
push_constants:
|
||||
specialization_constant_count: 0,
|
||||
specialization_constants:
|
||||
...
|
||||
Reference in New Issue
Block a user