mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-23 04:42:32 +00:00
[vulkan] Abandon image "preinitialized" layout
Turn's out it's not useful for transfers. I might bring it back when I figure out how to use it.
This commit is contained in:
parent
23db917ec4
commit
b584d6f403
5 changed files with 8 additions and 12 deletions
|
@ -37,8 +37,7 @@ VkImage QFV_CreateImage (struct qfv_device_s *device, int cubemap,
|
|||
uint32_t num_mipmaps,
|
||||
uint32_t num_layers,
|
||||
VkSampleCountFlagBits samples,
|
||||
VkImageUsageFlags usage_scenarios,
|
||||
int initialized);
|
||||
VkImageUsageFlags usage_scenarios);
|
||||
|
||||
VkDeviceMemory QFV_AllocImageMemory (struct qfv_device_s *device,
|
||||
VkImage image,
|
||||
|
|
|
@ -69,8 +69,7 @@ QFV_CreateImage (qfv_device_t *device, int cubemap,
|
|||
uint32_t num_mipmaps,
|
||||
uint32_t num_layers,
|
||||
VkSampleCountFlagBits samples,
|
||||
VkImageUsageFlags usage_scenarios,
|
||||
int initialized)
|
||||
VkImageUsageFlags usage_scenarios)
|
||||
{
|
||||
VkDevice dev = device->dev;
|
||||
qfv_devfuncs_t *dfunc = device->funcs;
|
||||
|
@ -80,12 +79,11 @@ QFV_CreateImage (qfv_device_t *device, int cubemap,
|
|||
type, format, size, num_mipmaps,
|
||||
cubemap ? 6 * num_layers : num_layers,
|
||||
samples,
|
||||
initialized ? VK_IMAGE_TILING_LINEAR : VK_IMAGE_TILING_OPTIMAL,
|
||||
VK_IMAGE_TILING_OPTIMAL,
|
||||
usage_scenarios,
|
||||
VK_SHARING_MODE_EXCLUSIVE,
|
||||
0, 0,
|
||||
initialized ? VK_IMAGE_LAYOUT_PREINITIALIZED
|
||||
: VK_IMAGE_LAYOUT_UNDEFINED,
|
||||
VK_IMAGE_LAYOUT_UNDEFINED,
|
||||
};
|
||||
VkImage image;
|
||||
dfunc->vkCreateImage (dev, &createInfo, 0, &image);
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
minLod = 0;
|
||||
maxLod = 0.25f;
|
||||
borderColor = float_transparent_black;
|
||||
unnormalizedCoordinates = 0;//FIXME false!!!
|
||||
unnormalizedCoordinates = 1;//FIXME true!!!
|
||||
};
|
||||
};
|
||||
descriptorPools = {
|
||||
|
|
|
@ -142,8 +142,7 @@ Vulkan_Draw_Init (vulkan_ctx_t *ctx)
|
|||
VK_SAMPLE_COUNT_1_BIT,
|
||||
VK_IMAGE_USAGE_TRANSFER_DST_BIT
|
||||
| VK_IMAGE_USAGE_TRANSFER_SRC_BIT
|
||||
| VK_IMAGE_USAGE_SAMPLED_BIT,
|
||||
1);
|
||||
| VK_IMAGE_USAGE_SAMPLED_BIT);
|
||||
conchars_memory = QFV_AllocImageMemory (device, conchars_image,
|
||||
VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT,
|
||||
0, 0);
|
||||
|
|
|
@ -261,7 +261,7 @@ Vulkan_CreateRenderPass (vulkan_ctx_t *ctx)
|
|||
= QFV_CreateImage (device, 0, VK_IMAGE_TYPE_2D,
|
||||
sc->format, extent, 1, 1, ctx->msaaSamples,
|
||||
VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT
|
||||
| VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, 0);
|
||||
| VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT);
|
||||
colorImage->object
|
||||
= QFV_AllocImageMemory (device, colorImage->image,
|
||||
VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT, 0, 0);
|
||||
|
@ -278,7 +278,7 @@ Vulkan_CreateRenderPass (vulkan_ctx_t *ctx)
|
|||
depthImage->image
|
||||
= QFV_CreateImage (device, 0, VK_IMAGE_TYPE_2D,
|
||||
depthFormat, extent, 1, 1, ctx->msaaSamples,
|
||||
VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, 0);
|
||||
VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT);
|
||||
depthImage->object
|
||||
= QFV_AllocImageMemory (device, depthImage->image,
|
||||
VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT, 0, 0);
|
||||
|
|
Loading…
Reference in a new issue