You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
853 B
32 lines
853 B
4 months ago
|
#version 450 core
|
||
|
|
||
|
#extension GL_EXT_shader_16bit_storage: enable
|
||
|
#extension GL_EXT_scalar_block_layout : enable
|
||
|
|
||
|
// Block memory layout
|
||
|
struct S
|
||
|
{
|
||
|
float16_t a; // offset 0
|
||
|
f16vec2 b; // offset 2
|
||
|
double c; // offset 8
|
||
|
float16_t d; // offset 16
|
||
|
f16vec3 e; // offset 18
|
||
|
float16_t f; // offset 24
|
||
|
// size = 26, align = 8
|
||
|
};
|
||
|
|
||
|
layout(column_major, scalar) uniform B1
|
||
|
{
|
||
|
float16_t a; // offset = 0
|
||
|
f16vec2 b; // offset = 2
|
||
|
f16vec3 c; // offset = 6
|
||
|
float16_t d[2]; // offset = 12 stride = 2
|
||
|
float16_t g; // offset = 16
|
||
|
S h; // offset = 24 (aligned to multiple of 8)
|
||
|
S i[2]; // offset = 56 (aligned to multiple of 8) stride = 32
|
||
|
};
|
||
|
|
||
|
void main()
|
||
|
{
|
||
|
}
|