[Piglit] [PATCH 1/3] Add a default t_render_pass
Jason Ekstrand
jason at jlekstrand.net
Sat Aug 25 23:41:58 UTC 2018
We already had one, it just didn't have any load/store ops and it wasn't
exposed to the t_ API.
---
include/tapi/t_data.h | 2 ++
src/framework/test/t_data.c | 11 ++++++++
src/framework/test/t_phase_setup.c | 18 ++++++++----
src/framework/test/test.h | 1 +
src/tests/func/4-vertex-buffers.c | 27 ++----------------
src/tests/func/bind-points.c | 27 ++----------------
src/tests/func/cmd-buffer/secondary.c | 27 ++----------------
src/tests/func/depthstencil/basic.c | 36 ++----------------------
src/tests/func/desc/dynamic.c | 31 +++-----------------
src/tests/func/draw-indexed.c | 29 ++-----------------
src/tests/func/first.c | 32 +++------------------
src/tests/func/gs/basic.c | 27 ++----------------
src/tests/func/push-constants/basic.c | 27 ++----------------
src/tests/func/shader/fragcoord.c | 29 ++-----------------
src/tests/func/ssbo/interleave.c | 27 ++----------------
src/tests/stress/lots-of-surface-state.c | 27 ++----------------
16 files changed, 55 insertions(+), 323 deletions(-)
diff --git a/include/tapi/t_data.h b/include/tapi/t_data.h
index 9610670..ebadae3 100644
--- a/include/tapi/t_data.h
+++ b/include/tapi/t_data.h
@@ -48,6 +48,7 @@ typedef struct cru_image cru_image_t;
#define t_color_image_view (*__t_color_image_view())
#define t_depthstencil_image (*__t_depthstencil_image())
#define t_depthstencil_image_view (*__t_depthstencil_image_view())
+#define t_render_pass (*__t_render_pass())
#define t_framebuffer (*__t_framebuffer())
#define t_pipeline_cache (*__t_pipeline_cache())
#define t_width (*__t_width())
@@ -71,6 +72,7 @@ const VkImage *__t_color_image(void);
const VkImageView *__t_color_image_view(void);
const VkImage *__t_depthstencil_image(void);
const VkImageView *__t_depthstencil_image_view(void);
+const VkRenderPass *__t_render_pass(void);
const VkFramebuffer *__t_framebuffer(void);
const VkPipelineCache *__t_pipeline_cache(void);
const uint32_t *__t_height(void);
diff --git a/src/framework/test/t_data.c b/src/framework/test/t_data.c
index 3a3568c..c9f5a41 100644
--- a/src/framework/test/t_data.c
+++ b/src/framework/test/t_data.c
@@ -148,6 +148,17 @@ __t_depthstencil_image_view(void)
return &t->vk.depthstencil_image_view;
}
+const VkRenderPass *
+__t_render_pass(void)
+{
+ ASSERT_TEST_IN_MAJOR_PHASE;
+ GET_CURRENT_TEST(t);
+
+ t_assert(!t->def->no_image);
+
+ return &t->vk.render_pass;
+}
+
const VkFramebuffer *
__t_framebuffer(void)
{
diff --git a/src/framework/test/t_phase_setup.c b/src/framework/test/t_phase_setup.c
index 199fea1..fe271c9 100644
--- a/src/framework/test/t_phase_setup.c
+++ b/src/framework/test/t_phase_setup.c
@@ -137,6 +137,8 @@ t_setup_framebuffer(void)
{
QO_ATTACHMENT_DESCRIPTION_DEFAULTS,
.format = VK_FORMAT_R8G8B8A8_UNORM,
+ .loadOp = VK_ATTACHMENT_LOAD_OP_CLEAR,
+ .storeOp = VK_ATTACHMENT_STORE_OP_STORE,
},
},
.subpassCount = 1,
@@ -147,13 +149,13 @@ t_setup_framebuffer(void)
.pColorAttachments = (VkAttachmentReference[]) {
{
.attachment = 0,
- .layout = VK_IMAGE_LAYOUT_GENERAL,
+ .layout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL,
},
},
}
});
- VkRenderPass pass = color_pass;
+ t->vk.render_pass = color_pass;
if (t->def->depthstencil_format != VK_FORMAT_UNDEFINED) {
VkFormatProperties depth_format_props;
@@ -236,10 +238,14 @@ t_setup_framebuffer(void)
{
QO_ATTACHMENT_DESCRIPTION_DEFAULTS,
.format = VK_FORMAT_R8G8B8A8_UNORM,
+ .loadOp = VK_ATTACHMENT_LOAD_OP_CLEAR,
+ .storeOp = VK_ATTACHMENT_STORE_OP_STORE,
},
{
QO_ATTACHMENT_DESCRIPTION_DEFAULTS,
.format = t->def->depthstencil_format,
+ .loadOp = VK_ATTACHMENT_LOAD_OP_CLEAR,
+ .storeOp = VK_ATTACHMENT_STORE_OP_STORE,
},
},
.subpassCount = 1,
@@ -250,21 +256,21 @@ t_setup_framebuffer(void)
.pColorAttachments = (VkAttachmentReference[]) {
{
.attachment = 0,
- .layout = VK_IMAGE_LAYOUT_GENERAL,
+ .layout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL,
},
},
.pDepthStencilAttachment = &(VkAttachmentReference) {
.attachment = 1,
- .layout = VK_IMAGE_LAYOUT_GENERAL,
+ .layout = VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL,
},
},
});
- pass = color_depth_pass;
+ t->vk.render_pass = color_depth_pass;
}
t->vk.framebuffer = qoCreateFramebuffer(t->vk.device,
- .renderPass = pass,
+ .renderPass = t->vk.render_pass,
.width = t->ref.width,
.height = t->ref.height,
.layers = 1,
diff --git a/src/framework/test/test.h b/src/framework/test/test.h
index edd0a5f..964532a 100644
--- a/src/framework/test/test.h
+++ b/src/framework/test/test.h
@@ -152,6 +152,7 @@ struct test {
VkPipelineCache pipeline_cache;
VkCommandPool cmd_pool;
VkCommandBuffer cmd_buffer;
+ VkRenderPass render_pass;
VkFramebuffer framebuffer;
VkImage color_image;
diff --git a/src/tests/func/4-vertex-buffers.c b/src/tests/func/4-vertex-buffers.c
index 7f8e783..15165c8 100644
--- a/src/tests/func/4-vertex-buffers.c
+++ b/src/tests/func/4-vertex-buffers.c
@@ -98,29 +98,6 @@ test(void)
},
};
- VkRenderPass pass = qoCreateRenderPass(t_device,
- .attachmentCount = 1,
- .pAttachments = (VkAttachmentDescription[]) {
- {
- QO_ATTACHMENT_DESCRIPTION_DEFAULTS,
- .format = VK_FORMAT_R8G8B8A8_UNORM,
- .loadOp = VK_ATTACHMENT_LOAD_OP_CLEAR,
- },
- },
- .subpassCount = 1,
- .pSubpasses = (VkSubpassDescription[]) {
- {
- QO_SUBPASS_DESCRIPTION_DEFAULTS,
- .colorAttachmentCount = 1,
- .pColorAttachments = (VkAttachmentReference[]) {
- {
- .attachment = 0,
- .layout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL,
- },
- },
- }
- });
-
VkPipelineLayout pipeline_layout = qoCreatePipelineLayout(t_device);
VkPipeline pipeline = qoCreateGraphicsPipeline(t_device, t_pipeline_cache,
@@ -131,7 +108,7 @@ test(void)
&(VkGraphicsPipelineCreateInfo) {
.sType = VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO,
.pVertexInputState = &vi_create_info,
- .renderPass = pass,
+ .renderPass = t_render_pass,
.layout = pipeline_layout,
.subpass = 0,
}});
@@ -139,7 +116,7 @@ test(void)
vkCmdBeginRenderPass(t_cmd_buffer,
&(VkRenderPassBeginInfo) {
.sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO,
- .renderPass = pass,
+ .renderPass = t_render_pass,
.framebuffer = t_framebuffer,
.renderArea = { { 0, 0 }, { t_width, t_height } },
.clearValueCount = 1,
diff --git a/src/tests/func/bind-points.c b/src/tests/func/bind-points.c
index 7e2b1d0..388a581 100644
--- a/src/tests/func/bind-points.c
+++ b/src/tests/func/bind-points.c
@@ -108,29 +108,6 @@ test_bind_points(void)
.setLayoutCount = 1,
.pSetLayouts = &graphics_set_layout);
- VkRenderPass pass = qoCreateRenderPass(t_device,
- .attachmentCount = 1,
- .pAttachments = (VkAttachmentDescription[]) {
- {
- QO_ATTACHMENT_DESCRIPTION_DEFAULTS,
- .format = VK_FORMAT_R8G8B8A8_UNORM,
- .loadOp = VK_ATTACHMENT_LOAD_OP_CLEAR,
- },
- },
- .subpassCount = 1,
- .pSubpasses = (VkSubpassDescription[]) {
- {
- QO_SUBPASS_DESCRIPTION_DEFAULTS,
- .colorAttachmentCount = 1,
- .pColorAttachments = (VkAttachmentReference[]) {
- {
- .attachment = 0,
- .layout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL,
- },
- },
- }
- });
-
VkPipelineVertexInputStateCreateInfo vi_info = {
.sType = VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO,
};
@@ -165,7 +142,7 @@ test_bind_points(void)
.sType = VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO,
.pVertexInputState = &vi_info,
.layout = graphics_pipeline_layout,
- .renderPass = pass,
+ .renderPass = t_render_pass,
.subpass = 0,
}});
@@ -370,7 +347,7 @@ test_bind_points(void)
vkCmdBeginRenderPass(t_cmd_buffer,
&(VkRenderPassBeginInfo) {
.sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO,
- .renderPass = pass,
+ .renderPass = t_render_pass,
.framebuffer = t_framebuffer,
.renderArea = { { 0, 0 }, { t_width, t_height } },
.clearValueCount = 1,
diff --git a/src/tests/func/cmd-buffer/secondary.c b/src/tests/func/cmd-buffer/secondary.c
index ef8970e..17cb552 100644
--- a/src/tests/func/cmd-buffer/secondary.c
+++ b/src/tests/func/cmd-buffer/secondary.c
@@ -79,33 +79,10 @@ create_pipeline(VkRenderPass pass, VkPipelineLayout layout)
static VkRenderPass
create_and_begin_render_pass(void)
{
- VkRenderPass pass = qoCreateRenderPass(t_device,
- .attachmentCount = 1,
- .pAttachments = (VkAttachmentDescription[]) {
- {
- QO_ATTACHMENT_DESCRIPTION_DEFAULTS,
- .format = VK_FORMAT_R8G8B8A8_UNORM,
- .loadOp = VK_ATTACHMENT_LOAD_OP_CLEAR,
- },
- },
- .subpassCount = 1,
- .pSubpasses = (VkSubpassDescription[]) {
- {
- QO_SUBPASS_DESCRIPTION_DEFAULTS,
- .colorAttachmentCount = 1,
- .pColorAttachments = (VkAttachmentReference[]) {
- {
- .attachment = 0,
- .layout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL,
- },
- },
- }
- });
-
vkCmdBeginRenderPass(t_cmd_buffer,
&(VkRenderPassBeginInfo) {
.sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO,
- .renderPass = pass,
+ .renderPass = t_render_pass,
.framebuffer = t_framebuffer,
.renderArea = { { 0, 0 }, { t_width, t_height } },
.clearValueCount = 1,
@@ -114,7 +91,7 @@ create_and_begin_render_pass(void)
}
}, VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS);
- return pass;
+ return t_render_pass;
}
static VkCommandBuffer
diff --git a/src/tests/func/depthstencil/basic.c b/src/tests/func/depthstencil/basic.c
index 5f30f52..8ede827 100644
--- a/src/tests/func/depthstencil/basic.c
+++ b/src/tests/func/depthstencil/basic.c
@@ -36,38 +36,6 @@ test(void)
VkPipeline pipeline;
- VkRenderPass pass = qoCreateRenderPass(t_device,
- .attachmentCount = 2,
- .pAttachments = (VkAttachmentDescription[]) {
- {
- QO_ATTACHMENT_DESCRIPTION_DEFAULTS,
- .format = VK_FORMAT_R8G8B8A8_UNORM,
- .loadOp = VK_ATTACHMENT_LOAD_OP_CLEAR,
- },
- {
- QO_ATTACHMENT_DESCRIPTION_DEFAULTS,
- .format = VK_FORMAT_X8_D24_UNORM_PACK32,
- .loadOp = VK_ATTACHMENT_LOAD_OP_CLEAR,
- },
- },
- .subpassCount = 1,
- .pSubpasses = (VkSubpassDescription[]) {
- {
- QO_SUBPASS_DESCRIPTION_DEFAULTS,
- .colorAttachmentCount = 1,
- .pColorAttachments = (VkAttachmentReference[]) {
- {
- .attachment = 0,
- .layout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL,
- },
- },
- .pDepthStencilAttachment = &(VkAttachmentReference) {
- .attachment = 1,
- .layout = VK_IMAGE_LAYOUT_GENERAL,
- }
- }
- });
-
VkPipelineVertexInputStateCreateInfo vi_create_info = {
.sType = VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO,
.vertexBindingDescriptionCount = 2,
@@ -122,7 +90,7 @@ test(void)
},
.flags = 0,
.layout = pipeline_layout,
- .renderPass = pass,
+ .renderPass = t_render_pass,
.subpass = 0,
}});
@@ -160,7 +128,7 @@ test(void)
vkCmdBeginRenderPass(t_cmd_buffer,
&(VkRenderPassBeginInfo) {
.sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO,
- .renderPass = pass,
+ .renderPass = t_render_pass,
.framebuffer = t_framebuffer,
.renderArea = { { 0, 0 }, { t_width, t_height } },
.clearValueCount = 2,
diff --git a/src/tests/func/desc/dynamic.c b/src/tests/func/desc/dynamic.c
index 0b44f8f..144b245 100644
--- a/src/tests/func/desc/dynamic.c
+++ b/src/tests/func/desc/dynamic.c
@@ -29,7 +29,7 @@ struct params {
static VkPipeline
create_pipeline(VkDevice device,
- VkPipelineLayout pipeline_layout, VkRenderPass pass)
+ VkPipelineLayout pipeline_layout)
{
const struct params *params = t_user_data;
@@ -104,7 +104,7 @@ create_pipeline(VkDevice device,
.pVertexInputState = &vi_create_info,
.flags = 0,
.layout = pipeline_layout,
- .renderPass = pass,
+ .renderPass = t_render_pass,
.subpass = 0,
}});
}
@@ -119,29 +119,6 @@ create_pipeline(VkDevice device,
static void
test(void)
{
- VkRenderPass pass = qoCreateRenderPass(t_device,
- .attachmentCount = 1,
- .pAttachments = (VkAttachmentDescription[]) {
- {
- QO_ATTACHMENT_DESCRIPTION_DEFAULTS,
- .format = VK_FORMAT_R8G8B8A8_UNORM,
- .loadOp = VK_ATTACHMENT_LOAD_OP_CLEAR,
- },
- },
- .subpassCount = 1,
- .pSubpasses = (VkSubpassDescription[]) {
- {
- QO_SUBPASS_DESCRIPTION_DEFAULTS,
- .colorAttachmentCount = 1,
- .pColorAttachments = (VkAttachmentReference[]) {
- {
- .attachment = 0,
- .layout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL,
- },
- },
- }
- });
-
const struct params *params = t_user_data;
VkDescriptorSetLayout set_layout = qoCreateDescriptorSetLayout(t_device,
@@ -160,7 +137,7 @@ test(void)
.setLayoutCount = 1,
.pSetLayouts = &set_layout);
- VkPipeline pipeline = create_pipeline(t_device, pipeline_layout, pass);
+ VkPipeline pipeline = create_pipeline(t_device, pipeline_layout);
VkDescriptorSet set =
qoAllocateDescriptorSet(t_device,
@@ -223,7 +200,7 @@ test(void)
vkCmdBeginRenderPass(t_cmd_buffer,
&(VkRenderPassBeginInfo) {
.sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO,
- .renderPass = pass,
+ .renderPass = t_render_pass,
.framebuffer = t_framebuffer,
.renderArea = { { 0, 0 }, { t_width, t_height } },
.clearValueCount = 1,
diff --git a/src/tests/func/draw-indexed.c b/src/tests/func/draw-indexed.c
index 47db22c..a1834aa 100644
--- a/src/tests/func/draw-indexed.c
+++ b/src/tests/func/draw-indexed.c
@@ -59,29 +59,6 @@ test(void)
f \
}
- VkRenderPass pass = qoCreateRenderPass(t_device,
- .attachmentCount = 1,
- .pAttachments = (VkAttachmentDescription[]) {
- {
- QO_ATTACHMENT_DESCRIPTION_DEFAULTS,
- .format = VK_FORMAT_R8G8B8A8_UNORM,
- .loadOp = VK_ATTACHMENT_LOAD_OP_CLEAR,
- },
- },
- .subpassCount = 1,
- .pSubpasses = (VkSubpassDescription[]) {
- {
- QO_SUBPASS_DESCRIPTION_DEFAULTS,
- .colorAttachmentCount = 1,
- .pColorAttachments = (VkAttachmentReference[]) {
- {
- .attachment = 0,
- .layout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL,
- },
- },
- }
- });
-
VkShaderModule vs = qoCreateShaderModuleGLSL(t_device, VERTEX,
layout(location = 0) in vec4 a_position;
layout(location = 1) in vec4 a_color;
@@ -108,7 +85,7 @@ test(void)
.primitiveRestartEnable = false,
},
.layout = pipeline_layout,
- .renderPass = pass,
+ .renderPass = t_render_pass,
.subpass = 0,
}});
@@ -125,7 +102,7 @@ test(void)
.primitiveRestartEnable = true,
},
.layout = pipeline_layout,
- .renderPass = pass,
+ .renderPass = t_render_pass,
.subpass = 0,
}});
@@ -156,7 +133,7 @@ test(void)
vkCmdBeginRenderPass(t_cmd_buffer,
&(VkRenderPassBeginInfo) {
.sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO,
- .renderPass = pass,
+ .renderPass = t_render_pass,
.framebuffer = t_framebuffer,
.renderArea = { { 0, 0 }, { t_width, t_height } },
.clearValueCount = 1,
diff --git a/src/tests/func/first.c b/src/tests/func/first.c
index bce50f0..3239694 100644
--- a/src/tests/func/first.c
+++ b/src/tests/func/first.c
@@ -25,8 +25,7 @@
#include "first-spirv.h"
static VkPipeline
-create_pipeline(VkDevice device, VkPipelineLayout pipeline_layout,
- VkRenderPass pass)
+create_pipeline(VkDevice device, VkPipelineLayout pipeline_layout)
{
VkShaderModule vs = qoCreateShaderModuleGLSL(t_device, VERTEX,
layout(location = 0) in vec4 a_position;
@@ -107,7 +106,7 @@ create_pipeline(VkDevice device, VkPipelineLayout pipeline_layout,
.pVertexInputState = &vi_create_info,
.flags = 0,
.layout = pipeline_layout,
- .renderPass = pass,
+ .renderPass = t_render_pass,
.subpass = 0,
}});
}
@@ -115,29 +114,6 @@ create_pipeline(VkDevice device, VkPipelineLayout pipeline_layout,
static void
test(void)
{
- VkRenderPass pass = qoCreateRenderPass(t_device,
- .attachmentCount = 1,
- .pAttachments = (VkAttachmentDescription[]) {
- {
- QO_ATTACHMENT_DESCRIPTION_DEFAULTS,
- .format = VK_FORMAT_R8G8B8A8_UNORM,
- .loadOp = VK_ATTACHMENT_LOAD_OP_CLEAR,
- },
- },
- .subpassCount = 1,
- .pSubpasses = (VkSubpassDescription[]) {
- {
- QO_SUBPASS_DESCRIPTION_DEFAULTS,
- .colorAttachmentCount = 1,
- .pColorAttachments = (VkAttachmentReference[]) {
- {
- .attachment = 0,
- .layout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL,
- },
- },
- }
- });
-
VkDescriptorSetLayout set_layout[2];
set_layout[0] = qoCreateDescriptorSetLayout(t_device,
@@ -175,7 +151,7 @@ test(void)
.setLayoutCount = 2,
.pSetLayouts = set_layout);
- VkPipeline pipeline = create_pipeline(t_device, pipeline_layout, pass);
+ VkPipeline pipeline = create_pipeline(t_device, pipeline_layout);
VkDescriptorSet set[2];
VkResult result = vkAllocateDescriptorSets(t_device,
@@ -339,7 +315,7 @@ test(void)
vkCmdBeginRenderPass(t_cmd_buffer,
&(VkRenderPassBeginInfo) {
- .renderPass = pass,
+ .renderPass = t_render_pass,
.framebuffer = t_framebuffer,
.renderArea = { { 0, 0 }, { t_width, t_height } },
.clearValueCount = 1,
diff --git a/src/tests/func/gs/basic.c b/src/tests/func/gs/basic.c
index c05cf21..66d6645 100644
--- a/src/tests/func/gs/basic.c
+++ b/src/tests/func/gs/basic.c
@@ -26,29 +26,6 @@
static void
test_basic_gs(void)
{
- VkRenderPass pass = qoCreateRenderPass(t_device,
- .attachmentCount = 1,
- .pAttachments = (VkAttachmentDescription[]) {
- {
- QO_ATTACHMENT_DESCRIPTION_DEFAULTS,
- .format = VK_FORMAT_R8G8B8A8_UNORM,
- .loadOp = VK_ATTACHMENT_LOAD_OP_CLEAR,
- },
- },
- .subpassCount = 1,
- .pSubpasses = (VkSubpassDescription[]) {
- {
- QO_SUBPASS_DESCRIPTION_DEFAULTS,
- .colorAttachmentCount = 1,
- .pColorAttachments = (VkAttachmentReference[]) {
- {
- .attachment = 0,
- .layout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL,
- },
- },
- }
- });
-
VkShaderModule gs = qoCreateShaderModuleGLSL(t_device, GEOMETRY,
layout(points) in;
layout(triangle_strip, max_vertices = 4) out;
@@ -112,7 +89,7 @@ test_basic_gs(void)
.sType = VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO,
.pVertexInputState = &vi_info,
.layout = pipeline_layout,
- .renderPass = pass,
+ .renderPass = t_render_pass,
.subpass = 0,
}});
@@ -160,7 +137,7 @@ test_basic_gs(void)
vkCmdBeginRenderPass(t_cmd_buffer,
&(VkRenderPassBeginInfo) {
.sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO,
- .renderPass = pass,
+ .renderPass = t_render_pass,
.framebuffer = t_framebuffer,
.renderArea = { { 0, 0 }, { t_width, t_height } },
.clearValueCount = 1,
diff --git a/src/tests/func/push-constants/basic.c b/src/tests/func/push-constants/basic.c
index 5186759..47dff2f 100644
--- a/src/tests/func/push-constants/basic.c
+++ b/src/tests/func/push-constants/basic.c
@@ -44,29 +44,6 @@ push_fs_color(VkPipelineLayout layout, unsigned first_component, unsigned num_co
static void
test_push_constants(void)
{
- VkRenderPass pass = qoCreateRenderPass(t_device,
- .attachmentCount = 1,
- .pAttachments = (VkAttachmentDescription[]) {
- {
- QO_ATTACHMENT_DESCRIPTION_DEFAULTS,
- .format = VK_FORMAT_R8G8B8A8_UNORM,
- .loadOp = VK_ATTACHMENT_LOAD_OP_CLEAR,
- },
- },
- .subpassCount = 1,
- .pSubpasses = (VkSubpassDescription[]) {
- {
- QO_SUBPASS_DESCRIPTION_DEFAULTS,
- .colorAttachmentCount = 1,
- .pColorAttachments = (VkAttachmentReference[]) {
- {
- .attachment = 0,
- .layout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL,
- },
- },
- }
- });
-
VkPipelineVertexInputStateCreateInfo vi_info = {
.sType = VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO,
.vertexBindingDescriptionCount = 1,
@@ -139,7 +116,7 @@ test_push_constants(void)
&(VkGraphicsPipelineCreateInfo) {
.sType = VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO,
.pVertexInputState = &vi_info,
- .renderPass = pass,
+ .renderPass = t_render_pass,
.subpass = 0,
.layout = pipeline_layout,
}});
@@ -163,7 +140,7 @@ test_push_constants(void)
vkCmdBeginRenderPass(t_cmd_buffer,
&(VkRenderPassBeginInfo) {
.sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO,
- .renderPass = pass,
+ .renderPass = t_render_pass,
.framebuffer = t_framebuffer,
.renderArea = { { 0, 0 }, { t_width, t_height } },
.clearValueCount = 1,
diff --git a/src/tests/func/shader/fragcoord.c b/src/tests/func/shader/fragcoord.c
index edf87cc..9b3fc5c 100644
--- a/src/tests/func/shader/fragcoord.c
+++ b/src/tests/func/shader/fragcoord.c
@@ -26,31 +26,6 @@
static void
test_fragcoord(void)
{
- VkRenderPass pass = qoCreateRenderPass(t_device,
- .attachmentCount = 1,
- .pAttachments = (VkAttachmentDescription[]) {
- {
- QO_ATTACHMENT_DESCRIPTION_DEFAULTS,
- .format = VK_FORMAT_R8G8B8A8_UNORM,
- .loadOp = VK_ATTACHMENT_LOAD_OP_CLEAR,
- },
- },
- .subpassCount = 1,
- .pSubpasses = (VkSubpassDescription[]) {
- {
- QO_SUBPASS_DESCRIPTION_DEFAULTS,
- .colorAttachmentCount = 1,
- .pColorAttachments = (VkAttachmentReference[]) {
- {
- .attachment = 0,
- .layout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL,
- },
- },
- .preserveAttachmentCount = 1,
- .pPreserveAttachments = (uint32_t[]) { 0 },
- }
- });
-
VkShaderModule vs = qoCreateShaderModuleGLSL(t_device, VERTEX,
layout(location = 0) in vec4 a_position;
layout(location = 0) out vec2 v_attr;
@@ -110,7 +85,7 @@ test_fragcoord(void)
},
.pVertexInputState = &vi_info,
.layout = pipeline_layout,
- .renderPass = pass,
+ .renderPass = t_render_pass,
.subpass = 0,
}});
@@ -135,7 +110,7 @@ test_fragcoord(void)
vkCmdBeginRenderPass(t_cmd_buffer,
&(VkRenderPassBeginInfo) {
.sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO,
- .renderPass = pass,
+ .renderPass = t_render_pass,
.framebuffer = t_framebuffer,
.renderArea = { { 0, 0 }, { t_width, t_height } },
.clearValueCount = 1,
diff --git a/src/tests/func/ssbo/interleave.c b/src/tests/func/ssbo/interleave.c
index 6b42e75..778d648 100644
--- a/src/tests/func/ssbo/interleave.c
+++ b/src/tests/func/ssbo/interleave.c
@@ -94,29 +94,6 @@ test(void)
},
};
- VkRenderPass pass = qoCreateRenderPass(t_device,
- .attachmentCount = 1,
- .pAttachments = (VkAttachmentDescription[]) {
- {
- QO_ATTACHMENT_DESCRIPTION_DEFAULTS,
- .format = VK_FORMAT_R8G8B8A8_UNORM,
- .loadOp = VK_ATTACHMENT_LOAD_OP_CLEAR,
- },
- },
- .subpassCount = 1,
- .pSubpasses = (VkSubpassDescription[]) {
- {
- QO_SUBPASS_DESCRIPTION_DEFAULTS,
- .colorAttachmentCount = 1,
- .pColorAttachments = (VkAttachmentReference[]) {
- {
- .attachment = 0,
- .layout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL,
- },
- },
- }
- });
-
VkPipeline pipeline = qoCreateGraphicsPipeline(t_device, t_pipeline_cache,
&(QoExtraGraphicsPipelineCreateInfo) {
QO_EXTRA_GRAPHICS_PIPELINE_CREATE_INFO_DEFAULTS,
@@ -129,7 +106,7 @@ test(void)
.pVertexInputState = &vi_create_info,
.flags = 0,
.layout = pipeline_layout,
- .renderPass = pass,
+ .renderPass = t_render_pass,
.subpass = 0,
}});
@@ -175,7 +152,7 @@ test(void)
vkCmdBeginRenderPass(t_cmd_buffer,
&(VkRenderPassBeginInfo) {
.sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO,
- .renderPass = pass,
+ .renderPass = t_render_pass,
.framebuffer = t_framebuffer,
.renderArea = { { 0, 0 }, { t_width, t_height } },
.clearValueCount = 1,
diff --git a/src/tests/stress/lots-of-surface-state.c b/src/tests/stress/lots-of-surface-state.c
index 358374f..0f81484 100644
--- a/src/tests/stress/lots-of-surface-state.c
+++ b/src/tests/stress/lots-of-surface-state.c
@@ -45,29 +45,6 @@ test_lots_of_surface_state(VkShaderModule vs, VkShaderModule fs,
VkShaderStageFlagBits ubo_stage,
bool use_dynamic_offsets)
{
- VkRenderPass pass = qoCreateRenderPass(t_device,
- .attachmentCount = 1,
- .pAttachments = (VkAttachmentDescription[]) {
- {
- QO_ATTACHMENT_DESCRIPTION_DEFAULTS,
- .format = VK_FORMAT_R8G8B8A8_UNORM,
- .loadOp = VK_ATTACHMENT_LOAD_OP_CLEAR,
- },
- },
- .subpassCount = 1,
- .pSubpasses = (VkSubpassDescription[]) {
- {
- QO_SUBPASS_DESCRIPTION_DEFAULTS,
- .colorAttachmentCount = 1,
- .pColorAttachments = (VkAttachmentReference[]) {
- {
- .attachment = 0,
- .layout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL,
- },
- },
- }
- });
-
// Create the descriptor set layout.
VkDescriptorSetLayout set_layout = qoCreateDescriptorSetLayout(t_device,
.bindingCount = 1,
@@ -120,7 +97,7 @@ test_lots_of_surface_state(VkShaderModule vs, VkShaderModule fs,
.pVertexInputState = &vi_create_info,
.flags = 0,
.layout = pipeline_layout,
- .renderPass = pass,
+ .renderPass = t_render_pass,
.subpass = 0,
}});
@@ -175,7 +152,7 @@ test_lots_of_surface_state(VkShaderModule vs, VkShaderModule fs,
vkCmdBeginRenderPass(t_cmd_buffer,
&(VkRenderPassBeginInfo) {
.sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO,
- .renderPass = pass,
+ .renderPass = t_render_pass,
.framebuffer = t_framebuffer,
.renderArea = { { 0, 0 }, { t_width, t_height } },
.clearValueCount = 1,
--
2.17.1
More information about the Piglit
mailing list