vk/vulkan.h: Add RenderPassBeginContents
authorJason Ekstrand <jason.ekstrand@intel.com>
Wed, 8 Jul 2015 17:57:13 +0000 (10:57 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Wed, 8 Jul 2015 17:57:13 +0000 (10:57 -0700)
include/vulkan/vulkan.h
src/vulkan/device.c

index b8e2b687bd007004e8a74314ecc495ceaa654d38..96873b14818a6412e92f2dd9e15eecfa212ee658 100644 (file)
@@ -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 {
index 38d922767bbac8a16bbb890f2df1723531651bfb..ce12c0defa8629794cafa12d1c7e70579a42ac08 100644 (file)
@@ -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;