meta_prepare_blit(struct anv_cmd_buffer *cmd_buffer,
struct anv_meta_saved_state *saved_state)
{
- anv_meta_save(saved_state, cmd_buffer,
- (1 << VK_DYNAMIC_STATE_VIEWPORT));
+ anv_meta_save(saved_state, cmd_buffer, 0);
}
static void
VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline);
}
- anv_CmdSetViewport(anv_cmd_buffer_to_handle(cmd_buffer), 0, 1,
- &(VkViewport) {
- .x = 0.0f,
- .y = 0.0f,
- .width = dest_iview->extent.width,
- .height = dest_iview->extent.height,
- .minDepth = 0.0f,
- .maxDepth = 1.0f,
- });
-
anv_CmdBindDescriptorSets(anv_cmd_buffer_to_handle(cmd_buffer),
VK_PIPELINE_BIND_POINT_GRAPHICS,
device->meta_state.blit.pipeline_layout, 0, 1,
.height = height,
.layers = 1
}, &cmd_buffer->pool->alloc, &tmp->fb);
-
-
- anv_CmdSetViewport(anv_cmd_buffer_to_handle(cmd_buffer), 0, 1,
- &(VkViewport) {
- .x = 0.0f,
- .y = 0.0f,
- .width = width,
- .height = height,
- .minDepth = 0.0f,
- .maxDepth = 1.0f,
- });
}
static void
anv_meta_begin_blit2d(struct anv_cmd_buffer *cmd_buffer,
struct anv_meta_saved_state *save)
{
- anv_meta_save(save, cmd_buffer,
- (1 << VK_DYNAMIC_STATE_VIEWPORT));
+ anv_meta_save(save, cmd_buffer, 0);
}
static void
{
anv_meta_save(saved_state, cmd_buffer,
(1 << VK_DYNAMIC_STATE_VIEWPORT) |
- (1 << VK_DYNAMIC_STATE_SCISSOR) |
(1 << VK_DYNAMIC_STATE_STENCIL_REFERENCE) |
(1 << VK_DYNAMIC_STATE_STENCIL_WRITE_MASK));
.offset = state.offset,
};
- ANV_CALL(CmdSetViewport)(cmd_buffer_h, 0, 1,
- (VkViewport[]) {
- {
- .x = 0,
- .y = 0,
- .width = fb->width,
- .height = fb->height,
- .minDepth = 0.0,
- .maxDepth = 1.0,
- },
- });
-
- ANV_CALL(CmdSetScissor)(cmd_buffer_h, 0, 1,
- (VkRect2D[]) {
- {
- .offset = { 0, 0 },
- .extent = { fb->width, fb->height },
- }
- });
-
ANV_CALL(CmdBindVertexBuffers)(cmd_buffer_h, 0, 1,
(VkBuffer[]) { anv_buffer_to_handle(&vertex_buffer) },
(VkDeviceSize[]) { 0 });
},
});
- ANV_CALL(CmdSetScissor)(cmd_buffer_h, 0, 1,
- (VkRect2D[]) {
- {
- .offset = { 0, 0 },
- .extent = { fb->width, fb->height },
- }
- });
-
if (aspects & VK_IMAGE_ASPECT_STENCIL_BIT) {
ANV_CALL(CmdSetStencilReference)(cmd_buffer_h, VK_STENCIL_FACE_FRONT_BIT,
clear_value.stencil);
meta_resolve_save(struct anv_meta_saved_state *saved_state,
struct anv_cmd_buffer *cmd_buffer)
{
- anv_meta_save(saved_state, cmd_buffer,
- (1 << VK_DYNAMIC_STATE_VIEWPORT) |
- (1 << VK_DYNAMIC_STATE_SCISSOR));
+ anv_meta_save(saved_state, cmd_buffer, 0);
cmd_buffer->state.dynamic.viewport.count = 0;
cmd_buffer->state.dynamic.scissor.count = 0;
struct anv_device *device = cmd_buffer->device;
VkDevice device_h = anv_device_to_handle(device);
VkCommandBuffer cmd_buffer_h = anv_cmd_buffer_to_handle(cmd_buffer);
- const struct anv_framebuffer *fb = cmd_buffer->state.framebuffer;
const struct anv_image *src_image = src_iview->image;
const struct vertex_attrs vertex_data[3] = {
/*copyCount*/ 0,
/*copies */ NULL);
- ANV_CALL(CmdSetViewport)(cmd_buffer_h,
- /*firstViewport*/ 0,
- /*viewportCount*/ 1,
- (VkViewport[]) {
- {
- .x = 0,
- .y = 0,
- .width = fb->width,
- .height = fb->height,
- .minDepth = 0.0,
- .maxDepth = 1.0,
- },
- });
-
- ANV_CALL(CmdSetScissor)(cmd_buffer_h,
- /*firstScissor*/ 0,
- /*scissorCount*/ 1,
- (VkRect2D[]) {
- {
- .offset = { 0, 0 },
- .extent = (VkExtent2D) { fb->width, fb->height },
- },
- });
-
VkPipeline pipeline_h = *get_pipeline_h(device, src_image->samples);
ANV_FROM_HANDLE(anv_pipeline, pipeline, pipeline_h);