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:
13
lib/All/SPIRV-Reflect/tests/spec_constants/basic.comp
Normal file
13
lib/All/SPIRV-Reflect/tests/spec_constants/basic.comp
Normal file
@@ -0,0 +1,13 @@
|
||||
#version 450
|
||||
|
||||
layout(constant_id = 3) const int SIZE = 2;
|
||||
|
||||
layout(set = 0, binding = 0, std430) buffer SSBO {
|
||||
float val[SIZE];
|
||||
float dummy;
|
||||
} ssbo;
|
||||
|
||||
void main() {
|
||||
ssbo.val[0] = 0.0;
|
||||
}
|
||||
|
||||
BIN
lib/All/SPIRV-Reflect/tests/spec_constants/basic.spv
Normal file
BIN
lib/All/SPIRV-Reflect/tests/spec_constants/basic.spv
Normal file
Binary file not shown.
155
lib/All/SPIRV-Reflect/tests/spec_constants/basic.spv.yaml
Normal file
155
lib/All/SPIRV-Reflect/tests/spec_constants/basic.spv.yaml
Normal file
@@ -0,0 +1,155 @@
|
||||
%YAML 1.1
|
||||
---
|
||||
all_type_descriptions:
|
||||
- &td0
|
||||
id: 9
|
||||
op: 28
|
||||
type_name:
|
||||
struct_member_name: "val"
|
||||
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: [2,], stride: 4 }
|
||||
member_count: 0
|
||||
members:
|
||||
- &td1
|
||||
id: 6
|
||||
op: 22
|
||||
type_name:
|
||||
struct_member_name: "dummy"
|
||||
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:
|
||||
- &td2
|
||||
id: 10
|
||||
op: 30
|
||||
type_name: "SSBO"
|
||||
struct_member_name:
|
||||
storage_class: -1 # NOT APPLICABLE
|
||||
type_flags: 0x10080000 # STRUCT EXTERNAL_BLOCK
|
||||
decoration_flags: 0x00000002 # BUFFER_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:
|
||||
- &bv0
|
||||
name: "val"
|
||||
offset: 0
|
||||
absolute_offset: 0
|
||||
size: 8
|
||||
padded_size: 8
|
||||
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: [2,], stride: 4 }
|
||||
flags: 0x00000000 # NONE
|
||||
member_count: 0
|
||||
members:
|
||||
type_description: *td0
|
||||
- &bv1
|
||||
name: "dummy"
|
||||
offset: 8
|
||||
absolute_offset: 8
|
||||
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: 0x00000001 # UNUSED
|
||||
member_count: 0
|
||||
members:
|
||||
type_description: *td1
|
||||
- &bv2
|
||||
name: "ssbo"
|
||||
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: 2
|
||||
members:
|
||||
- *bv0
|
||||
- *bv1
|
||||
type_description: *td2
|
||||
all_descriptor_bindings:
|
||||
- &db0
|
||||
spirv_id: 12
|
||||
name: "ssbo"
|
||||
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: *bv2 # "ssbo"
|
||||
array: { dims_count: 0, dims: [] }
|
||||
accessed: 1
|
||||
uav_counter_id: 4294967295
|
||||
uav_counter_binding:
|
||||
type_description: *td2
|
||||
word_offset: { binding: 83, set: 79 }
|
||||
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 # "ssbo"
|
||||
descriptor_set_count: 1
|
||||
descriptor_sets:
|
||||
- set: 0
|
||||
binding_count: 1
|
||||
bindings:
|
||||
- *db0 # "ssbo"
|
||||
input_variable_count: 0,
|
||||
input_variables:
|
||||
output_variable_count: 0,
|
||||
output_variables:
|
||||
push_constant_count: 0,
|
||||
push_constants:
|
||||
specialization_constant_count: 1,
|
||||
specialization_constants:
|
||||
- name: "SIZE"
|
||||
spirv_id: 8
|
||||
constant_id: 3
|
||||
...
|
||||
34
lib/All/SPIRV-Reflect/tests/spec_constants/convert.comp
Normal file
34
lib/All/SPIRV-Reflect/tests/spec_constants/convert.comp
Normal file
@@ -0,0 +1,34 @@
|
||||
#version 450
|
||||
|
||||
#extension GL_EXT_shader_explicit_arithmetic_types_int64: enable
|
||||
|
||||
layout(local_size_x = 1) in;
|
||||
|
||||
layout(constant_id = 0) const int64_t SONE = 1;
|
||||
layout(constant_id = 1) const uint64_t UONE = 1;
|
||||
layout(constant_id = 2) const float F_ONE = 1.0;
|
||||
layout(constant_id = 3) const double D_ONE = 1.0;
|
||||
|
||||
const uint U_SONE = uint(SONE);
|
||||
const uint U_UONE = uint(UONE);
|
||||
|
||||
const int S_SONE = int(SONE);
|
||||
const int S_UONE = int(UONE);
|
||||
|
||||
const float F_ONE2 = float(D_ONE);
|
||||
const double D_ONE2 = double(F_ONE);
|
||||
|
||||
#define DUMMY_SSBO(name, bind, size) layout(std430, set = 0, binding = bind) buffer SSBO_##name { float val[size]; float dummy; } name
|
||||
|
||||
DUMMY_SSBO(U_Sone, 0, U_SONE);
|
||||
DUMMY_SSBO(U_Uone, 1, U_UONE);
|
||||
DUMMY_SSBO(S_Sone, 2, S_SONE);
|
||||
DUMMY_SSBO(S_Uone, 3, S_UONE);
|
||||
|
||||
void main()
|
||||
{
|
||||
U_Sone.val[0] = F_ONE;
|
||||
U_Uone.val[0] = F_ONE;
|
||||
S_Sone.val[0] = F_ONE2;
|
||||
S_Uone.val[0] = F_ONE2;
|
||||
}
|
||||
BIN
lib/All/SPIRV-Reflect/tests/spec_constants/convert.spv
Normal file
BIN
lib/All/SPIRV-Reflect/tests/spec_constants/convert.spv
Normal file
Binary file not shown.
530
lib/All/SPIRV-Reflect/tests/spec_constants/convert.spv.yaml
Normal file
530
lib/All/SPIRV-Reflect/tests/spec_constants/convert.spv.yaml
Normal file
@@ -0,0 +1,530 @@
|
||||
%YAML 1.1
|
||||
---
|
||||
all_type_descriptions:
|
||||
- &td0
|
||||
id: 14
|
||||
op: 28
|
||||
type_name:
|
||||
struct_member_name: "val"
|
||||
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: [128,], stride: 4 }
|
||||
member_count: 0
|
||||
members:
|
||||
- &td1
|
||||
id: 6
|
||||
op: 22
|
||||
type_name:
|
||||
struct_member_name: "dummy"
|
||||
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:
|
||||
- &td2
|
||||
id: 15
|
||||
op: 30
|
||||
type_name: "SSBO_U_Sone"
|
||||
struct_member_name:
|
||||
storage_class: -1 # NOT APPLICABLE
|
||||
type_flags: 0x10080000 # STRUCT EXTERNAL_BLOCK
|
||||
decoration_flags: 0x00000002 # BUFFER_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
|
||||
- &td3
|
||||
id: 25
|
||||
op: 28
|
||||
type_name:
|
||||
struct_member_name: "val"
|
||||
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: [113,], stride: 4 }
|
||||
member_count: 0
|
||||
members:
|
||||
- &td4
|
||||
id: 6
|
||||
op: 22
|
||||
type_name:
|
||||
struct_member_name: "dummy"
|
||||
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:
|
||||
- &td5
|
||||
id: 26
|
||||
op: 30
|
||||
type_name: "SSBO_U_Uone"
|
||||
struct_member_name:
|
||||
storage_class: -1 # NOT APPLICABLE
|
||||
type_flags: 0x10080000 # STRUCT EXTERNAL_BLOCK
|
||||
decoration_flags: 0x00000002 # BUFFER_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:
|
||||
- *td3
|
||||
- *td4
|
||||
- &td6
|
||||
id: 31
|
||||
op: 28
|
||||
type_name:
|
||||
struct_member_name: "val"
|
||||
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: [114,], stride: 4 }
|
||||
member_count: 0
|
||||
members:
|
||||
- &td7
|
||||
id: 6
|
||||
op: 22
|
||||
type_name:
|
||||
struct_member_name: "dummy"
|
||||
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:
|
||||
- &td8
|
||||
id: 32
|
||||
op: 30
|
||||
type_name: "SSBO_S_Sone"
|
||||
struct_member_name:
|
||||
storage_class: -1 # NOT APPLICABLE
|
||||
type_flags: 0x10080000 # STRUCT EXTERNAL_BLOCK
|
||||
decoration_flags: 0x00000002 # BUFFER_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:
|
||||
- *td6
|
||||
- *td7
|
||||
- &td9
|
||||
id: 41
|
||||
op: 28
|
||||
type_name:
|
||||
struct_member_name: "val"
|
||||
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: [128,], stride: 4 }
|
||||
member_count: 0
|
||||
members:
|
||||
- &td10
|
||||
id: 6
|
||||
op: 22
|
||||
type_name:
|
||||
struct_member_name: "dummy"
|
||||
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:
|
||||
- &td11
|
||||
id: 42
|
||||
op: 30
|
||||
type_name: "SSBO_S_Uone"
|
||||
struct_member_name:
|
||||
storage_class: -1 # NOT APPLICABLE
|
||||
type_flags: 0x10080000 # STRUCT EXTERNAL_BLOCK
|
||||
decoration_flags: 0x00000002 # BUFFER_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:
|
||||
- *td9
|
||||
- *td10
|
||||
all_block_variables:
|
||||
- &bv0
|
||||
name: "val"
|
||||
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: 1, dims: [128,], stride: 4 }
|
||||
flags: 0x00000000 # NONE
|
||||
member_count: 0
|
||||
members:
|
||||
type_description: *td0
|
||||
- &bv1
|
||||
name: "dummy"
|
||||
offset: 4
|
||||
absolute_offset: 4
|
||||
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: 0x00000001 # UNUSED
|
||||
member_count: 0
|
||||
members:
|
||||
type_description: *td1
|
||||
- &bv2
|
||||
name: "U_Sone"
|
||||
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: 2
|
||||
members:
|
||||
- *bv0
|
||||
- *bv1
|
||||
type_description: *td2
|
||||
- &bv3
|
||||
name: "val"
|
||||
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: 1, dims: [113,], stride: 4 }
|
||||
flags: 0x00000000 # NONE
|
||||
member_count: 0
|
||||
members:
|
||||
type_description: *td3
|
||||
- &bv4
|
||||
name: "dummy"
|
||||
offset: 4
|
||||
absolute_offset: 4
|
||||
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: 0x00000001 # UNUSED
|
||||
member_count: 0
|
||||
members:
|
||||
type_description: *td4
|
||||
- &bv5
|
||||
name: "U_Uone"
|
||||
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: 2
|
||||
members:
|
||||
- *bv3
|
||||
- *bv4
|
||||
type_description: *td5
|
||||
- &bv6
|
||||
name: "val"
|
||||
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: 1, dims: [114,], stride: 4 }
|
||||
flags: 0x00000000 # NONE
|
||||
member_count: 0
|
||||
members:
|
||||
type_description: *td6
|
||||
- &bv7
|
||||
name: "dummy"
|
||||
offset: 4
|
||||
absolute_offset: 4
|
||||
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: 0x00000001 # UNUSED
|
||||
member_count: 0
|
||||
members:
|
||||
type_description: *td7
|
||||
- &bv8
|
||||
name: "S_Sone"
|
||||
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: 2
|
||||
members:
|
||||
- *bv6
|
||||
- *bv7
|
||||
type_description: *td8
|
||||
- &bv9
|
||||
name: "val"
|
||||
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: 1, dims: [128,], stride: 4 }
|
||||
flags: 0x00000000 # NONE
|
||||
member_count: 0
|
||||
members:
|
||||
type_description: *td9
|
||||
- &bv10
|
||||
name: "dummy"
|
||||
offset: 4
|
||||
absolute_offset: 4
|
||||
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: 0x00000001 # UNUSED
|
||||
member_count: 0
|
||||
members:
|
||||
type_description: *td10
|
||||
- &bv11
|
||||
name: "S_Uone"
|
||||
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: 2
|
||||
members:
|
||||
- *bv9
|
||||
- *bv10
|
||||
type_description: *td11
|
||||
all_descriptor_bindings:
|
||||
- &db0
|
||||
spirv_id: 17
|
||||
name: "U_Sone"
|
||||
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: *bv2 # "U_Sone"
|
||||
array: { dims_count: 0, dims: [] }
|
||||
accessed: 1
|
||||
uav_counter_id: 4294967295
|
||||
uav_counter_binding:
|
||||
type_description: *td2
|
||||
word_offset: { binding: 191, set: 187 }
|
||||
- &db1
|
||||
spirv_id: 28
|
||||
name: "U_Uone"
|
||||
binding: 1
|
||||
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 # "U_Uone"
|
||||
array: { dims_count: 0, dims: [] }
|
||||
accessed: 1
|
||||
uav_counter_id: 4294967295
|
||||
uav_counter_binding:
|
||||
type_description: *td5
|
||||
word_offset: { binding: 224, set: 220 }
|
||||
- &db2
|
||||
spirv_id: 34
|
||||
name: "S_Sone"
|
||||
binding: 2
|
||||
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: *bv8 # "S_Sone"
|
||||
array: { dims_count: 0, dims: [] }
|
||||
accessed: 1
|
||||
uav_counter_id: 4294967295
|
||||
uav_counter_binding:
|
||||
type_description: *td8
|
||||
word_offset: { binding: 249, set: 245 }
|
||||
- &db3
|
||||
spirv_id: 44
|
||||
name: "S_Uone"
|
||||
binding: 3
|
||||
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: *bv11 # "S_Uone"
|
||||
array: { dims_count: 0, dims: [] }
|
||||
accessed: 1
|
||||
uav_counter_id: 4294967295
|
||||
uav_counter_binding:
|
||||
type_description: *td11
|
||||
word_offset: { binding: 278, set: 274 }
|
||||
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: 4
|
||||
descriptor_bindings:
|
||||
- *db0 # "U_Sone"
|
||||
- *db1 # "U_Uone"
|
||||
- *db2 # "S_Sone"
|
||||
- *db3 # "S_Uone"
|
||||
descriptor_set_count: 1
|
||||
descriptor_sets:
|
||||
- set: 0
|
||||
binding_count: 4
|
||||
bindings:
|
||||
- *db0 # "U_Sone"
|
||||
- *db1 # "U_Uone"
|
||||
- *db2 # "S_Sone"
|
||||
- *db3 # "S_Uone"
|
||||
input_variable_count: 0,
|
||||
input_variables:
|
||||
output_variable_count: 0,
|
||||
output_variables:
|
||||
push_constant_count: 0,
|
||||
push_constants:
|
||||
specialization_constant_count: 4,
|
||||
specialization_constants:
|
||||
- name: "SONE"
|
||||
spirv_id: 8
|
||||
constant_id: 0
|
||||
- name: "F_ONE"
|
||||
spirv_id: 19
|
||||
constant_id: 2
|
||||
- name: "UONE"
|
||||
spirv_id: 23
|
||||
constant_id: 1
|
||||
- name: "D_ONE"
|
||||
spirv_id: 36
|
||||
constant_id: 3
|
||||
...
|
||||
@@ -0,0 +1,7 @@
|
||||
#version 450
|
||||
|
||||
// note Z is not and ID
|
||||
// Vulkan 1.3 is needed for glslang to use LocalSizeId over LocalSize
|
||||
layout(local_size_x_id = 8, local_size_y_id = 4, local_size_z = 4) in;
|
||||
|
||||
void main() { }
|
||||
BIN
lib/All/SPIRV-Reflect/tests/spec_constants/local_size_id_10.spv
Normal file
BIN
lib/All/SPIRV-Reflect/tests/spec_constants/local_size_id_10.spv
Normal file
Binary file not shown.
@@ -0,0 +1,33 @@
|
||||
%YAML 1.1
|
||||
---
|
||||
all_type_descriptions:
|
||||
all_block_variables:
|
||||
all_descriptor_bindings:
|
||||
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: 0
|
||||
descriptor_bindings:
|
||||
descriptor_set_count: 0
|
||||
descriptor_sets:
|
||||
input_variable_count: 0,
|
||||
input_variables:
|
||||
output_variable_count: 0,
|
||||
output_variables:
|
||||
push_constant_count: 0,
|
||||
push_constants:
|
||||
specialization_constant_count: 2,
|
||||
specialization_constants:
|
||||
- name:
|
||||
spirv_id: 7
|
||||
constant_id: 8
|
||||
- name:
|
||||
spirv_id: 8
|
||||
constant_id: 4
|
||||
...
|
||||
BIN
lib/All/SPIRV-Reflect/tests/spec_constants/local_size_id_13.spv
Normal file
BIN
lib/All/SPIRV-Reflect/tests/spec_constants/local_size_id_13.spv
Normal file
Binary file not shown.
@@ -0,0 +1,39 @@
|
||||
%YAML 1.1
|
||||
---
|
||||
all_type_descriptions:
|
||||
all_block_variables:
|
||||
all_descriptor_bindings:
|
||||
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: 0
|
||||
descriptor_bindings:
|
||||
descriptor_set_count: 0
|
||||
descriptor_sets:
|
||||
input_variable_count: 0,
|
||||
input_variables:
|
||||
output_variable_count: 0,
|
||||
output_variables:
|
||||
push_constant_count: 0,
|
||||
push_constants:
|
||||
specialization_constant_count: 4,
|
||||
specialization_constants:
|
||||
- name:
|
||||
spirv_id: 7
|
||||
constant_id: 8
|
||||
- name:
|
||||
spirv_id: 8
|
||||
constant_id: 4
|
||||
- name:
|
||||
spirv_id: 10
|
||||
constant_id: 8
|
||||
- name:
|
||||
spirv_id: 11
|
||||
constant_id: 4
|
||||
...
|
||||
12
lib/All/SPIRV-Reflect/tests/spec_constants/ssbo_array.glsl
Normal file
12
lib/All/SPIRV-Reflect/tests/spec_constants/ssbo_array.glsl
Normal file
@@ -0,0 +1,12 @@
|
||||
#version 450
|
||||
|
||||
layout(constant_id = 8) const int SIZE_A = 4;
|
||||
layout(constant_id = 5) const int SIZE_B = 3;
|
||||
layout(set = 0, binding = 0, std430) buffer SSBO {
|
||||
float a[SIZE_A];
|
||||
float b[SIZE_B];
|
||||
} ssbo;
|
||||
|
||||
void main() {
|
||||
ssbo.a[2] = ssbo.b[1];
|
||||
}
|
||||
BIN
lib/All/SPIRV-Reflect/tests/spec_constants/ssbo_array.spv
Normal file
BIN
lib/All/SPIRV-Reflect/tests/spec_constants/ssbo_array.spv
Normal file
Binary file not shown.
158
lib/All/SPIRV-Reflect/tests/spec_constants/ssbo_array.spv.yaml
Normal file
158
lib/All/SPIRV-Reflect/tests/spec_constants/ssbo_array.spv.yaml
Normal file
@@ -0,0 +1,158 @@
|
||||
%YAML 1.1
|
||||
---
|
||||
all_type_descriptions:
|
||||
- &td0
|
||||
id: 9
|
||||
op: 28
|
||||
type_name:
|
||||
struct_member_name: "a"
|
||||
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:
|
||||
- &td1
|
||||
id: 11
|
||||
op: 28
|
||||
type_name:
|
||||
struct_member_name: "b"
|
||||
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: [3,], stride: 4 }
|
||||
member_count: 0
|
||||
members:
|
||||
- &td2
|
||||
id: 12
|
||||
op: 30
|
||||
type_name: "SSBO"
|
||||
struct_member_name:
|
||||
storage_class: -1 # NOT APPLICABLE
|
||||
type_flags: 0x10080000 # STRUCT EXTERNAL_BLOCK
|
||||
decoration_flags: 0x00000002 # BUFFER_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:
|
||||
- &bv0
|
||||
name: "a"
|
||||
offset: 0
|
||||
absolute_offset: 0
|
||||
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: *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: 0 }
|
||||
matrix: { column_count: 0, row_count: 0, stride: 0 }
|
||||
array: { dims_count: 1, dims: [3,], stride: 4 }
|
||||
flags: 0x00000000 # NONE
|
||||
member_count: 0
|
||||
members:
|
||||
type_description: *td1
|
||||
- &bv2
|
||||
name: "ssbo"
|
||||
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: 2
|
||||
members:
|
||||
- *bv0
|
||||
- *bv1
|
||||
type_description: *td2
|
||||
all_descriptor_bindings:
|
||||
- &db0
|
||||
spirv_id: 14
|
||||
name: "ssbo"
|
||||
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: *bv2 # "ssbo"
|
||||
array: { dims_count: 0, dims: [] }
|
||||
accessed: 1
|
||||
uav_counter_id: 4294967295
|
||||
uav_counter_binding:
|
||||
type_description: *td2
|
||||
word_offset: { binding: 94, set: 90 }
|
||||
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 # "ssbo"
|
||||
descriptor_set_count: 1
|
||||
descriptor_sets:
|
||||
- set: 0
|
||||
binding_count: 1
|
||||
bindings:
|
||||
- *db0 # "ssbo"
|
||||
input_variable_count: 0,
|
||||
input_variables:
|
||||
output_variable_count: 0,
|
||||
output_variables:
|
||||
push_constant_count: 0,
|
||||
push_constants:
|
||||
specialization_constant_count: 2,
|
||||
specialization_constants:
|
||||
- name: "SIZE_A"
|
||||
spirv_id: 8
|
||||
constant_id: 8
|
||||
- name: "SIZE_B"
|
||||
spirv_id: 10
|
||||
constant_id: 5
|
||||
...
|
||||
310
lib/All/SPIRV-Reflect/tests/spec_constants/test_32bit.comp
Normal file
310
lib/All/SPIRV-Reflect/tests/spec_constants/test_32bit.comp
Normal file
@@ -0,0 +1,310 @@
|
||||
#version 450
|
||||
layout(local_size_x_id = 8, local_size_y = 1, local_size_z = 1) in;
|
||||
|
||||
layout(constant_id = 2) const int SONE = 1;
|
||||
layout(constant_id = 3) const int STWO = 2;
|
||||
const int _141 = (SONE + STWO);
|
||||
const uint _144 = (uint(_141) + 0u);
|
||||
layout(constant_id = 5) const uint UONE = 1u;
|
||||
const uint _145 = (_144 + UONE);
|
||||
layout(constant_id = 6) const uint UTWO = 2u;
|
||||
const uint IADD = (_145 + UTWO);
|
||||
const uint _147 = (IADD - 5u);
|
||||
layout(constant_id = 4) const int SNEG_TWO = -2;
|
||||
const uint _152 = (uint(SNEG_TWO) + 0u);
|
||||
const uint ISUB = (UTWO - _152);
|
||||
const uint _154 = (ISUB - 3u);
|
||||
const uint IMUL = (UTWO * UTWO);
|
||||
const uint _156 = (IMUL - 3u);
|
||||
const uint UDIV = (UTWO / UTWO);
|
||||
layout(constant_id = 7) const int SNEG_THREE = -3;
|
||||
const int SDIV = (STWO / SNEG_THREE);
|
||||
const int _160 = (SDIV + 1);
|
||||
const int SREM = STWO - SNEG_THREE * (STWO / SNEG_THREE);
|
||||
const int _162 = (SREM - 1);
|
||||
const int SMOD = (STWO % SNEG_THREE);
|
||||
const int _165 = (SMOD + 2);
|
||||
const uint UMOD = (IADD % IMUL);
|
||||
const uint _168 = (UMOD - 1u);
|
||||
const uint _170 = (ISUB - 3u);
|
||||
const uint LSHL = (IADD << _170);
|
||||
const uint _172 = (LSHL - 11u);
|
||||
const uint _174 = (ISUB - 3u);
|
||||
const uint RSHL = (IADD >> _174);
|
||||
const uint _176 = (RSHL - 2u);
|
||||
const int _178 = int(IADD + 0u);
|
||||
const int _179 = (-_178);
|
||||
const int _180 = (1 - SDIV);
|
||||
const int RSHA = (_179 >> _180);
|
||||
const int _182 = (RSHA + 4);
|
||||
const uint _184 = (ISUB - 3u);
|
||||
const bool IEQ = (IADD == _184);
|
||||
const int _186 = IEQ ? 2 : 1;
|
||||
const uint _188 = (ISUB - 3u);
|
||||
const bool INEQ = (IADD != _188);
|
||||
const int _189 = INEQ ? 1 : 2;
|
||||
const uint _191 = (ISUB - 3u);
|
||||
const bool ULT = (IADD < _191);
|
||||
const int _192 = ULT ? 2 : 1;
|
||||
const uint _194 = (ISUB - 3u);
|
||||
const bool ULE = (IADD <= _194);
|
||||
const int _195 = ULE ? 2 : 1;
|
||||
const uint _197 = (ISUB - 3u);
|
||||
const bool UGT = (IADD > _197);
|
||||
const int _198 = UGT ? 1 : 2;
|
||||
const uint _200 = (ISUB - 3u);
|
||||
const bool UGE = (IADD >= _200);
|
||||
const int _201 = UGE ? 1 : 2;
|
||||
const bool SLT = (SMOD < SREM);
|
||||
const int _203 = SLT ? 1 : 2;
|
||||
const bool SLE = (SMOD <= SREM);
|
||||
const int _205 = SLE ? 1 : 2;
|
||||
const bool SGT = (SMOD > SREM);
|
||||
const int _207 = SGT ? 2 : 1;
|
||||
const bool SGE = (SMOD >= SREM);
|
||||
const int _209 = SGE ? 2 : 1;
|
||||
const bool LOR = (IEQ || SLT);
|
||||
const int _211 = LOR ? 1 : 2;
|
||||
const bool LAND = (IEQ && SLT);
|
||||
const int _213 = LAND ? 2 : 1;
|
||||
const bool LNOT = (!LOR);
|
||||
const int _215 = LNOT ? 2 : 1;
|
||||
const uint AND = (IADD & IADD);
|
||||
const uint _217 = (AND - 5u);
|
||||
const uint _219 = (ISUB - 3u);
|
||||
const uint OR = (IADD | _219);
|
||||
const uint _221 = (OR - 6u);
|
||||
const uint XOR = (IADD ^ IADD);
|
||||
const uint _223 = (XOR + 1u);
|
||||
const uint NOT = (~XOR);
|
||||
const uint _226 = (NOT - 4294967294u);
|
||||
const bool LEQ = (LAND == LNOT);
|
||||
const int _228 = LEQ ? 1 : 2;
|
||||
const bool LNEQ = (LAND != LNOT);
|
||||
const int _230 = LNEQ ? 2 : 1;
|
||||
const uint _232 = (ISUB - 3u);
|
||||
const uint SEL = IEQ ? IADD : _232;
|
||||
layout(constant_id = 0) const bool TRUE = true;
|
||||
layout(constant_id = 1) const bool FALSE = false;
|
||||
|
||||
layout(set = 0, binding = 0, std430) buffer SSBO_IAdd
|
||||
{
|
||||
float val[_147];
|
||||
float dummy;
|
||||
} IAdd;
|
||||
|
||||
layout(set = 0, binding = 1, std430) buffer SSBO_ISub
|
||||
{
|
||||
float val[_154];
|
||||
float dummy;
|
||||
} ISub;
|
||||
|
||||
layout(set = 0, binding = 2, std430) buffer SSBO_IMul
|
||||
{
|
||||
float val[_156];
|
||||
float dummy;
|
||||
} IMul;
|
||||
|
||||
layout(set = 0, binding = 3, std430) buffer SSBO_UDiv
|
||||
{
|
||||
float val[UDIV];
|
||||
float dummy;
|
||||
} UDiv;
|
||||
|
||||
layout(set = 0, binding = 4, std430) buffer SSBO_SDiv
|
||||
{
|
||||
float val[_160];
|
||||
float dummy;
|
||||
} SDiv;
|
||||
|
||||
layout(set = 0, binding = 5, std430) buffer SSBO_SRem
|
||||
{
|
||||
float val[_162];
|
||||
float dummy;
|
||||
} SRem;
|
||||
|
||||
layout(set = 0, binding = 6, std430) buffer SSBO_SMod
|
||||
{
|
||||
float val[_165];
|
||||
float dummy;
|
||||
} SMod;
|
||||
|
||||
layout(set = 0, binding = 7, std430) buffer SSBO_UMod
|
||||
{
|
||||
float val[_168];
|
||||
float dummy;
|
||||
} UMod;
|
||||
|
||||
layout(set = 0, binding = 8, std430) buffer SSBO_LShl
|
||||
{
|
||||
float val[_172];
|
||||
float dummy;
|
||||
} LShl;
|
||||
|
||||
layout(set = 0, binding = 9, std430) buffer SSBO_RShl
|
||||
{
|
||||
float val[_176];
|
||||
float dummy;
|
||||
} RShl;
|
||||
|
||||
layout(set = 0, binding = 10, std430) buffer SSBO_RSha
|
||||
{
|
||||
float val[_182];
|
||||
float dummy;
|
||||
} RSha;
|
||||
|
||||
layout(set = 0, binding = 11, std430) buffer SSBO_IEq
|
||||
{
|
||||
float val[_186];
|
||||
float dummy;
|
||||
} IEq;
|
||||
|
||||
layout(set = 0, binding = 12, std430) buffer SSBO_INeq
|
||||
{
|
||||
float val[_189];
|
||||
float dummy;
|
||||
} INeq;
|
||||
|
||||
layout(set = 0, binding = 13, std430) buffer SSBO_Ult
|
||||
{
|
||||
float val[_192];
|
||||
float dummy;
|
||||
} Ult;
|
||||
|
||||
layout(set = 0, binding = 14, std430) buffer SSBO_Ule
|
||||
{
|
||||
float val[_195];
|
||||
float dummy;
|
||||
} Ule;
|
||||
|
||||
layout(set = 0, binding = 15, std430) buffer SSBO_Ugt
|
||||
{
|
||||
float val[_198];
|
||||
float dummy;
|
||||
} Ugt;
|
||||
|
||||
layout(set = 0, binding = 16, std430) buffer SSBO_Uge
|
||||
{
|
||||
float val[_201];
|
||||
float dummy;
|
||||
} Uge;
|
||||
|
||||
layout(set = 0, binding = 17, std430) buffer SSBO_Slt
|
||||
{
|
||||
float val[_203];
|
||||
float dummy;
|
||||
} Slt;
|
||||
|
||||
layout(set = 0, binding = 18, std430) buffer SSBO_Sle
|
||||
{
|
||||
float val[_205];
|
||||
float dummy;
|
||||
} Sle;
|
||||
|
||||
layout(set = 0, binding = 19, std430) buffer SSBO_Sgt
|
||||
{
|
||||
float val[_207];
|
||||
float dummy;
|
||||
} Sgt;
|
||||
|
||||
layout(set = 0, binding = 20, std430) buffer SSBO_Sge
|
||||
{
|
||||
float val[_209];
|
||||
float dummy;
|
||||
} Sge;
|
||||
|
||||
layout(set = 0, binding = 21, std430) buffer SSBO_Lor
|
||||
{
|
||||
float val[_211];
|
||||
float dummy;
|
||||
} Lor;
|
||||
|
||||
layout(set = 0, binding = 22, std430) buffer SSBO_Land
|
||||
{
|
||||
float val[_213];
|
||||
float dummy;
|
||||
} Land;
|
||||
|
||||
layout(set = 0, binding = 23, std430) buffer SSBO_Lnot
|
||||
{
|
||||
float val[_215];
|
||||
float dummy;
|
||||
} Lnot;
|
||||
|
||||
layout(set = 0, binding = 24, std430) buffer SSBO_And
|
||||
{
|
||||
float val[_217];
|
||||
float dummy;
|
||||
} And;
|
||||
|
||||
layout(set = 0, binding = 25, std430) buffer SSBO_Or
|
||||
{
|
||||
float val[_221];
|
||||
float dummy;
|
||||
} Or;
|
||||
|
||||
layout(set = 0, binding = 26, std430) buffer SSBO_Xor
|
||||
{
|
||||
float val[_223];
|
||||
float dummy;
|
||||
} Xor;
|
||||
|
||||
layout(set = 0, binding = 27, std430) buffer SSBO_Not
|
||||
{
|
||||
float val[_226];
|
||||
float dummy;
|
||||
} Not;
|
||||
|
||||
layout(set = 0, binding = 28, std430) buffer SSBO_Leq
|
||||
{
|
||||
float val[_228];
|
||||
float dummy;
|
||||
} Leq;
|
||||
|
||||
layout(set = 0, binding = 29, std430) buffer SSBO_Lneq
|
||||
{
|
||||
float val[_230];
|
||||
float dummy;
|
||||
} Lneq;
|
||||
|
||||
layout(set = 0, binding = 30, std430) buffer SSBO_Sel
|
||||
{
|
||||
float val[SEL];
|
||||
float dummy;
|
||||
} Sel;
|
||||
|
||||
void main()
|
||||
{
|
||||
IAdd.val[0] = 0.0;
|
||||
ISub.val[0] = 0.0;
|
||||
IMul.val[0] = 0.0;
|
||||
UDiv.val[0] = 0.0;
|
||||
SDiv.val[0] = 0.0;
|
||||
SRem.val[0] = 0.0;
|
||||
SMod.val[0] = 0.0;
|
||||
UMod.val[0] = 0.0;
|
||||
LShl.val[0] = 0.0;
|
||||
RShl.val[0] = 0.0;
|
||||
RSha.val[0] = 0.0;
|
||||
IEq.val[0] = 0.0;
|
||||
INeq.val[0] = 0.0;
|
||||
Ult.val[0] = 0.0;
|
||||
Ule.val[0] = 0.0;
|
||||
Ugt.val[0] = 0.0;
|
||||
Uge.val[0] = 0.0;
|
||||
Slt.val[0] = 0.0;
|
||||
Sle.val[0] = 0.0;
|
||||
Sgt.val[0] = 0.0;
|
||||
Sge.val[0] = 0.0;
|
||||
Lor.val[0] = 0.0;
|
||||
Land.val[0] = 0.0;
|
||||
Lnot.val[0] = 0.0;
|
||||
And.val[0] = 0.0;
|
||||
Or.val[0] = 0.0;
|
||||
Xor.val[0] = 0.0;
|
||||
Not.val[0] = 0.0;
|
||||
Leq.val[0] = 0.0;
|
||||
Lneq.val[0] = 0.0;
|
||||
Sel.val[0] = 0.0;
|
||||
}
|
||||
|
||||
BIN
lib/All/SPIRV-Reflect/tests/spec_constants/test_32bit.spv
Normal file
BIN
lib/All/SPIRV-Reflect/tests/spec_constants/test_32bit.spv
Normal file
Binary file not shown.
3839
lib/All/SPIRV-Reflect/tests/spec_constants/test_32bit.spv.yaml
Normal file
3839
lib/All/SPIRV-Reflect/tests/spec_constants/test_32bit.spv.yaml
Normal file
File diff suppressed because it is too large
Load Diff
BIN
lib/All/SPIRV-Reflect/tests/spec_constants/test_64bit.spv
Normal file
BIN
lib/All/SPIRV-Reflect/tests/spec_constants/test_64bit.spv
Normal file
Binary file not shown.
3839
lib/All/SPIRV-Reflect/tests/spec_constants/test_64bit.spv.yaml
Normal file
3839
lib/All/SPIRV-Reflect/tests/spec_constants/test_64bit.spv.yaml
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user