VK_DEFINE_NONDISP_HANDLE(VkQueryPool)
VK_DEFINE_NONDISP_HANDLE(VkBufferView)
VK_DEFINE_NONDISP_HANDLE(VkImageView)
-VK_DEFINE_NONDISP_HANDLE(VkAttachmentView)
VK_DEFINE_NONDISP_HANDLE(VkShaderModule)
VK_DEFINE_NONDISP_HANDLE(VkShader)
VK_DEFINE_NONDISP_HANDLE(VkPipelineCache)
typedef VkFlags VkImageAspectFlags;
typedef enum {
- VK_ATTACHMENT_VIEW_CREATE_READ_ONLY_DEPTH_BIT = 0x00000001,
- VK_ATTACHMENT_VIEW_CREATE_READ_ONLY_STENCIL_BIT = 0x00000002,
-} VkAttachmentViewCreateFlagBits;
-typedef VkFlags VkAttachmentViewCreateFlags;
+ VK_IMAGE_VIEW_CREATE_READ_ONLY_DEPTH_BIT = 0x00000001,
+ VK_IMAGE_VIEW_CREATE_READ_ONLY_STENCIL_BIT = 0x00000002,
+} VkImageViewCreateFlagBits;
+typedef VkFlags VkImageViewCreateFlags;
typedef VkFlags VkShaderModuleCreateFlags;
typedef VkFlags VkShaderCreateFlags;
VkImageSubresourceRange subresourceRange;
} VkImageViewCreateInfo;
-typedef struct {
- VkStructureType sType;
- const void* pNext;
- VkImage image;
- VkFormat format;
- uint32_t mipLevel;
- uint32_t baseArraySlice;
- uint32_t arraySize;
- VkAttachmentViewCreateFlags flags;
-} VkAttachmentViewCreateInfo;
-
typedef struct {
VkStructureType sType;
const void* pNext;
VkBufferView bufferView;
VkSampler sampler;
VkImageView imageView;
- VkAttachmentView attachmentView;
VkImageLayout imageLayout;
} VkDescriptorInfo;
uint32_t stencilBackRef;
} VkDynamicDepthStencilStateCreateInfo;
-typedef struct {
- VkAttachmentView view;
- VkImageLayout layout;
-} VkAttachmentBindInfo;
-
typedef struct {
VkStructureType sType;
const void* pNext;
VkRenderPass renderPass;
uint32_t attachmentCount;
- const VkAttachmentBindInfo* pAttachments;
+ const VkImageView* pAttachments;
uint32_t width;
uint32_t height;
uint32_t layers;
typedef VkResult (VKAPI *PFN_vkGetImageSubresourceLayout)(VkDevice device, VkImage image, const VkImageSubresource* pSubresource, VkSubresourceLayout* pLayout);
typedef VkResult (VKAPI *PFN_vkCreateImageView)(VkDevice device, const VkImageViewCreateInfo* pCreateInfo, VkImageView* pView);
typedef void (VKAPI *PFN_vkDestroyImageView)(VkDevice device, VkImageView imageView);
-typedef VkResult (VKAPI *PFN_vkCreateAttachmentView)(VkDevice device, const VkAttachmentViewCreateInfo* pCreateInfo, VkAttachmentView* pView);
-typedef void (VKAPI *PFN_vkDestroyAttachmentView)(VkDevice device, VkAttachmentView attachmentView);
typedef VkResult (VKAPI *PFN_vkCreateShaderModule)(VkDevice device, const VkShaderModuleCreateInfo* pCreateInfo, VkShaderModule* pShaderModule);
typedef void (VKAPI *PFN_vkDestroyShaderModule)(VkDevice device, VkShaderModule shaderModule);
typedef VkResult (VKAPI *PFN_vkCreateShader)(VkDevice device, const VkShaderCreateInfo* pCreateInfo, VkShader* pShader);
VkDevice device,
VkImageView imageView);
-VkResult VKAPI vkCreateAttachmentView(
- VkDevice device,
- const VkAttachmentViewCreateInfo* pCreateInfo,
- VkAttachmentView* pView);
-
-void VKAPI vkDestroyAttachmentView(
- VkDevice device,
- VkAttachmentView attachmentView);
-
VkResult VKAPI vkCreateShaderModule(
VkDevice device,
const VkShaderModuleCreateInfo* pCreateInfo,
framebuffer->attachment_count = pCreateInfo->attachmentCount;
for (uint32_t i = 0; i < pCreateInfo->attachmentCount; i++) {
- VkAttachmentView _aview = pCreateInfo->pAttachments[i].view;
- VkImageView _iview = { _aview.handle };
+ VkImageView _iview = pCreateInfo->pAttachments[i];
framebuffer->attachments[i] = anv_image_view_from_handle(_iview);
}
}
}
-VkResult
-anv_CreateAttachmentView(VkDevice _device,
- const VkAttachmentViewCreateInfo *info,
- VkAttachmentView *pView)
-{
- ANV_FROM_HANDLE(anv_device, device, _device);
- struct anv_image_view *iview;
-
- assert(info->sType == VK_STRUCTURE_TYPE_ATTACHMENT_VIEW_CREATE_INFO);
-
- iview = anv_device_alloc(device, sizeof(*iview), 8,
- VK_SYSTEM_ALLOC_TYPE_API_OBJECT);
- if (iview == NULL)
- return vk_error(VK_ERROR_OUT_OF_HOST_MEMORY);
-
- const struct anv_format *format = anv_format_for_vk_format(info->format);
-
+#if 0
VkImageAspectFlags aspect_mask = 0;
if (format->depth_format)
aspect_mask |= VK_IMAGE_ASPECT_DEPTH_BIT;
},
},
NULL);
-
- pView->handle = anv_image_view_to_handle(iview).handle;
-
- return VK_SUCCESS;
-}
-
-void
-anv_DestroyAttachmentView(VkDevice _device, VkAttachmentView _aview)
-{
- ANV_FROM_HANDLE(anv_device, device, _device);
- VkImageView _iview = { .handle = _aview.handle };
- ANV_FROM_HANDLE(anv_image_view, iview, _iview);
-
- anv_image_view_destroy(device, iview);
-}
+#endif
VkExtent3D dest_extent)
{
struct anv_device *device = cmd_buffer->device;
-
- VkImageView dest_iview_h = anv_image_view_to_handle(dest_iview);
- VkAttachmentView dest_aview_h = { .handle = dest_iview_h.handle };
-
VkDescriptorPool dummy_desc_pool = { .handle = 1 };
struct blit_vb_data {
&(VkFramebufferCreateInfo) {
.sType = VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO,
.attachmentCount = 1,
- .pAttachments = (VkAttachmentBindInfo[]) {
- {
- .view = dest_aview_h,
- .layout = VK_IMAGE_LAYOUT_GENERAL
- }
+ .pAttachments = (VkImageView[]) {
+ anv_image_view_to_handle(dest_iview),
},
.width = dest_iview->extent.width,
.height = dest_iview->extent.height,
},
cmd_buffer);
- VkImageView iview_h = anv_image_view_to_handle(&iview);
- VkAttachmentView aview_h = { .handle = iview_h.handle };
-
VkFramebuffer fb;
anv_CreateFramebuffer(anv_device_to_handle(cmd_buffer->device),
&(VkFramebufferCreateInfo) {
.sType = VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO,
.attachmentCount = 1,
- .pAttachments = (VkAttachmentBindInfo[]) {
- {
- .view = aview_h,
- .layout = VK_IMAGE_LAYOUT_GENERAL
- }
+ .pAttachments = (VkImageView[]) {
+ anv_image_view_to_handle(&iview),
},
.width = iview.extent.width,
.height = iview.extent.height,