From: Jason Ekstrand Date: Wed, 8 Jul 2015 17:57:13 +0000 (-0700) Subject: vk/vulkan.h: Add RenderPassBeginContents X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=52940e8fcfec9ed2c232bd196404d709b5bbac57;p=mesa.git vk/vulkan.h: Add RenderPassBeginContents --- diff --git a/include/vulkan/vulkan.h b/include/vulkan/vulkan.h index b8e2b687bd0..96873b14818 100644 --- a/include/vulkan/vulkan.h +++ b/include/vulkan/vulkan.h @@ -890,6 +890,16 @@ typedef enum { VK_TIMESTAMP_TYPE_MAX_ENUM = 0x7FFFFFFF } VkTimestampType; +typedef enum { + VK_RENDER_PASS_CONTENTS_INLINE = 0, + VK_RENDER_PASS_CONTENTS_SECONDARY_CMD_BUFFERS = 1, + VK_RENDER_PASS_CONTENTS_BEGIN_RANGE = VK_RENDER_PASS_CONTENTS_INLINE, + VK_RENDER_PASS_CONTENTS_END_RANGE = VK_RENDER_PASS_CONTENTS_SECONDARY_CMD_BUFFERS, + VK_RENDER_PASS_CONTENTS_NUM = (VK_RENDER_PASS_CONTENTS_SECONDARY_CMD_BUFFERS - VK_RENDER_PASS_CONTENTS_INLINE + 1), + VK_RENDER_PASS_CONTENTS_MAX_ENUM = 0x7FFFFFFF +} VkRenderPassContents; + + typedef enum { VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT = 0x00000001, VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT = 0x00000002, @@ -1746,6 +1756,7 @@ typedef struct { typedef struct { VkRenderPass renderPass; VkFramebuffer framebuffer; + VkRenderPassContents contents; } VkRenderPassBegin; typedef struct { diff --git a/src/vulkan/device.c b/src/vulkan/device.c index 38d922767bb..ce12c0defa8 100644 --- a/src/vulkan/device.c +++ b/src/vulkan/device.c @@ -3655,6 +3655,8 @@ void anv_CmdBeginRenderPass( struct anv_framebuffer *framebuffer = (struct anv_framebuffer *) pRenderPassBegin->framebuffer; + assert(pRenderPassBegin->contents == VK_RENDER_PASS_CONTENTS_INLINE); + cmd_buffer->framebuffer = framebuffer; cmd_buffer->descriptors_dirty |= VK_SHADER_STAGE_FRAGMENT_BIT;