yes
This commit is contained in:
+94
@@ -0,0 +1,94 @@
|
||||
#!amber
|
||||
# Copyright 2022 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
DEVICE_EXTENSION VK_EXT_primitive_topology_list_restart
|
||||
|
||||
SHADER compute compute_shader GLSL
|
||||
#version 430
|
||||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
|
||||
layout(set = 0, binding = 0) buffer block0
|
||||
{
|
||||
vec4 pos[65536];
|
||||
};
|
||||
|
||||
void main()
|
||||
{
|
||||
pos[0] = vec4(-0.5, -0.5, 0.0, 1.0);
|
||||
pos[1] = vec4(-0.5, 0.5, 0.0, 1.0);
|
||||
pos[2] = vec4(0.5, 0.5, 0.0, 1.0);
|
||||
pos[3] = pos[65535] = vec4(0.5, -0.5, 0.0, 1.0);
|
||||
}
|
||||
END
|
||||
|
||||
SHADER vertex vert_shader PASSTHROUGH
|
||||
|
||||
SHADER fragment frag_shader GLSL
|
||||
#version 430
|
||||
layout(location = 0) out vec4 color_out;
|
||||
void main()
|
||||
{
|
||||
color_out = vec4(0.0, 1.0, 0.0, 1.0);
|
||||
}
|
||||
END
|
||||
|
||||
BUFFER position DATA_TYPE vec4<float> SIZE 65536 FILL 0.0
|
||||
|
||||
BUFFER indices DATA_TYPE uint16 DATA
|
||||
0 1 1 65535 65535 2 2 0
|
||||
END
|
||||
|
||||
BUFFER indices_ref DATA_TYPE uint16 DATA
|
||||
0 1 1 3 3 2 2 0
|
||||
END
|
||||
|
||||
PIPELINE compute compute_pipeline
|
||||
ATTACH compute_shader
|
||||
FRAMEBUFFER_SIZE 64 64
|
||||
|
||||
BIND BUFFER position AS storage DESCRIPTOR_SET 0 BINDING 0
|
||||
END
|
||||
|
||||
RUN compute_pipeline 1 1 1
|
||||
|
||||
IMAGE framebuffer FORMAT B8G8R8A8_UNORM DIM_2D WIDTH 64 HEIGHT 64
|
||||
IMAGE framebuffer_ref FORMAT B8G8R8A8_UNORM DIM_2D WIDTH 64 HEIGHT 64
|
||||
|
||||
PIPELINE graphics graphics_pipeline
|
||||
ATTACH vert_shader
|
||||
ATTACH frag_shader
|
||||
VERTEX_DATA position LOCATION 0
|
||||
INDEX_DATA indices
|
||||
FRAMEBUFFER_SIZE 64 64
|
||||
BIND BUFFER framebuffer AS color LOCATION 0
|
||||
END
|
||||
|
||||
PIPELINE graphics graphics_pipeline_ref
|
||||
ATTACH vert_shader
|
||||
ATTACH frag_shader
|
||||
VERTEX_DATA position LOCATION 0
|
||||
INDEX_DATA indices_ref
|
||||
FRAMEBUFFER_SIZE 64 64
|
||||
BIND BUFFER framebuffer_ref AS color LOCATION 0
|
||||
END
|
||||
|
||||
CLEAR_COLOR graphics_pipeline 0 0 0 0
|
||||
CLEAR graphics_pipeline
|
||||
RUN graphics_pipeline DRAW_ARRAY AS LINE_LIST INDEXED START_IDX 0 COUNT 8
|
||||
CLEAR_COLOR graphics_pipeline_ref 0 0 0 0
|
||||
CLEAR graphics_pipeline_ref
|
||||
RUN graphics_pipeline_ref DRAW_ARRAY AS LINE_LIST INDEXED START_IDX 0 COUNT 8
|
||||
EXPECT framebuffer EQ_BUFFER framebuffer_ref
|
||||
+95
@@ -0,0 +1,95 @@
|
||||
#!amber
|
||||
# Copyright 2022 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
DEVICE_FEATURE IndexTypeUint8Features.indexTypeUint8
|
||||
DEVICE_EXTENSION VK_EXT_primitive_topology_list_restart
|
||||
|
||||
SHADER compute compute_shader GLSL
|
||||
#version 430
|
||||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
|
||||
layout(set = 0, binding = 0) buffer block0
|
||||
{
|
||||
vec4 pos[256];
|
||||
};
|
||||
|
||||
void main()
|
||||
{
|
||||
pos[0] = vec4(-0.5, -0.5, 0.0, 1.0);
|
||||
pos[1] = vec4(-0.5, 0.5, 0.0, 1.0);
|
||||
pos[2] = vec4(0.5, 0.5, 0.0, 1.0);
|
||||
pos[3] = pos[255] = vec4(0.5, -0.5, 0.0, 1.0);
|
||||
}
|
||||
END
|
||||
|
||||
SHADER vertex vert_shader PASSTHROUGH
|
||||
|
||||
SHADER fragment frag_shader GLSL
|
||||
#version 430
|
||||
layout(location = 0) out vec4 color_out;
|
||||
void main()
|
||||
{
|
||||
color_out = vec4(0.0, 1.0, 0.0, 1.0);
|
||||
}
|
||||
END
|
||||
|
||||
BUFFER position DATA_TYPE vec4<float> SIZE 256 FILL 0.0
|
||||
|
||||
BUFFER indices DATA_TYPE uint8 DATA
|
||||
0 1 1 255 255 2 2 0
|
||||
END
|
||||
|
||||
BUFFER indices_ref DATA_TYPE uint8 DATA
|
||||
0 1 1 3 3 2 2 0
|
||||
END
|
||||
|
||||
PIPELINE compute compute_pipeline
|
||||
ATTACH compute_shader
|
||||
FRAMEBUFFER_SIZE 64 64
|
||||
|
||||
BIND BUFFER position AS storage DESCRIPTOR_SET 0 BINDING 0
|
||||
END
|
||||
|
||||
RUN compute_pipeline 1 1 1
|
||||
|
||||
IMAGE framebuffer FORMAT B8G8R8A8_UNORM DIM_2D WIDTH 64 HEIGHT 64
|
||||
IMAGE framebuffer_ref FORMAT B8G8R8A8_UNORM DIM_2D WIDTH 64 HEIGHT 64
|
||||
|
||||
PIPELINE graphics graphics_pipeline
|
||||
ATTACH vert_shader
|
||||
ATTACH frag_shader
|
||||
VERTEX_DATA position LOCATION 0
|
||||
INDEX_DATA indices
|
||||
FRAMEBUFFER_SIZE 64 64
|
||||
BIND BUFFER framebuffer AS color LOCATION 0
|
||||
END
|
||||
|
||||
PIPELINE graphics graphics_pipeline_ref
|
||||
ATTACH vert_shader
|
||||
ATTACH frag_shader
|
||||
VERTEX_DATA position LOCATION 0
|
||||
INDEX_DATA indices_ref
|
||||
FRAMEBUFFER_SIZE 64 64
|
||||
BIND BUFFER framebuffer_ref AS color LOCATION 0
|
||||
END
|
||||
|
||||
CLEAR_COLOR graphics_pipeline 0 0 0 0
|
||||
CLEAR graphics_pipeline
|
||||
RUN graphics_pipeline DRAW_ARRAY AS LINE_LIST INDEXED START_IDX 0 COUNT 8
|
||||
CLEAR_COLOR graphics_pipeline_ref 0 0 0 0
|
||||
CLEAR graphics_pipeline_ref
|
||||
RUN graphics_pipeline_ref DRAW_ARRAY AS LINE_LIST INDEXED START_IDX 0 COUNT 8
|
||||
EXPECT framebuffer EQ_BUFFER framebuffer_ref
|
||||
+113
@@ -0,0 +1,113 @@
|
||||
#!amber
|
||||
# Copyright 2022 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
DEVICE_EXTENSION VK_EXT_primitive_topology_list_restart
|
||||
|
||||
DEVICE_FEATURE geometryShader
|
||||
|
||||
SHADER compute compute_shader GLSL
|
||||
#version 430
|
||||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
|
||||
layout(set = 0, binding = 0) buffer block0
|
||||
{
|
||||
vec4 pos[65536];
|
||||
};
|
||||
|
||||
void main()
|
||||
{
|
||||
pos[0] = vec4(-0.5, -0.5, 0.0, 1.0);
|
||||
pos[1] = vec4(-0.5, 0.5, 0.0, 1.0);
|
||||
pos[2] = vec4(0.5, 0.5, 0.0, 1.0);
|
||||
pos[3] = pos[65535] = vec4(0.5, -0.5, 0.0, 1.0);
|
||||
}
|
||||
END
|
||||
|
||||
SHADER vertex vert_shader PASSTHROUGH
|
||||
|
||||
SHADER fragment frag_shader GLSL
|
||||
#version 430
|
||||
layout(location = 0) out vec4 color_out;
|
||||
void main()
|
||||
{
|
||||
color_out = vec4(0.0, 1.0, 0.0, 1.0);
|
||||
}
|
||||
END
|
||||
|
||||
SHADER geometry geom_shader GLSL
|
||||
#version 430
|
||||
layout(lines_adjacency) in;
|
||||
layout(line_strip, max_vertices = 2) out;
|
||||
|
||||
void main (void)
|
||||
{
|
||||
for (int i = 1; i < 3; i++)
|
||||
{
|
||||
gl_Position = gl_in[i].gl_Position;
|
||||
EmitVertex();
|
||||
}
|
||||
EndPrimitive();
|
||||
}
|
||||
END
|
||||
|
||||
BUFFER position DATA_TYPE vec4<float> SIZE 65536 FILL 0.0
|
||||
|
||||
BUFFER indices DATA_TYPE uint16 DATA
|
||||
65535 0 1 65535 65535 1 65535 65535 65535 65535 2 65535 65535 2 0 65535
|
||||
END
|
||||
|
||||
BUFFER indices_ref DATA_TYPE uint16 DATA
|
||||
3 0 1 3 3 1 3 3 3 3 2 3 3 2 0 3
|
||||
END
|
||||
|
||||
PIPELINE compute compute_pipeline
|
||||
ATTACH compute_shader
|
||||
FRAMEBUFFER_SIZE 64 64
|
||||
|
||||
BIND BUFFER position AS storage DESCRIPTOR_SET 0 BINDING 0
|
||||
END
|
||||
|
||||
RUN compute_pipeline 1 1 1
|
||||
|
||||
IMAGE framebuffer FORMAT B8G8R8A8_UNORM DIM_2D WIDTH 64 HEIGHT 64
|
||||
IMAGE framebuffer_ref FORMAT B8G8R8A8_UNORM DIM_2D WIDTH 64 HEIGHT 64
|
||||
|
||||
PIPELINE graphics graphics_pipeline
|
||||
ATTACH vert_shader
|
||||
ATTACH frag_shader
|
||||
ATTACH geom_shader
|
||||
VERTEX_DATA position LOCATION 0
|
||||
INDEX_DATA indices
|
||||
FRAMEBUFFER_SIZE 64 64
|
||||
BIND BUFFER framebuffer AS color LOCATION 0
|
||||
END
|
||||
|
||||
PIPELINE graphics graphics_pipeline_ref
|
||||
ATTACH vert_shader
|
||||
ATTACH frag_shader
|
||||
VERTEX_DATA position LOCATION 0
|
||||
INDEX_DATA indices_ref
|
||||
FRAMEBUFFER_SIZE 64 64
|
||||
BIND BUFFER framebuffer_ref AS color LOCATION 0
|
||||
END
|
||||
|
||||
CLEAR_COLOR graphics_pipeline 0 0 0 0
|
||||
CLEAR graphics_pipeline
|
||||
RUN graphics_pipeline DRAW_ARRAY AS LINE_LIST_WITH_ADJACENCY INDEXED START_IDX 0 COUNT 16
|
||||
CLEAR_COLOR graphics_pipeline_ref 0 0 0 0
|
||||
CLEAR graphics_pipeline_ref
|
||||
RUN graphics_pipeline_ref DRAW_ARRAY AS LINE_LIST_WITH_ADJACENCY INDEXED START_IDX 0 COUNT 16
|
||||
EXPECT framebuffer EQ_BUFFER framebuffer_ref
|
||||
+114
@@ -0,0 +1,114 @@
|
||||
#!amber
|
||||
# Copyright 2022 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
DEVICE_FEATURE IndexTypeUint8Features.indexTypeUint8
|
||||
DEVICE_EXTENSION VK_EXT_primitive_topology_list_restart
|
||||
|
||||
DEVICE_FEATURE geometryShader
|
||||
|
||||
SHADER compute compute_shader GLSL
|
||||
#version 430
|
||||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
|
||||
layout(set = 0, binding = 0) buffer block0
|
||||
{
|
||||
vec4 pos[256];
|
||||
};
|
||||
|
||||
void main()
|
||||
{
|
||||
pos[0] = vec4(-0.5, -0.5, 0.0, 1.0);
|
||||
pos[1] = vec4(-0.5, 0.5, 0.0, 1.0);
|
||||
pos[2] = vec4(0.5, 0.5, 0.0, 1.0);
|
||||
pos[3] = pos[255] = vec4(0.5, -0.5, 0.0, 1.0);
|
||||
}
|
||||
END
|
||||
|
||||
SHADER vertex vert_shader PASSTHROUGH
|
||||
|
||||
SHADER fragment frag_shader GLSL
|
||||
#version 430
|
||||
layout(location = 0) out vec4 color_out;
|
||||
void main()
|
||||
{
|
||||
color_out = vec4(0.0, 1.0, 0.0, 1.0);
|
||||
}
|
||||
END
|
||||
|
||||
SHADER geometry geom_shader GLSL
|
||||
#version 430
|
||||
layout(lines_adjacency) in;
|
||||
layout(line_strip, max_vertices = 2) out;
|
||||
|
||||
void main (void)
|
||||
{
|
||||
for (int i = 1; i < 3; i++)
|
||||
{
|
||||
gl_Position = gl_in[i].gl_Position;
|
||||
EmitVertex();
|
||||
}
|
||||
EndPrimitive();
|
||||
}
|
||||
END
|
||||
|
||||
BUFFER position DATA_TYPE vec4<float> SIZE 256 FILL 0.0
|
||||
|
||||
BUFFER indices DATA_TYPE uint8 DATA
|
||||
255 0 1 255 255 1 255 255 255 255 2 255 255 2 0 255
|
||||
END
|
||||
|
||||
BUFFER indices_ref DATA_TYPE uint8 DATA
|
||||
3 0 1 3 3 1 3 3 3 3 2 3 3 2 0 3
|
||||
END
|
||||
|
||||
PIPELINE compute compute_pipeline
|
||||
ATTACH compute_shader
|
||||
FRAMEBUFFER_SIZE 64 64
|
||||
|
||||
BIND BUFFER position AS storage DESCRIPTOR_SET 0 BINDING 0
|
||||
END
|
||||
|
||||
RUN compute_pipeline 1 1 1
|
||||
|
||||
IMAGE framebuffer FORMAT B8G8R8A8_UNORM DIM_2D WIDTH 64 HEIGHT 64
|
||||
IMAGE framebuffer_ref FORMAT B8G8R8A8_UNORM DIM_2D WIDTH 64 HEIGHT 64
|
||||
|
||||
PIPELINE graphics graphics_pipeline
|
||||
ATTACH vert_shader
|
||||
ATTACH frag_shader
|
||||
ATTACH geom_shader
|
||||
VERTEX_DATA position LOCATION 0
|
||||
INDEX_DATA indices
|
||||
FRAMEBUFFER_SIZE 64 64
|
||||
BIND BUFFER framebuffer AS color LOCATION 0
|
||||
END
|
||||
|
||||
PIPELINE graphics graphics_pipeline_ref
|
||||
ATTACH vert_shader
|
||||
ATTACH frag_shader
|
||||
VERTEX_DATA position LOCATION 0
|
||||
INDEX_DATA indices_ref
|
||||
FRAMEBUFFER_SIZE 64 64
|
||||
BIND BUFFER framebuffer_ref AS color LOCATION 0
|
||||
END
|
||||
|
||||
CLEAR_COLOR graphics_pipeline 0 0 0 0
|
||||
CLEAR graphics_pipeline
|
||||
RUN graphics_pipeline DRAW_ARRAY AS LINE_LIST_WITH_ADJACENCY INDEXED START_IDX 0 COUNT 16
|
||||
CLEAR_COLOR graphics_pipeline_ref 0 0 0 0
|
||||
CLEAR graphics_pipeline_ref
|
||||
RUN graphics_pipeline_ref DRAW_ARRAY AS LINE_LIST_WITH_ADJACENCY INDEXED START_IDX 0 COUNT 16
|
||||
EXPECT framebuffer EQ_BUFFER framebuffer_ref
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
#!amber
|
||||
# Copyright 2022 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
SHADER compute compute_shader GLSL
|
||||
#version 430
|
||||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
|
||||
layout(set = 0, binding = 0) buffer block0
|
||||
{
|
||||
vec4 pos[65536];
|
||||
};
|
||||
|
||||
void main()
|
||||
{
|
||||
pos[0] = vec4(-0.5, -0.5, 0.0, 1.0);
|
||||
pos[1] = vec4(-0.5, 0.5, 0.0, 1.0);
|
||||
pos[2] = vec4(0.5, 0.5, 0.0, 1.0);
|
||||
pos[3] = pos[65535] = vec4(0.5, -0.5, 0.0, 1.0);
|
||||
}
|
||||
END
|
||||
|
||||
SHADER vertex vert_shader PASSTHROUGH
|
||||
|
||||
SHADER fragment frag_shader GLSL
|
||||
#version 430
|
||||
layout(location = 0) out vec4 color_out;
|
||||
void main()
|
||||
{
|
||||
color_out = vec4(0.0, 1.0, 0.0, 1.0);
|
||||
}
|
||||
END
|
||||
|
||||
BUFFER position DATA_TYPE vec4<float> SIZE 65536 FILL 0.0
|
||||
|
||||
BUFFER indices DATA_TYPE uint16 DATA
|
||||
0 1 65535 2 0
|
||||
END
|
||||
|
||||
BUFFER indices_ref DATA_TYPE uint16 DATA
|
||||
0 1 3 2 0
|
||||
END
|
||||
|
||||
PIPELINE compute compute_pipeline
|
||||
ATTACH compute_shader
|
||||
FRAMEBUFFER_SIZE 64 64
|
||||
|
||||
BIND BUFFER position AS storage DESCRIPTOR_SET 0 BINDING 0
|
||||
END
|
||||
|
||||
RUN compute_pipeline 1 1 1
|
||||
|
||||
IMAGE framebuffer FORMAT B8G8R8A8_UNORM DIM_2D WIDTH 64 HEIGHT 64
|
||||
IMAGE framebuffer_ref FORMAT B8G8R8A8_UNORM DIM_2D WIDTH 64 HEIGHT 64
|
||||
|
||||
PIPELINE graphics graphics_pipeline
|
||||
ATTACH vert_shader
|
||||
ATTACH frag_shader
|
||||
VERTEX_DATA position LOCATION 0
|
||||
INDEX_DATA indices
|
||||
FRAMEBUFFER_SIZE 64 64
|
||||
BIND BUFFER framebuffer AS color LOCATION 0
|
||||
END
|
||||
|
||||
PIPELINE graphics graphics_pipeline_ref
|
||||
ATTACH vert_shader
|
||||
ATTACH frag_shader
|
||||
VERTEX_DATA position LOCATION 0
|
||||
INDEX_DATA indices_ref
|
||||
FRAMEBUFFER_SIZE 64 64
|
||||
BIND BUFFER framebuffer_ref AS color LOCATION 0
|
||||
END
|
||||
|
||||
CLEAR_COLOR graphics_pipeline 0 0 0 0
|
||||
CLEAR graphics_pipeline
|
||||
RUN graphics_pipeline DRAW_ARRAY AS LINE_STRIP INDEXED START_IDX 0 COUNT 5
|
||||
CLEAR_COLOR graphics_pipeline_ref 0 0 0 0
|
||||
CLEAR graphics_pipeline_ref
|
||||
RUN graphics_pipeline_ref DRAW_ARRAY AS LINE_STRIP INDEXED START_IDX 0 COUNT 5
|
||||
EXPECT framebuffer EQ_BUFFER framebuffer_ref
|
||||
+94
@@ -0,0 +1,94 @@
|
||||
#!amber
|
||||
# Copyright 2022 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
DEVICE_FEATURE IndexTypeUint8Features.indexTypeUint8
|
||||
|
||||
SHADER compute compute_shader GLSL
|
||||
#version 430
|
||||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
|
||||
layout(set = 0, binding = 0) buffer block0
|
||||
{
|
||||
vec4 pos[256];
|
||||
};
|
||||
|
||||
void main()
|
||||
{
|
||||
pos[0] = vec4(-0.5, -0.5, 0.0, 1.0);
|
||||
pos[1] = vec4(-0.5, 0.5, 0.0, 1.0);
|
||||
pos[2] = vec4(0.5, 0.5, 0.0, 1.0);
|
||||
pos[3] = pos[255] = vec4(0.5, -0.5, 0.0, 1.0);
|
||||
}
|
||||
END
|
||||
|
||||
SHADER vertex vert_shader PASSTHROUGH
|
||||
|
||||
SHADER fragment frag_shader GLSL
|
||||
#version 430
|
||||
layout(location = 0) out vec4 color_out;
|
||||
void main()
|
||||
{
|
||||
color_out = vec4(0.0, 1.0, 0.0, 1.0);
|
||||
}
|
||||
END
|
||||
|
||||
BUFFER position DATA_TYPE vec4<float> SIZE 256 FILL 0.0
|
||||
|
||||
BUFFER indices DATA_TYPE uint8 DATA
|
||||
0 1 255 2 0
|
||||
END
|
||||
|
||||
BUFFER indices_ref DATA_TYPE uint8 DATA
|
||||
0 1 3 2 0
|
||||
END
|
||||
|
||||
PIPELINE compute compute_pipeline
|
||||
ATTACH compute_shader
|
||||
FRAMEBUFFER_SIZE 64 64
|
||||
|
||||
BIND BUFFER position AS storage DESCRIPTOR_SET 0 BINDING 0
|
||||
END
|
||||
|
||||
RUN compute_pipeline 1 1 1
|
||||
|
||||
IMAGE framebuffer FORMAT B8G8R8A8_UNORM DIM_2D WIDTH 64 HEIGHT 64
|
||||
IMAGE framebuffer_ref FORMAT B8G8R8A8_UNORM DIM_2D WIDTH 64 HEIGHT 64
|
||||
|
||||
PIPELINE graphics graphics_pipeline
|
||||
ATTACH vert_shader
|
||||
ATTACH frag_shader
|
||||
VERTEX_DATA position LOCATION 0
|
||||
INDEX_DATA indices
|
||||
FRAMEBUFFER_SIZE 64 64
|
||||
BIND BUFFER framebuffer AS color LOCATION 0
|
||||
END
|
||||
|
||||
PIPELINE graphics graphics_pipeline_ref
|
||||
ATTACH vert_shader
|
||||
ATTACH frag_shader
|
||||
VERTEX_DATA position LOCATION 0
|
||||
INDEX_DATA indices_ref
|
||||
FRAMEBUFFER_SIZE 64 64
|
||||
BIND BUFFER framebuffer_ref AS color LOCATION 0
|
||||
END
|
||||
|
||||
CLEAR_COLOR graphics_pipeline 0 0 0 0
|
||||
CLEAR graphics_pipeline
|
||||
RUN graphics_pipeline DRAW_ARRAY AS LINE_STRIP INDEXED START_IDX 0 COUNT 5
|
||||
CLEAR_COLOR graphics_pipeline_ref 0 0 0 0
|
||||
CLEAR graphics_pipeline_ref
|
||||
RUN graphics_pipeline_ref DRAW_ARRAY AS LINE_STRIP INDEXED START_IDX 0 COUNT 5
|
||||
EXPECT framebuffer EQ_BUFFER framebuffer_ref
|
||||
+111
@@ -0,0 +1,111 @@
|
||||
#!amber
|
||||
# Copyright 2022 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
DEVICE_FEATURE geometryShader
|
||||
|
||||
SHADER compute compute_shader GLSL
|
||||
#version 430
|
||||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
|
||||
layout(set = 0, binding = 0) buffer block0
|
||||
{
|
||||
vec4 pos[65536];
|
||||
};
|
||||
|
||||
void main()
|
||||
{
|
||||
pos[0] = vec4(-0.5, -0.5, 0.0, 1.0);
|
||||
pos[1] = vec4(-0.5, 0.5, 0.0, 1.0);
|
||||
pos[2] = vec4(0.5, 0.5, 0.0, 1.0);
|
||||
pos[3] = pos[65535] = vec4(0.5, -0.5, 0.0, 1.0);
|
||||
}
|
||||
END
|
||||
|
||||
SHADER vertex vert_shader PASSTHROUGH
|
||||
|
||||
SHADER fragment frag_shader GLSL
|
||||
#version 430
|
||||
layout(location = 0) out vec4 color_out;
|
||||
void main()
|
||||
{
|
||||
color_out = vec4(0.0, 1.0, 0.0, 1.0);
|
||||
}
|
||||
END
|
||||
|
||||
SHADER geometry geom_shader GLSL
|
||||
#version 430
|
||||
layout(lines_adjacency) in;
|
||||
layout(line_strip, max_vertices = 2) out;
|
||||
|
||||
void main (void)
|
||||
{
|
||||
for (int i = 1; i < 3; i++)
|
||||
{
|
||||
gl_Position = gl_in[i].gl_Position;
|
||||
EmitVertex();
|
||||
}
|
||||
EndPrimitive();
|
||||
}
|
||||
END
|
||||
|
||||
BUFFER position DATA_TYPE vec4<float> SIZE 65536 FILL 0.0
|
||||
|
||||
BUFFER indices DATA_TYPE uint16 DATA
|
||||
65535 0 1 65535 2 0 65535
|
||||
END
|
||||
|
||||
BUFFER indices_ref DATA_TYPE uint16 DATA
|
||||
3 0 1 3 2 0 3
|
||||
END
|
||||
|
||||
PIPELINE compute compute_pipeline
|
||||
ATTACH compute_shader
|
||||
FRAMEBUFFER_SIZE 64 64
|
||||
|
||||
BIND BUFFER position AS storage DESCRIPTOR_SET 0 BINDING 0
|
||||
END
|
||||
|
||||
RUN compute_pipeline 1 1 1
|
||||
|
||||
IMAGE framebuffer FORMAT B8G8R8A8_UNORM DIM_2D WIDTH 64 HEIGHT 64
|
||||
IMAGE framebuffer_ref FORMAT B8G8R8A8_UNORM DIM_2D WIDTH 64 HEIGHT 64
|
||||
|
||||
PIPELINE graphics graphics_pipeline
|
||||
ATTACH vert_shader
|
||||
ATTACH frag_shader
|
||||
ATTACH geom_shader
|
||||
VERTEX_DATA position LOCATION 0
|
||||
INDEX_DATA indices
|
||||
FRAMEBUFFER_SIZE 64 64
|
||||
BIND BUFFER framebuffer AS color LOCATION 0
|
||||
END
|
||||
|
||||
PIPELINE graphics graphics_pipeline_ref
|
||||
ATTACH vert_shader
|
||||
ATTACH frag_shader
|
||||
VERTEX_DATA position LOCATION 0
|
||||
INDEX_DATA indices_ref
|
||||
FRAMEBUFFER_SIZE 64 64
|
||||
BIND BUFFER framebuffer_ref AS color LOCATION 0
|
||||
END
|
||||
|
||||
CLEAR_COLOR graphics_pipeline 0 0 0 0
|
||||
CLEAR graphics_pipeline
|
||||
RUN graphics_pipeline DRAW_ARRAY AS LINE_STRIP_WITH_ADJACENCY INDEXED START_IDX 0 COUNT 7
|
||||
CLEAR_COLOR graphics_pipeline_ref 0 0 0 0
|
||||
CLEAR graphics_pipeline_ref
|
||||
RUN graphics_pipeline_ref DRAW_ARRAY AS LINE_STRIP_WITH_ADJACENCY INDEXED START_IDX 0 COUNT 7
|
||||
EXPECT framebuffer EQ_BUFFER framebuffer_ref
|
||||
+113
@@ -0,0 +1,113 @@
|
||||
#!amber
|
||||
# Copyright 2022 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
DEVICE_FEATURE IndexTypeUint8Features.indexTypeUint8
|
||||
|
||||
DEVICE_FEATURE geometryShader
|
||||
|
||||
SHADER compute compute_shader GLSL
|
||||
#version 430
|
||||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
|
||||
layout(set = 0, binding = 0) buffer block0
|
||||
{
|
||||
vec4 pos[256];
|
||||
};
|
||||
|
||||
void main()
|
||||
{
|
||||
pos[0] = vec4(-0.5, -0.5, 0.0, 1.0);
|
||||
pos[1] = vec4(-0.5, 0.5, 0.0, 1.0);
|
||||
pos[2] = vec4(0.5, 0.5, 0.0, 1.0);
|
||||
pos[3] = pos[255] = vec4(0.5, -0.5, 0.0, 1.0);
|
||||
}
|
||||
END
|
||||
|
||||
SHADER vertex vert_shader PASSTHROUGH
|
||||
|
||||
SHADER fragment frag_shader GLSL
|
||||
#version 430
|
||||
layout(location = 0) out vec4 color_out;
|
||||
void main()
|
||||
{
|
||||
color_out = vec4(0.0, 1.0, 0.0, 1.0);
|
||||
}
|
||||
END
|
||||
|
||||
SHADER geometry geom_shader GLSL
|
||||
#version 430
|
||||
layout(lines_adjacency) in;
|
||||
layout(line_strip, max_vertices = 2) out;
|
||||
|
||||
void main (void)
|
||||
{
|
||||
for (int i = 1; i < 3; i++)
|
||||
{
|
||||
gl_Position = gl_in[i].gl_Position;
|
||||
EmitVertex();
|
||||
}
|
||||
EndPrimitive();
|
||||
}
|
||||
END
|
||||
|
||||
BUFFER position DATA_TYPE vec4<float> SIZE 256 FILL 0.0
|
||||
|
||||
BUFFER indices DATA_TYPE uint8 DATA
|
||||
255 0 1 255 2 0 255
|
||||
END
|
||||
|
||||
BUFFER indices_ref DATA_TYPE uint8 DATA
|
||||
3 0 1 3 2 0 3
|
||||
END
|
||||
|
||||
PIPELINE compute compute_pipeline
|
||||
ATTACH compute_shader
|
||||
FRAMEBUFFER_SIZE 64 64
|
||||
|
||||
BIND BUFFER position AS storage DESCRIPTOR_SET 0 BINDING 0
|
||||
END
|
||||
|
||||
RUN compute_pipeline 1 1 1
|
||||
|
||||
IMAGE framebuffer FORMAT B8G8R8A8_UNORM DIM_2D WIDTH 64 HEIGHT 64
|
||||
IMAGE framebuffer_ref FORMAT B8G8R8A8_UNORM DIM_2D WIDTH 64 HEIGHT 64
|
||||
|
||||
PIPELINE graphics graphics_pipeline
|
||||
ATTACH vert_shader
|
||||
ATTACH frag_shader
|
||||
ATTACH geom_shader
|
||||
VERTEX_DATA position LOCATION 0
|
||||
INDEX_DATA indices
|
||||
FRAMEBUFFER_SIZE 64 64
|
||||
BIND BUFFER framebuffer AS color LOCATION 0
|
||||
END
|
||||
|
||||
PIPELINE graphics graphics_pipeline_ref
|
||||
ATTACH vert_shader
|
||||
ATTACH frag_shader
|
||||
VERTEX_DATA position LOCATION 0
|
||||
INDEX_DATA indices_ref
|
||||
FRAMEBUFFER_SIZE 64 64
|
||||
BIND BUFFER framebuffer_ref AS color LOCATION 0
|
||||
END
|
||||
|
||||
CLEAR_COLOR graphics_pipeline 0 0 0 0
|
||||
CLEAR graphics_pipeline
|
||||
RUN graphics_pipeline DRAW_ARRAY AS LINE_STRIP_WITH_ADJACENCY INDEXED START_IDX 0 COUNT 7
|
||||
CLEAR_COLOR graphics_pipeline_ref 0 0 0 0
|
||||
CLEAR graphics_pipeline_ref
|
||||
RUN graphics_pipeline_ref DRAW_ARRAY AS LINE_STRIP_WITH_ADJACENCY INDEXED START_IDX 0 COUNT 7
|
||||
EXPECT framebuffer EQ_BUFFER framebuffer_ref
|
||||
+132
@@ -0,0 +1,132 @@
|
||||
#!amber
|
||||
# Copyright 2022 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
DEVICE_EXTENSION VK_EXT_primitive_topology_list_restart
|
||||
|
||||
DEVICE_FEATURE tessellationShader
|
||||
|
||||
SHADER compute compute_shader GLSL
|
||||
#version 430
|
||||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
|
||||
layout(set = 0, binding = 0) buffer block0
|
||||
{
|
||||
vec4 pos[65536];
|
||||
};
|
||||
|
||||
void main()
|
||||
{
|
||||
pos[0] = vec4(-0.5, -0.5, 0.0, 1.0);
|
||||
pos[1] = vec4(-0.5, 0.5, 0.0, 1.0);
|
||||
pos[2] = vec4(0.5, 0.5, 0.0, 1.0);
|
||||
pos[3] = pos[65535] = vec4(0.5, -0.5, 0.0, 1.0);
|
||||
}
|
||||
END
|
||||
|
||||
SHADER vertex vert_shader PASSTHROUGH
|
||||
|
||||
SHADER fragment frag_shader GLSL
|
||||
#version 430
|
||||
layout(location = 0) out vec4 color_out;
|
||||
void main()
|
||||
{
|
||||
color_out = vec4(0.0, 1.0, 0.0, 1.0);
|
||||
}
|
||||
END
|
||||
|
||||
SHADER tessellation_control tcs_shader GLSL
|
||||
#version 430
|
||||
layout(vertices = 4) out;
|
||||
|
||||
void main (void)
|
||||
{
|
||||
if (gl_InvocationID == 0)
|
||||
{
|
||||
gl_TessLevelInner[0] = 2.0f;
|
||||
gl_TessLevelInner[1] = 2.0f;
|
||||
gl_TessLevelOuter[0] = 2.0f;
|
||||
gl_TessLevelOuter[1] = 2.0f;
|
||||
gl_TessLevelOuter[2] = 2.0f;
|
||||
gl_TessLevelOuter[3] = 2.0f;
|
||||
}
|
||||
gl_out[gl_InvocationID].gl_Position = gl_in[gl_InvocationID].gl_Position;
|
||||
}
|
||||
END
|
||||
|
||||
SHADER tessellation_evaluation tes_shader GLSL
|
||||
#version 430
|
||||
layout(quads, equal_spacing, ccw) in;
|
||||
void main (void)
|
||||
{
|
||||
const float u = gl_TessCoord.x;
|
||||
const float v = gl_TessCoord.y;
|
||||
gl_Position = (1 - u) * (1 - v) * gl_in[0].gl_Position + (1 - u) * v * gl_in[1].gl_Position + u * (1 - v) * gl_in[2].gl_Position + u * v * gl_in[3].gl_Position;
|
||||
}
|
||||
END
|
||||
|
||||
BUFFER position DATA_TYPE vec4<float> SIZE 65536 FILL 0.0
|
||||
|
||||
BUFFER indices DATA_TYPE uint16 DATA
|
||||
0 1 65535 2
|
||||
END
|
||||
|
||||
BUFFER indices_ref DATA_TYPE uint16 DATA
|
||||
0 1 3 2
|
||||
END
|
||||
|
||||
PIPELINE compute compute_pipeline
|
||||
ATTACH compute_shader
|
||||
FRAMEBUFFER_SIZE 64 64
|
||||
|
||||
BIND BUFFER position AS storage DESCRIPTOR_SET 0 BINDING 0
|
||||
END
|
||||
|
||||
RUN compute_pipeline 1 1 1
|
||||
|
||||
IMAGE framebuffer FORMAT B8G8R8A8_UNORM DIM_2D WIDTH 64 HEIGHT 64
|
||||
IMAGE framebuffer_ref FORMAT B8G8R8A8_UNORM DIM_2D WIDTH 64 HEIGHT 64
|
||||
|
||||
PIPELINE graphics graphics_pipeline
|
||||
ATTACH vert_shader
|
||||
ATTACH frag_shader
|
||||
ATTACH tcs_shader
|
||||
ATTACH tes_shader
|
||||
PATCH_CONTROL_POINTS 4
|
||||
VERTEX_DATA position LOCATION 0
|
||||
INDEX_DATA indices
|
||||
FRAMEBUFFER_SIZE 64 64
|
||||
BIND BUFFER framebuffer AS color LOCATION 0
|
||||
END
|
||||
|
||||
PIPELINE graphics graphics_pipeline_ref
|
||||
ATTACH vert_shader
|
||||
ATTACH frag_shader
|
||||
ATTACH tcs_shader
|
||||
ATTACH tes_shader
|
||||
PATCH_CONTROL_POINTS 4
|
||||
VERTEX_DATA position LOCATION 0
|
||||
INDEX_DATA indices_ref
|
||||
FRAMEBUFFER_SIZE 64 64
|
||||
BIND BUFFER framebuffer_ref AS color LOCATION 0
|
||||
END
|
||||
|
||||
CLEAR_COLOR graphics_pipeline 0 0 0 0
|
||||
CLEAR graphics_pipeline
|
||||
RUN graphics_pipeline DRAW_ARRAY AS PATCH_LIST INDEXED START_IDX 0 COUNT 4
|
||||
CLEAR_COLOR graphics_pipeline_ref 0 0 0 0
|
||||
CLEAR graphics_pipeline_ref
|
||||
RUN graphics_pipeline_ref DRAW_ARRAY AS PATCH_LIST INDEXED START_IDX 0 COUNT 4
|
||||
EXPECT framebuffer EQ_BUFFER framebuffer_ref
|
||||
+136
@@ -0,0 +1,136 @@
|
||||
#!amber
|
||||
# Copyright 2022 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
DEVICE_FEATURE IndexTypeUint8Features.indexTypeUint8
|
||||
DEVICE_EXTENSION VK_EXT_primitive_topology_list_restart
|
||||
|
||||
DEVICE_FEATURE tessellationShader
|
||||
|
||||
SHADER compute compute_shader GLSL
|
||||
#version 430
|
||||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
|
||||
layout(set = 0, binding = 0) buffer block0
|
||||
{
|
||||
vec4 pos[256];
|
||||
};
|
||||
|
||||
void main()
|
||||
{
|
||||
pos[0] = vec4(-0.5, -0.5, 0.0, 1.0);
|
||||
pos[1] = vec4(-0.5, 0.5, 0.0, 1.0);
|
||||
pos[2] = vec4(0.5, 0.5, 0.0, 1.0);
|
||||
pos[3] = pos[255] = vec4(0.5, -0.5, 0.0, 1.0);
|
||||
}
|
||||
END
|
||||
|
||||
SHADER vertex vert_shader PASSTHROUGH
|
||||
|
||||
SHADER fragment frag_shader GLSL
|
||||
#version 430
|
||||
layout(location = 0) out vec4 color_out;
|
||||
void main()
|
||||
{
|
||||
color_out = vec4(0.0, 1.0, 0.0, 1.0);
|
||||
}
|
||||
END
|
||||
|
||||
SHADER tessellation_control tcs_shader GLSL
|
||||
#version 430
|
||||
layout(vertices = 4) out;
|
||||
|
||||
void main (void)
|
||||
{
|
||||
if (gl_InvocationID == 0)
|
||||
{
|
||||
gl_TessLevelInner[0] = 2.0f;
|
||||
gl_TessLevelInner[1] = 2.0f;
|
||||
gl_TessLevelOuter[0] = 2.0f;
|
||||
gl_TessLevelOuter[1] = 2.0f;
|
||||
gl_TessLevelOuter[2] = 2.0f;
|
||||
gl_TessLevelOuter[3] = 2.0f;
|
||||
}
|
||||
gl_out[gl_InvocationID].gl_Position = gl_in[gl_InvocationID].gl_Position;
|
||||
}
|
||||
END
|
||||
|
||||
SHADER tessellation_evaluation tes_shader GLSL
|
||||
#version 430
|
||||
layout(quads, equal_spacing, ccw) in;
|
||||
void main (void)
|
||||
{
|
||||
const float u = gl_TessCoord.x;
|
||||
const float v = gl_TessCoord.y;
|
||||
gl_Position = (1 - u) * (1 - v) * gl_in[0].gl_Position + (1 - u) * v * gl_in[1].gl_Position + u * (1 - v) * gl_in[2].gl_Position + u * v * gl_in[3].gl_Position;
|
||||
}
|
||||
END
|
||||
|
||||
BUFFER position DATA_TYPE vec4<float> SIZE 256 FILL 0.0
|
||||
|
||||
BUFFER indices DATA_TYPE uint8 DATA
|
||||
0 1 255 2
|
||||
END
|
||||
|
||||
BUFFER indices_ref DATA_TYPE uint8 DATA
|
||||
0 1 3 2
|
||||
END
|
||||
|
||||
PIPELINE compute compute_pipeline
|
||||
ATTACH compute_shader
|
||||
FRAMEBUFFER_SIZE 64 64
|
||||
|
||||
BIND BUFFER position AS storage DESCRIPTOR_SET 0 BINDING 0
|
||||
END
|
||||
|
||||
RUN compute_pipeline 1 1 1
|
||||
|
||||
IMAGE framebuffer FORMAT B8G8R8A8_UNORM DIM_2D WIDTH 64 HEIGHT 64
|
||||
IMAGE framebuffer_ref FORMAT B8G8R8A8_UNORM DIM_2D WIDTH 64 HEIGHT 64
|
||||
|
||||
PIPELINE graphics graphics_pipeline
|
||||
ATTACH vert_shader
|
||||
ATTACH frag_shader
|
||||
ATTACH tcs_shader
|
||||
|
||||
ATTACH tes_shader
|
||||
|
||||
PATCH_CONTROL_POINTS 4
|
||||
|
||||
VERTEX_DATA position LOCATION 0
|
||||
INDEX_DATA indices
|
||||
FRAMEBUFFER_SIZE 64 64
|
||||
BIND BUFFER framebuffer AS color LOCATION 0
|
||||
END
|
||||
|
||||
PIPELINE graphics graphics_pipeline_ref
|
||||
ATTACH vert_shader
|
||||
ATTACH frag_shader
|
||||
ATTACH tcs_shader
|
||||
ATTACH tes_shader
|
||||
PATCH_CONTROL_POINTS 4
|
||||
VERTEX_DATA position LOCATION 0
|
||||
INDEX_DATA indices_ref
|
||||
FRAMEBUFFER_SIZE 64 64
|
||||
BIND BUFFER framebuffer_ref AS color LOCATION 0
|
||||
END
|
||||
|
||||
CLEAR_COLOR graphics_pipeline 0 0 0 0
|
||||
CLEAR graphics_pipeline
|
||||
RUN graphics_pipeline DRAW_ARRAY AS PATCH_LIST INDEXED START_IDX 0 COUNT 4
|
||||
CLEAR_COLOR graphics_pipeline_ref 0 0 0 0
|
||||
CLEAR graphics_pipeline_ref
|
||||
RUN graphics_pipeline_ref DRAW_ARRAY AS PATCH_LIST INDEXED START_IDX 0 COUNT 4
|
||||
EXPECT framebuffer EQ_BUFFER framebuffer_ref
|
||||
+102
@@ -0,0 +1,102 @@
|
||||
#!amber
|
||||
# Copyright 2022 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
DEVICE_EXTENSION VK_EXT_primitive_topology_list_restart
|
||||
|
||||
SHADER compute compute_shader GLSL
|
||||
#version 430
|
||||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
|
||||
layout(set = 0, binding = 0) buffer block0
|
||||
{
|
||||
vec4 pos[65536];
|
||||
};
|
||||
|
||||
void main()
|
||||
{
|
||||
pos[0] = vec4(-0.5, -0.5, 0.0, 1.0);
|
||||
pos[1] = vec4(-0.5, 0.5, 0.0, 1.0);
|
||||
pos[2] = vec4(0.5, 0.5, 0.0, 1.0);
|
||||
pos[3] = pos[65535] = vec4(0.5, -0.5, 0.0, 1.0);
|
||||
}
|
||||
END
|
||||
|
||||
SHADER vertex vert_shader GLSL
|
||||
#version 430
|
||||
layout(location = 0) in vec4 position;
|
||||
void main()
|
||||
{
|
||||
gl_Position = position;
|
||||
gl_PointSize = 1.0;
|
||||
}
|
||||
END
|
||||
|
||||
SHADER fragment frag_shader GLSL
|
||||
#version 430
|
||||
layout(location = 0) out vec4 color_out;
|
||||
void main()
|
||||
{
|
||||
color_out = vec4(0.0, 1.0, 0.0, 1.0);
|
||||
}
|
||||
END
|
||||
|
||||
BUFFER position DATA_TYPE vec4<float> SIZE 65536 FILL 0.0
|
||||
|
||||
BUFFER indices DATA_TYPE uint16 DATA
|
||||
0 1 2 65535
|
||||
END
|
||||
|
||||
BUFFER indices_ref DATA_TYPE uint16 DATA
|
||||
0 1 2 3
|
||||
END
|
||||
|
||||
PIPELINE compute compute_pipeline
|
||||
ATTACH compute_shader
|
||||
FRAMEBUFFER_SIZE 64 64
|
||||
|
||||
BIND BUFFER position AS storage DESCRIPTOR_SET 0 BINDING 0
|
||||
END
|
||||
|
||||
RUN compute_pipeline 1 1 1
|
||||
|
||||
IMAGE framebuffer FORMAT B8G8R8A8_UNORM DIM_2D WIDTH 64 HEIGHT 64
|
||||
IMAGE framebuffer_ref FORMAT B8G8R8A8_UNORM DIM_2D WIDTH 64 HEIGHT 64
|
||||
|
||||
PIPELINE graphics graphics_pipeline
|
||||
ATTACH vert_shader
|
||||
ATTACH frag_shader
|
||||
VERTEX_DATA position LOCATION 0
|
||||
INDEX_DATA indices
|
||||
FRAMEBUFFER_SIZE 64 64
|
||||
BIND BUFFER framebuffer AS color LOCATION 0
|
||||
END
|
||||
|
||||
PIPELINE graphics graphics_pipeline_ref
|
||||
ATTACH vert_shader
|
||||
ATTACH frag_shader
|
||||
VERTEX_DATA position LOCATION 0
|
||||
INDEX_DATA indices_ref
|
||||
FRAMEBUFFER_SIZE 64 64
|
||||
BIND BUFFER framebuffer_ref AS color LOCATION 0
|
||||
END
|
||||
|
||||
CLEAR_COLOR graphics_pipeline 0 0 0 0
|
||||
CLEAR graphics_pipeline
|
||||
RUN graphics_pipeline DRAW_ARRAY AS POINT_LIST INDEXED START_IDX 0 COUNT 4
|
||||
CLEAR_COLOR graphics_pipeline_ref 0 0 0 0
|
||||
CLEAR graphics_pipeline_ref
|
||||
RUN graphics_pipeline_ref DRAW_ARRAY AS POINT_LIST INDEXED START_IDX 0 COUNT 4
|
||||
EXPECT framebuffer EQ_BUFFER framebuffer_ref
|
||||
+103
@@ -0,0 +1,103 @@
|
||||
#!amber
|
||||
# Copyright 2022 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
DEVICE_FEATURE IndexTypeUint8Features.indexTypeUint8
|
||||
DEVICE_EXTENSION VK_EXT_primitive_topology_list_restart
|
||||
|
||||
SHADER compute compute_shader GLSL
|
||||
#version 430
|
||||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
|
||||
layout(set = 0, binding = 0) buffer block0
|
||||
{
|
||||
vec4 pos[256];
|
||||
};
|
||||
|
||||
void main()
|
||||
{
|
||||
pos[0] = vec4(-0.5, -0.5, 0.0, 1.0);
|
||||
pos[1] = vec4(-0.5, 0.5, 0.0, 1.0);
|
||||
pos[2] = vec4(0.5, 0.5, 0.0, 1.0);
|
||||
pos[3] = pos[255] = vec4(0.5, -0.5, 0.0, 1.0);
|
||||
}
|
||||
END
|
||||
|
||||
SHADER vertex vert_shader GLSL
|
||||
#version 430
|
||||
layout(location = 0) in vec4 position;
|
||||
void main()
|
||||
{
|
||||
gl_Position = position;
|
||||
gl_PointSize = 1.0;
|
||||
}
|
||||
END
|
||||
|
||||
SHADER fragment frag_shader GLSL
|
||||
#version 430
|
||||
layout(location = 0) out vec4 color_out;
|
||||
void main()
|
||||
{
|
||||
color_out = vec4(0.0, 1.0, 0.0, 1.0);
|
||||
}
|
||||
END
|
||||
|
||||
BUFFER position DATA_TYPE vec4<float> SIZE 256 FILL 0.0
|
||||
|
||||
BUFFER indices DATA_TYPE uint8 DATA
|
||||
0 1 2 255
|
||||
END
|
||||
|
||||
BUFFER indices_ref DATA_TYPE uint8 DATA
|
||||
0 1 2 3
|
||||
END
|
||||
|
||||
PIPELINE compute compute_pipeline
|
||||
ATTACH compute_shader
|
||||
FRAMEBUFFER_SIZE 64 64
|
||||
|
||||
BIND BUFFER position AS storage DESCRIPTOR_SET 0 BINDING 0
|
||||
END
|
||||
|
||||
RUN compute_pipeline 1 1 1
|
||||
|
||||
IMAGE framebuffer FORMAT B8G8R8A8_UNORM DIM_2D WIDTH 64 HEIGHT 64
|
||||
IMAGE framebuffer_ref FORMAT B8G8R8A8_UNORM DIM_2D WIDTH 64 HEIGHT 64
|
||||
|
||||
PIPELINE graphics graphics_pipeline
|
||||
ATTACH vert_shader
|
||||
ATTACH frag_shader
|
||||
VERTEX_DATA position LOCATION 0
|
||||
INDEX_DATA indices
|
||||
FRAMEBUFFER_SIZE 64 64
|
||||
BIND BUFFER framebuffer AS color LOCATION 0
|
||||
END
|
||||
|
||||
PIPELINE graphics graphics_pipeline_ref
|
||||
ATTACH vert_shader
|
||||
ATTACH frag_shader
|
||||
VERTEX_DATA position LOCATION 0
|
||||
INDEX_DATA indices_ref
|
||||
FRAMEBUFFER_SIZE 64 64
|
||||
BIND BUFFER framebuffer_ref AS color LOCATION 0
|
||||
END
|
||||
|
||||
CLEAR_COLOR graphics_pipeline 0 0 0 0
|
||||
CLEAR graphics_pipeline
|
||||
RUN graphics_pipeline DRAW_ARRAY AS POINT_LIST INDEXED START_IDX 0 COUNT 4
|
||||
CLEAR_COLOR graphics_pipeline_ref 0 0 0 0
|
||||
CLEAR graphics_pipeline_ref
|
||||
RUN graphics_pipeline_ref DRAW_ARRAY AS POINT_LIST INDEXED START_IDX 0 COUNT 4
|
||||
EXPECT framebuffer EQ_BUFFER framebuffer_ref
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
#!amber
|
||||
# Copyright 2022 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
SHADER compute compute_shader GLSL
|
||||
#version 430
|
||||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
|
||||
layout(set = 0, binding = 0) buffer block0
|
||||
{
|
||||
vec4 pos[65536];
|
||||
};
|
||||
|
||||
void main()
|
||||
{
|
||||
pos[0] = vec4(-0.5, -0.5, 0.0, 1.0);
|
||||
pos[1] = vec4(-0.5, 0.5, 0.0, 1.0);
|
||||
pos[2] = vec4(0.5, 0.5, 0.0, 1.0);
|
||||
pos[3] = pos[65535] = vec4(0.5, -0.5, 0.0, 1.0);
|
||||
}
|
||||
END
|
||||
|
||||
SHADER vertex vert_shader PASSTHROUGH
|
||||
|
||||
SHADER fragment frag_shader GLSL
|
||||
#version 430
|
||||
layout(location = 0) out vec4 color_out;
|
||||
void main()
|
||||
{
|
||||
color_out = vec4(0.0, 1.0, 0.0, 1.0);
|
||||
}
|
||||
END
|
||||
|
||||
BUFFER position DATA_TYPE vec4<float> SIZE 65536 FILL 0.0
|
||||
|
||||
BUFFER indices DATA_TYPE uint16 DATA
|
||||
0 1 2 65535
|
||||
END
|
||||
|
||||
BUFFER indices_ref DATA_TYPE uint16 DATA
|
||||
0 1 2 3
|
||||
END
|
||||
|
||||
PIPELINE compute compute_pipeline
|
||||
ATTACH compute_shader
|
||||
FRAMEBUFFER_SIZE 64 64
|
||||
|
||||
BIND BUFFER position AS storage DESCRIPTOR_SET 0 BINDING 0
|
||||
END
|
||||
|
||||
RUN compute_pipeline 1 1 1
|
||||
|
||||
IMAGE framebuffer FORMAT B8G8R8A8_UNORM DIM_2D WIDTH 64 HEIGHT 64
|
||||
IMAGE framebuffer_ref FORMAT B8G8R8A8_UNORM DIM_2D WIDTH 64 HEIGHT 64
|
||||
|
||||
PIPELINE graphics graphics_pipeline
|
||||
ATTACH vert_shader
|
||||
ATTACH frag_shader
|
||||
VERTEX_DATA position LOCATION 0
|
||||
INDEX_DATA indices
|
||||
FRAMEBUFFER_SIZE 64 64
|
||||
BIND BUFFER framebuffer AS color LOCATION 0
|
||||
END
|
||||
|
||||
PIPELINE graphics graphics_pipeline_ref
|
||||
ATTACH vert_shader
|
||||
ATTACH frag_shader
|
||||
VERTEX_DATA position LOCATION 0
|
||||
INDEX_DATA indices_ref
|
||||
FRAMEBUFFER_SIZE 64 64
|
||||
BIND BUFFER framebuffer_ref AS color LOCATION 0
|
||||
END
|
||||
|
||||
CLEAR_COLOR graphics_pipeline 0 0 0 0
|
||||
CLEAR graphics_pipeline
|
||||
RUN graphics_pipeline DRAW_ARRAY AS TRIANGLE_FAN INDEXED START_IDX 0 COUNT 4
|
||||
CLEAR_COLOR graphics_pipeline_ref 0 0 0 0
|
||||
CLEAR graphics_pipeline_ref
|
||||
RUN graphics_pipeline_ref DRAW_ARRAY AS TRIANGLE_FAN INDEXED START_IDX 0 COUNT 4
|
||||
EXPECT framebuffer EQ_BUFFER framebuffer_ref
|
||||
+94
@@ -0,0 +1,94 @@
|
||||
#!amber
|
||||
# Copyright 2022 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
DEVICE_FEATURE IndexTypeUint8Features.indexTypeUint8
|
||||
|
||||
SHADER compute compute_shader GLSL
|
||||
#version 430
|
||||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
|
||||
layout(set = 0, binding = 0) buffer block0
|
||||
{
|
||||
vec4 pos[256];
|
||||
};
|
||||
|
||||
void main()
|
||||
{
|
||||
pos[0] = vec4(-0.5, -0.5, 0.0, 1.0);
|
||||
pos[1] = vec4(-0.5, 0.5, 0.0, 1.0);
|
||||
pos[2] = vec4(0.5, 0.5, 0.0, 1.0);
|
||||
pos[3] = pos[255] = vec4(0.5, -0.5, 0.0, 1.0);
|
||||
}
|
||||
END
|
||||
|
||||
SHADER vertex vert_shader PASSTHROUGH
|
||||
|
||||
SHADER fragment frag_shader GLSL
|
||||
#version 430
|
||||
layout(location = 0) out vec4 color_out;
|
||||
void main()
|
||||
{
|
||||
color_out = vec4(0.0, 1.0, 0.0, 1.0);
|
||||
}
|
||||
END
|
||||
|
||||
BUFFER position DATA_TYPE vec4<float> SIZE 256 FILL 0.0
|
||||
|
||||
BUFFER indices DATA_TYPE uint8 DATA
|
||||
0 1 2 255
|
||||
END
|
||||
|
||||
BUFFER indices_ref DATA_TYPE uint8 DATA
|
||||
0 1 2 3
|
||||
END
|
||||
|
||||
PIPELINE compute compute_pipeline
|
||||
ATTACH compute_shader
|
||||
FRAMEBUFFER_SIZE 64 64
|
||||
|
||||
BIND BUFFER position AS storage DESCRIPTOR_SET 0 BINDING 0
|
||||
END
|
||||
|
||||
RUN compute_pipeline 1 1 1
|
||||
|
||||
IMAGE framebuffer FORMAT B8G8R8A8_UNORM DIM_2D WIDTH 64 HEIGHT 64
|
||||
IMAGE framebuffer_ref FORMAT B8G8R8A8_UNORM DIM_2D WIDTH 64 HEIGHT 64
|
||||
|
||||
PIPELINE graphics graphics_pipeline
|
||||
ATTACH vert_shader
|
||||
ATTACH frag_shader
|
||||
VERTEX_DATA position LOCATION 0
|
||||
INDEX_DATA indices
|
||||
FRAMEBUFFER_SIZE 64 64
|
||||
BIND BUFFER framebuffer AS color LOCATION 0
|
||||
END
|
||||
|
||||
PIPELINE graphics graphics_pipeline_ref
|
||||
ATTACH vert_shader
|
||||
ATTACH frag_shader
|
||||
VERTEX_DATA position LOCATION 0
|
||||
INDEX_DATA indices_ref
|
||||
FRAMEBUFFER_SIZE 64 64
|
||||
BIND BUFFER framebuffer_ref AS color LOCATION 0
|
||||
END
|
||||
|
||||
CLEAR_COLOR graphics_pipeline 0 0 0 0
|
||||
CLEAR graphics_pipeline
|
||||
RUN graphics_pipeline DRAW_ARRAY AS TRIANGLE_FAN INDEXED START_IDX 0 COUNT 4
|
||||
CLEAR_COLOR graphics_pipeline_ref 0 0 0 0
|
||||
CLEAR graphics_pipeline_ref
|
||||
RUN graphics_pipeline_ref DRAW_ARRAY AS TRIANGLE_FAN INDEXED START_IDX 0 COUNT 4
|
||||
EXPECT framebuffer EQ_BUFFER framebuffer_ref
|
||||
+94
@@ -0,0 +1,94 @@
|
||||
#!amber
|
||||
# Copyright 2022 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
DEVICE_EXTENSION VK_EXT_primitive_topology_list_restart
|
||||
|
||||
SHADER compute compute_shader GLSL
|
||||
#version 430
|
||||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
|
||||
layout(set = 0, binding = 0) buffer block0
|
||||
{
|
||||
vec4 pos[65536];
|
||||
};
|
||||
|
||||
void main()
|
||||
{
|
||||
pos[0] = vec4(-0.5, -0.5, 0.0, 1.0);
|
||||
pos[1] = vec4(-0.5, 0.5, 0.0, 1.0);
|
||||
pos[2] = vec4(0.5, 0.5, 0.0, 1.0);
|
||||
pos[3] = pos[65535] = vec4(0.5, -0.5, 0.0, 1.0);
|
||||
}
|
||||
END
|
||||
|
||||
SHADER vertex vert_shader PASSTHROUGH
|
||||
|
||||
SHADER fragment frag_shader GLSL
|
||||
#version 430
|
||||
layout(location = 0) out vec4 color_out;
|
||||
void main()
|
||||
{
|
||||
color_out = vec4(0.0, 1.0, 0.0, 1.0);
|
||||
}
|
||||
END
|
||||
|
||||
BUFFER position DATA_TYPE vec4<float> SIZE 65536 FILL 0.0
|
||||
|
||||
BUFFER indices DATA_TYPE uint16 DATA
|
||||
0 1 2 0 2 65535
|
||||
END
|
||||
|
||||
BUFFER indices_ref DATA_TYPE uint16 DATA
|
||||
0 1 2 0 2 3
|
||||
END
|
||||
|
||||
PIPELINE compute compute_pipeline
|
||||
ATTACH compute_shader
|
||||
FRAMEBUFFER_SIZE 64 64
|
||||
|
||||
BIND BUFFER position AS storage DESCRIPTOR_SET 0 BINDING 0
|
||||
END
|
||||
|
||||
RUN compute_pipeline 1 1 1
|
||||
|
||||
IMAGE framebuffer FORMAT B8G8R8A8_UNORM DIM_2D WIDTH 64 HEIGHT 64
|
||||
IMAGE framebuffer_ref FORMAT B8G8R8A8_UNORM DIM_2D WIDTH 64 HEIGHT 64
|
||||
|
||||
PIPELINE graphics graphics_pipeline
|
||||
ATTACH vert_shader
|
||||
ATTACH frag_shader
|
||||
VERTEX_DATA position LOCATION 0
|
||||
INDEX_DATA indices
|
||||
FRAMEBUFFER_SIZE 64 64
|
||||
BIND BUFFER framebuffer AS color LOCATION 0
|
||||
END
|
||||
|
||||
PIPELINE graphics graphics_pipeline_ref
|
||||
ATTACH vert_shader
|
||||
ATTACH frag_shader
|
||||
VERTEX_DATA position LOCATION 0
|
||||
INDEX_DATA indices_ref
|
||||
FRAMEBUFFER_SIZE 64 64
|
||||
BIND BUFFER framebuffer_ref AS color LOCATION 0
|
||||
END
|
||||
|
||||
CLEAR_COLOR graphics_pipeline 0 0 0 0
|
||||
CLEAR graphics_pipeline
|
||||
RUN graphics_pipeline DRAW_ARRAY AS TRIANGLE_LIST INDEXED START_IDX 0 COUNT 6
|
||||
CLEAR_COLOR graphics_pipeline_ref 0 0 0 0
|
||||
CLEAR graphics_pipeline_ref
|
||||
RUN graphics_pipeline_ref DRAW_ARRAY AS TRIANGLE_LIST INDEXED START_IDX 0 COUNT 6
|
||||
EXPECT framebuffer EQ_BUFFER framebuffer_ref
|
||||
+95
@@ -0,0 +1,95 @@
|
||||
#!amber
|
||||
# Copyright 2022 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
DEVICE_FEATURE IndexTypeUint8Features.indexTypeUint8
|
||||
DEVICE_EXTENSION VK_EXT_primitive_topology_list_restart
|
||||
|
||||
SHADER compute compute_shader GLSL
|
||||
#version 430
|
||||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
|
||||
layout(set = 0, binding = 0) buffer block0
|
||||
{
|
||||
vec4 pos[256];
|
||||
};
|
||||
|
||||
void main()
|
||||
{
|
||||
pos[0] = vec4(-0.5, -0.5, 0.0, 1.0);
|
||||
pos[1] = vec4(-0.5, 0.5, 0.0, 1.0);
|
||||
pos[2] = vec4(0.5, 0.5, 0.0, 1.0);
|
||||
pos[3] = pos[255] = vec4(0.5, -0.5, 0.0, 1.0);
|
||||
}
|
||||
END
|
||||
|
||||
SHADER vertex vert_shader PASSTHROUGH
|
||||
|
||||
SHADER fragment frag_shader GLSL
|
||||
#version 430
|
||||
layout(location = 0) out vec4 color_out;
|
||||
void main()
|
||||
{
|
||||
color_out = vec4(0.0, 1.0, 0.0, 1.0);
|
||||
}
|
||||
END
|
||||
|
||||
BUFFER position DATA_TYPE vec4<float> SIZE 256 FILL 0.0
|
||||
|
||||
BUFFER indices DATA_TYPE uint8 DATA
|
||||
0 1 2 0 2 255
|
||||
END
|
||||
|
||||
BUFFER indices_ref DATA_TYPE uint8 DATA
|
||||
0 1 2 0 2 3
|
||||
END
|
||||
|
||||
PIPELINE compute compute_pipeline
|
||||
ATTACH compute_shader
|
||||
FRAMEBUFFER_SIZE 64 64
|
||||
|
||||
BIND BUFFER position AS storage DESCRIPTOR_SET 0 BINDING 0
|
||||
END
|
||||
|
||||
RUN compute_pipeline 1 1 1
|
||||
|
||||
IMAGE framebuffer FORMAT B8G8R8A8_UNORM DIM_2D WIDTH 64 HEIGHT 64
|
||||
IMAGE framebuffer_ref FORMAT B8G8R8A8_UNORM DIM_2D WIDTH 64 HEIGHT 64
|
||||
|
||||
PIPELINE graphics graphics_pipeline
|
||||
ATTACH vert_shader
|
||||
ATTACH frag_shader
|
||||
VERTEX_DATA position LOCATION 0
|
||||
INDEX_DATA indices
|
||||
FRAMEBUFFER_SIZE 64 64
|
||||
BIND BUFFER framebuffer AS color LOCATION 0
|
||||
END
|
||||
|
||||
PIPELINE graphics graphics_pipeline_ref
|
||||
ATTACH vert_shader
|
||||
ATTACH frag_shader
|
||||
VERTEX_DATA position LOCATION 0
|
||||
INDEX_DATA indices_ref
|
||||
FRAMEBUFFER_SIZE 64 64
|
||||
BIND BUFFER framebuffer_ref AS color LOCATION 0
|
||||
END
|
||||
|
||||
CLEAR_COLOR graphics_pipeline 0 0 0 0
|
||||
CLEAR graphics_pipeline
|
||||
RUN graphics_pipeline DRAW_ARRAY AS TRIANGLE_LIST INDEXED START_IDX 0 COUNT 6
|
||||
CLEAR_COLOR graphics_pipeline_ref 0 0 0 0
|
||||
CLEAR graphics_pipeline_ref
|
||||
RUN graphics_pipeline_ref DRAW_ARRAY AS TRIANGLE_LIST INDEXED START_IDX 0 COUNT 6
|
||||
EXPECT framebuffer EQ_BUFFER framebuffer_ref
|
||||
+113
@@ -0,0 +1,113 @@
|
||||
#!amber
|
||||
# Copyright 2022 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
DEVICE_EXTENSION VK_EXT_primitive_topology_list_restart
|
||||
|
||||
DEVICE_FEATURE geometryShader
|
||||
|
||||
SHADER compute compute_shader GLSL
|
||||
#version 430
|
||||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
|
||||
layout(set = 0, binding = 0) buffer block0
|
||||
{
|
||||
vec4 pos[65536];
|
||||
};
|
||||
|
||||
void main()
|
||||
{
|
||||
pos[0] = vec4(-0.5, -0.5, 0.0, 1.0);
|
||||
pos[1] = vec4(-0.5, 0.5, 0.0, 1.0);
|
||||
pos[2] = vec4(0.5, 0.5, 0.0, 1.0);
|
||||
pos[3] = pos[65535] = vec4(0.5, -0.5, 0.0, 1.0);
|
||||
}
|
||||
END
|
||||
|
||||
SHADER vertex vert_shader PASSTHROUGH
|
||||
|
||||
SHADER fragment frag_shader GLSL
|
||||
#version 430
|
||||
layout(location = 0) out vec4 color_out;
|
||||
void main()
|
||||
{
|
||||
color_out = vec4(0.0, 1.0, 0.0, 1.0);
|
||||
}
|
||||
END
|
||||
|
||||
SHADER geometry geom_shader GLSL
|
||||
#version 430
|
||||
layout(triangles_adjacency) in;
|
||||
layout(triangle_strip, max_vertices = 3) out;
|
||||
|
||||
void main (void)
|
||||
{
|
||||
for (int i = 0; i < 6; i += 2)
|
||||
{
|
||||
gl_Position = gl_in[i].gl_Position;
|
||||
EmitVertex();
|
||||
}
|
||||
EndPrimitive();
|
||||
}
|
||||
END
|
||||
|
||||
BUFFER position DATA_TYPE vec4<float> SIZE 65536 FILL 0.0
|
||||
|
||||
BUFFER indices DATA_TYPE uint16 DATA
|
||||
0 65535 1 65535 2 65535 0 65535 2 65535 65535 65535
|
||||
END
|
||||
|
||||
BUFFER indices_ref DATA_TYPE uint16 DATA
|
||||
0 3 1 3 2 3 0 3 2 3 3 3
|
||||
END
|
||||
|
||||
PIPELINE compute compute_pipeline
|
||||
ATTACH compute_shader
|
||||
FRAMEBUFFER_SIZE 64 64
|
||||
|
||||
BIND BUFFER position AS storage DESCRIPTOR_SET 0 BINDING 0
|
||||
END
|
||||
|
||||
RUN compute_pipeline 1 1 1
|
||||
|
||||
IMAGE framebuffer FORMAT B8G8R8A8_UNORM DIM_2D WIDTH 64 HEIGHT 64
|
||||
IMAGE framebuffer_ref FORMAT B8G8R8A8_UNORM DIM_2D WIDTH 64 HEIGHT 64
|
||||
|
||||
PIPELINE graphics graphics_pipeline
|
||||
ATTACH vert_shader
|
||||
ATTACH frag_shader
|
||||
ATTACH geom_shader
|
||||
VERTEX_DATA position LOCATION 0
|
||||
INDEX_DATA indices
|
||||
FRAMEBUFFER_SIZE 64 64
|
||||
BIND BUFFER framebuffer AS color LOCATION 0
|
||||
END
|
||||
|
||||
PIPELINE graphics graphics_pipeline_ref
|
||||
ATTACH vert_shader
|
||||
ATTACH frag_shader
|
||||
VERTEX_DATA position LOCATION 0
|
||||
INDEX_DATA indices_ref
|
||||
FRAMEBUFFER_SIZE 64 64
|
||||
BIND BUFFER framebuffer_ref AS color LOCATION 0
|
||||
END
|
||||
|
||||
CLEAR_COLOR graphics_pipeline 0 0 0 0
|
||||
CLEAR graphics_pipeline
|
||||
RUN graphics_pipeline DRAW_ARRAY AS TRIANGLE_LIST_WITH_ADJACENCY INDEXED START_IDX 0 COUNT 12
|
||||
CLEAR_COLOR graphics_pipeline_ref 0 0 0 0
|
||||
CLEAR graphics_pipeline_ref
|
||||
RUN graphics_pipeline_ref DRAW_ARRAY AS TRIANGLE_LIST_WITH_ADJACENCY INDEXED START_IDX 0 COUNT 12
|
||||
EXPECT framebuffer EQ_BUFFER framebuffer_ref
|
||||
+114
@@ -0,0 +1,114 @@
|
||||
#!amber
|
||||
# Copyright 2022 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
DEVICE_FEATURE IndexTypeUint8Features.indexTypeUint8
|
||||
DEVICE_EXTENSION VK_EXT_primitive_topology_list_restart
|
||||
|
||||
DEVICE_FEATURE geometryShader
|
||||
|
||||
SHADER compute compute_shader GLSL
|
||||
#version 430
|
||||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
|
||||
layout(set = 0, binding = 0) buffer block0
|
||||
{
|
||||
vec4 pos[256];
|
||||
};
|
||||
|
||||
void main()
|
||||
{
|
||||
pos[0] = vec4(-0.5, -0.5, 0.0, 1.0);
|
||||
pos[1] = vec4(-0.5, 0.5, 0.0, 1.0);
|
||||
pos[2] = vec4(0.5, 0.5, 0.0, 1.0);
|
||||
pos[3] = pos[255] = vec4(0.5, -0.5, 0.0, 1.0);
|
||||
}
|
||||
END
|
||||
|
||||
SHADER vertex vert_shader PASSTHROUGH
|
||||
|
||||
SHADER fragment frag_shader GLSL
|
||||
#version 430
|
||||
layout(location = 0) out vec4 color_out;
|
||||
void main()
|
||||
{
|
||||
color_out = vec4(0.0, 1.0, 0.0, 1.0);
|
||||
}
|
||||
END
|
||||
|
||||
SHADER geometry geom_shader GLSL
|
||||
#version 430
|
||||
layout(triangles_adjacency) in;
|
||||
layout(triangle_strip, max_vertices = 3) out;
|
||||
|
||||
void main (void)
|
||||
{
|
||||
for (int i = 0; i < 6; i += 2)
|
||||
{
|
||||
gl_Position = gl_in[i].gl_Position;
|
||||
EmitVertex();
|
||||
}
|
||||
EndPrimitive();
|
||||
}
|
||||
END
|
||||
|
||||
BUFFER position DATA_TYPE vec4<float> SIZE 256 FILL 0.0
|
||||
|
||||
BUFFER indices DATA_TYPE uint8 DATA
|
||||
0 255 1 255 2 255 0 255 2 255 255 255
|
||||
END
|
||||
|
||||
BUFFER indices_ref DATA_TYPE uint8 DATA
|
||||
0 3 1 3 2 3 0 3 2 3 3 3
|
||||
END
|
||||
|
||||
PIPELINE compute compute_pipeline
|
||||
ATTACH compute_shader
|
||||
FRAMEBUFFER_SIZE 64 64
|
||||
|
||||
BIND BUFFER position AS storage DESCRIPTOR_SET 0 BINDING 0
|
||||
END
|
||||
|
||||
RUN compute_pipeline 1 1 1
|
||||
|
||||
IMAGE framebuffer FORMAT B8G8R8A8_UNORM DIM_2D WIDTH 64 HEIGHT 64
|
||||
IMAGE framebuffer_ref FORMAT B8G8R8A8_UNORM DIM_2D WIDTH 64 HEIGHT 64
|
||||
|
||||
PIPELINE graphics graphics_pipeline
|
||||
ATTACH vert_shader
|
||||
ATTACH frag_shader
|
||||
ATTACH geom_shader
|
||||
VERTEX_DATA position LOCATION 0
|
||||
INDEX_DATA indices
|
||||
FRAMEBUFFER_SIZE 64 64
|
||||
BIND BUFFER framebuffer AS color LOCATION 0
|
||||
END
|
||||
|
||||
PIPELINE graphics graphics_pipeline_ref
|
||||
ATTACH vert_shader
|
||||
ATTACH frag_shader
|
||||
VERTEX_DATA position LOCATION 0
|
||||
INDEX_DATA indices_ref
|
||||
FRAMEBUFFER_SIZE 64 64
|
||||
BIND BUFFER framebuffer_ref AS color LOCATION 0
|
||||
END
|
||||
|
||||
CLEAR_COLOR graphics_pipeline 0 0 0 0
|
||||
CLEAR graphics_pipeline
|
||||
RUN graphics_pipeline DRAW_ARRAY AS TRIANGLE_LIST_WITH_ADJACENCY INDEXED START_IDX 0 COUNT 12
|
||||
CLEAR_COLOR graphics_pipeline_ref 0 0 0 0
|
||||
CLEAR graphics_pipeline_ref
|
||||
RUN graphics_pipeline_ref DRAW_ARRAY AS TRIANGLE_LIST_WITH_ADJACENCY INDEXED START_IDX 0 COUNT 12
|
||||
EXPECT framebuffer EQ_BUFFER framebuffer_ref
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
#!amber
|
||||
# Copyright 2022 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
SHADER compute compute_shader GLSL
|
||||
#version 430
|
||||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
|
||||
layout(set = 0, binding = 0) buffer block0
|
||||
{
|
||||
vec4 pos[65536];
|
||||
};
|
||||
|
||||
void main()
|
||||
{
|
||||
pos[0] = vec4(-0.5, -0.5, 0.0, 1.0);
|
||||
pos[1] = vec4(-0.5, 0.5, 0.0, 1.0);
|
||||
pos[2] = vec4(0.5, 0.5, 0.0, 1.0);
|
||||
pos[3] = pos[65535] = vec4(0.5, -0.5, 0.0, 1.0);
|
||||
}
|
||||
END
|
||||
|
||||
SHADER vertex vert_shader PASSTHROUGH
|
||||
|
||||
SHADER fragment frag_shader GLSL
|
||||
#version 430
|
||||
layout(location = 0) out vec4 color_out;
|
||||
void main()
|
||||
{
|
||||
color_out = vec4(0.0, 1.0, 0.0, 1.0);
|
||||
}
|
||||
END
|
||||
|
||||
BUFFER position DATA_TYPE vec4<float> SIZE 65536 FILL 0.0
|
||||
|
||||
BUFFER indices DATA_TYPE uint16 DATA
|
||||
1 0 2 65535
|
||||
END
|
||||
|
||||
BUFFER indices_ref DATA_TYPE uint16 DATA
|
||||
1 0 2 3
|
||||
END
|
||||
|
||||
PIPELINE compute compute_pipeline
|
||||
ATTACH compute_shader
|
||||
FRAMEBUFFER_SIZE 64 64
|
||||
|
||||
BIND BUFFER position AS storage DESCRIPTOR_SET 0 BINDING 0
|
||||
END
|
||||
|
||||
RUN compute_pipeline 1 1 1
|
||||
|
||||
IMAGE framebuffer FORMAT B8G8R8A8_UNORM DIM_2D WIDTH 64 HEIGHT 64
|
||||
IMAGE framebuffer_ref FORMAT B8G8R8A8_UNORM DIM_2D WIDTH 64 HEIGHT 64
|
||||
|
||||
PIPELINE graphics graphics_pipeline
|
||||
ATTACH vert_shader
|
||||
ATTACH frag_shader
|
||||
VERTEX_DATA position LOCATION 0
|
||||
INDEX_DATA indices
|
||||
FRAMEBUFFER_SIZE 64 64
|
||||
BIND BUFFER framebuffer AS color LOCATION 0
|
||||
END
|
||||
|
||||
PIPELINE graphics graphics_pipeline_ref
|
||||
ATTACH vert_shader
|
||||
ATTACH frag_shader
|
||||
VERTEX_DATA position LOCATION 0
|
||||
INDEX_DATA indices_ref
|
||||
FRAMEBUFFER_SIZE 64 64
|
||||
BIND BUFFER framebuffer_ref AS color LOCATION 0
|
||||
END
|
||||
|
||||
CLEAR_COLOR graphics_pipeline 0 0 0 0
|
||||
CLEAR graphics_pipeline
|
||||
RUN graphics_pipeline DRAW_ARRAY AS TRIANGLE_STRIP INDEXED START_IDX 0 COUNT 4
|
||||
CLEAR_COLOR graphics_pipeline_ref 0 0 0 0
|
||||
CLEAR graphics_pipeline_ref
|
||||
RUN graphics_pipeline_ref DRAW_ARRAY AS TRIANGLE_STRIP INDEXED START_IDX 0 COUNT 4
|
||||
EXPECT framebuffer EQ_BUFFER framebuffer_ref
|
||||
+94
@@ -0,0 +1,94 @@
|
||||
#!amber
|
||||
# Copyright 2022 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
DEVICE_FEATURE IndexTypeUint8Features.indexTypeUint8
|
||||
|
||||
SHADER compute compute_shader GLSL
|
||||
#version 430
|
||||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
|
||||
layout(set = 0, binding = 0) buffer block0
|
||||
{
|
||||
vec4 pos[256];
|
||||
};
|
||||
|
||||
void main()
|
||||
{
|
||||
pos[0] = vec4(-0.5, -0.5, 0.0, 1.0);
|
||||
pos[1] = vec4(-0.5, 0.5, 0.0, 1.0);
|
||||
pos[2] = vec4(0.5, 0.5, 0.0, 1.0);
|
||||
pos[3] = pos[255] = vec4(0.5, -0.5, 0.0, 1.0);
|
||||
}
|
||||
END
|
||||
|
||||
SHADER vertex vert_shader PASSTHROUGH
|
||||
|
||||
SHADER fragment frag_shader GLSL
|
||||
#version 430
|
||||
layout(location = 0) out vec4 color_out;
|
||||
void main()
|
||||
{
|
||||
color_out = vec4(0.0, 1.0, 0.0, 1.0);
|
||||
}
|
||||
END
|
||||
|
||||
BUFFER position DATA_TYPE vec4<float> SIZE 256 FILL 0.0
|
||||
|
||||
BUFFER indices DATA_TYPE uint8 DATA
|
||||
1 0 2 255
|
||||
END
|
||||
|
||||
BUFFER indices_ref DATA_TYPE uint8 DATA
|
||||
1 0 2 3
|
||||
END
|
||||
|
||||
PIPELINE compute compute_pipeline
|
||||
ATTACH compute_shader
|
||||
FRAMEBUFFER_SIZE 64 64
|
||||
|
||||
BIND BUFFER position AS storage DESCRIPTOR_SET 0 BINDING 0
|
||||
END
|
||||
|
||||
RUN compute_pipeline 1 1 1
|
||||
|
||||
IMAGE framebuffer FORMAT B8G8R8A8_UNORM DIM_2D WIDTH 64 HEIGHT 64
|
||||
IMAGE framebuffer_ref FORMAT B8G8R8A8_UNORM DIM_2D WIDTH 64 HEIGHT 64
|
||||
|
||||
PIPELINE graphics graphics_pipeline
|
||||
ATTACH vert_shader
|
||||
ATTACH frag_shader
|
||||
VERTEX_DATA position LOCATION 0
|
||||
INDEX_DATA indices
|
||||
FRAMEBUFFER_SIZE 64 64
|
||||
BIND BUFFER framebuffer AS color LOCATION 0
|
||||
END
|
||||
|
||||
PIPELINE graphics graphics_pipeline_ref
|
||||
ATTACH vert_shader
|
||||
ATTACH frag_shader
|
||||
VERTEX_DATA position LOCATION 0
|
||||
INDEX_DATA indices_ref
|
||||
FRAMEBUFFER_SIZE 64 64
|
||||
BIND BUFFER framebuffer_ref AS color LOCATION 0
|
||||
END
|
||||
|
||||
CLEAR_COLOR graphics_pipeline 0 0 0 0
|
||||
CLEAR graphics_pipeline
|
||||
RUN graphics_pipeline DRAW_ARRAY AS TRIANGLE_STRIP INDEXED START_IDX 0 COUNT 4
|
||||
CLEAR_COLOR graphics_pipeline_ref 0 0 0 0
|
||||
CLEAR graphics_pipeline_ref
|
||||
RUN graphics_pipeline_ref DRAW_ARRAY AS TRIANGLE_STRIP INDEXED START_IDX 0 COUNT 4
|
||||
EXPECT framebuffer EQ_BUFFER framebuffer_ref
|
||||
+111
@@ -0,0 +1,111 @@
|
||||
#!amber
|
||||
# Copyright 2022 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
DEVICE_FEATURE geometryShader
|
||||
|
||||
SHADER compute compute_shader GLSL
|
||||
#version 430
|
||||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
|
||||
layout(set = 0, binding = 0) buffer block0
|
||||
{
|
||||
vec4 pos[65536];
|
||||
};
|
||||
|
||||
void main()
|
||||
{
|
||||
pos[0] = vec4(-0.5, -0.5, 0.0, 1.0);
|
||||
pos[1] = vec4(-0.5, 0.5, 0.0, 1.0);
|
||||
pos[2] = vec4(0.5, 0.5, 0.0, 1.0);
|
||||
pos[3] = pos[65535] = vec4(0.5, -0.5, 0.0, 1.0);
|
||||
}
|
||||
END
|
||||
|
||||
SHADER vertex vert_shader PASSTHROUGH
|
||||
|
||||
SHADER fragment frag_shader GLSL
|
||||
#version 430
|
||||
layout(location = 0) out vec4 color_out;
|
||||
void main()
|
||||
{
|
||||
color_out = vec4(0.0, 1.0, 0.0, 1.0);
|
||||
}
|
||||
END
|
||||
|
||||
SHADER geometry geom_shader GLSL
|
||||
#version 430
|
||||
layout(triangles_adjacency) in;
|
||||
layout(triangle_strip, max_vertices = 3) out;
|
||||
|
||||
void main (void)
|
||||
{
|
||||
for (int i = 0; i < 6; i += 2)
|
||||
{
|
||||
gl_Position = gl_in[i].gl_Position;
|
||||
EmitVertex();
|
||||
}
|
||||
EndPrimitive();
|
||||
}
|
||||
END
|
||||
|
||||
BUFFER position DATA_TYPE vec4<float> SIZE 65536 FILL 0.0
|
||||
|
||||
BUFFER indices DATA_TYPE uint16 DATA
|
||||
1 65535 0 65535 2 65535 65535 65535
|
||||
END
|
||||
|
||||
BUFFER indices_ref DATA_TYPE uint16 DATA
|
||||
1 3 0 3 2 3 3 3
|
||||
END
|
||||
|
||||
PIPELINE compute compute_pipeline
|
||||
ATTACH compute_shader
|
||||
FRAMEBUFFER_SIZE 64 64
|
||||
|
||||
BIND BUFFER position AS storage DESCRIPTOR_SET 0 BINDING 0
|
||||
END
|
||||
|
||||
RUN compute_pipeline 1 1 1
|
||||
|
||||
IMAGE framebuffer FORMAT B8G8R8A8_UNORM DIM_2D WIDTH 64 HEIGHT 64
|
||||
IMAGE framebuffer_ref FORMAT B8G8R8A8_UNORM DIM_2D WIDTH 64 HEIGHT 64
|
||||
|
||||
PIPELINE graphics graphics_pipeline
|
||||
ATTACH vert_shader
|
||||
ATTACH frag_shader
|
||||
ATTACH geom_shader
|
||||
VERTEX_DATA position LOCATION 0
|
||||
INDEX_DATA indices
|
||||
FRAMEBUFFER_SIZE 64 64
|
||||
BIND BUFFER framebuffer AS color LOCATION 0
|
||||
END
|
||||
|
||||
PIPELINE graphics graphics_pipeline_ref
|
||||
ATTACH vert_shader
|
||||
ATTACH frag_shader
|
||||
VERTEX_DATA position LOCATION 0
|
||||
INDEX_DATA indices_ref
|
||||
FRAMEBUFFER_SIZE 64 64
|
||||
BIND BUFFER framebuffer_ref AS color LOCATION 0
|
||||
END
|
||||
|
||||
CLEAR_COLOR graphics_pipeline 0 0 0 0
|
||||
CLEAR graphics_pipeline
|
||||
RUN graphics_pipeline DRAW_ARRAY AS TRIANGLE_STRIP_WITH_ADJACENCY INDEXED START_IDX 0 COUNT 8
|
||||
CLEAR_COLOR graphics_pipeline_ref 0 0 0 0
|
||||
CLEAR graphics_pipeline_ref
|
||||
RUN graphics_pipeline_ref DRAW_ARRAY AS TRIANGLE_STRIP_WITH_ADJACENCY INDEXED START_IDX 0 COUNT 8
|
||||
EXPECT framebuffer EQ_BUFFER framebuffer_ref
|
||||
+113
@@ -0,0 +1,113 @@
|
||||
#!amber
|
||||
# Copyright 2022 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
DEVICE_FEATURE IndexTypeUint8Features.indexTypeUint8
|
||||
|
||||
DEVICE_FEATURE geometryShader
|
||||
|
||||
SHADER compute compute_shader GLSL
|
||||
#version 430
|
||||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
|
||||
layout(set = 0, binding = 0) buffer block0
|
||||
{
|
||||
vec4 pos[256];
|
||||
};
|
||||
|
||||
void main()
|
||||
{
|
||||
pos[0] = vec4(-0.5, -0.5, 0.0, 1.0);
|
||||
pos[1] = vec4(-0.5, 0.5, 0.0, 1.0);
|
||||
pos[2] = vec4(0.5, 0.5, 0.0, 1.0);
|
||||
pos[3] = pos[255] = vec4(0.5, -0.5, 0.0, 1.0);
|
||||
}
|
||||
END
|
||||
|
||||
SHADER vertex vert_shader PASSTHROUGH
|
||||
|
||||
SHADER fragment frag_shader GLSL
|
||||
#version 430
|
||||
layout(location = 0) out vec4 color_out;
|
||||
void main()
|
||||
{
|
||||
color_out = vec4(0.0, 1.0, 0.0, 1.0);
|
||||
}
|
||||
END
|
||||
|
||||
SHADER geometry geom_shader GLSL
|
||||
#version 430
|
||||
layout(triangles_adjacency) in;
|
||||
layout(triangle_strip, max_vertices = 3) out;
|
||||
|
||||
void main (void)
|
||||
{
|
||||
for (int i = 0; i < 6; i += 2)
|
||||
{
|
||||
gl_Position = gl_in[i].gl_Position;
|
||||
EmitVertex();
|
||||
}
|
||||
EndPrimitive();
|
||||
}
|
||||
END
|
||||
|
||||
BUFFER position DATA_TYPE vec4<float> SIZE 256 FILL 0.0
|
||||
|
||||
BUFFER indices DATA_TYPE uint8 DATA
|
||||
1 255 0 255 2 255 255 255
|
||||
END
|
||||
|
||||
BUFFER indices_ref DATA_TYPE uint8 DATA
|
||||
1 3 0 3 2 3 3 3
|
||||
END
|
||||
|
||||
PIPELINE compute compute_pipeline
|
||||
ATTACH compute_shader
|
||||
FRAMEBUFFER_SIZE 64 64
|
||||
|
||||
BIND BUFFER position AS storage DESCRIPTOR_SET 0 BINDING 0
|
||||
END
|
||||
|
||||
RUN compute_pipeline 1 1 1
|
||||
|
||||
IMAGE framebuffer FORMAT B8G8R8A8_UNORM DIM_2D WIDTH 64 HEIGHT 64
|
||||
IMAGE framebuffer_ref FORMAT B8G8R8A8_UNORM DIM_2D WIDTH 64 HEIGHT 64
|
||||
|
||||
PIPELINE graphics graphics_pipeline
|
||||
ATTACH vert_shader
|
||||
ATTACH frag_shader
|
||||
ATTACH geom_shader
|
||||
VERTEX_DATA position LOCATION 0
|
||||
INDEX_DATA indices
|
||||
FRAMEBUFFER_SIZE 64 64
|
||||
BIND BUFFER framebuffer AS color LOCATION 0
|
||||
END
|
||||
|
||||
PIPELINE graphics graphics_pipeline_ref
|
||||
ATTACH vert_shader
|
||||
ATTACH frag_shader
|
||||
VERTEX_DATA position LOCATION 0
|
||||
INDEX_DATA indices_ref
|
||||
FRAMEBUFFER_SIZE 64 64
|
||||
BIND BUFFER framebuffer_ref AS color LOCATION 0
|
||||
END
|
||||
|
||||
CLEAR_COLOR graphics_pipeline 0 0 0 0
|
||||
CLEAR graphics_pipeline
|
||||
RUN graphics_pipeline DRAW_ARRAY AS TRIANGLE_STRIP_WITH_ADJACENCY INDEXED START_IDX 0 COUNT 8
|
||||
CLEAR_COLOR graphics_pipeline_ref 0 0 0 0
|
||||
CLEAR graphics_pipeline_ref
|
||||
RUN graphics_pipeline_ref DRAW_ARRAY AS TRIANGLE_STRIP_WITH_ADJACENCY INDEXED START_IDX 0 COUNT 8
|
||||
EXPECT framebuffer EQ_BUFFER framebuffer_ref
|
||||
Reference in New Issue
Block a user