mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-23 04:52:07 +00:00
Create MSAA color buffer only when it's actually needed.
This commit is contained in:
parent
a2ab709c2b
commit
da32d051b3
1 changed files with 18 additions and 10 deletions
|
@ -709,10 +709,14 @@ static void CreateDrawBuffers()
|
|||
QVk_CreateColorBuffer(VK_SAMPLE_COUNT_1_BIT, &vk_colorbufferWarp,
|
||||
VK_IMAGE_USAGE_SAMPLED_BIT);
|
||||
R_Printf(PRINT_ALL, "...created world postpocess color buffer\n");
|
||||
QVk_CreateColorBuffer(vk_renderpasses[RP_WORLD].sampleCount, &vk_msaaColorbuffer,
|
||||
0);
|
||||
R_Printf(PRINT_ALL, "...created MSAAx%d color buffer\n",
|
||||
vk_renderpasses[RP_WORLD].sampleCount);
|
||||
|
||||
if (vk_renderpasses[RP_WORLD].sampleCount > 1)
|
||||
{
|
||||
QVk_CreateColorBuffer(vk_renderpasses[RP_WORLD].sampleCount, &vk_msaaColorbuffer,
|
||||
0);
|
||||
R_Printf(PRINT_ALL, "...created MSAAx%d color buffer\n",
|
||||
vk_renderpasses[RP_WORLD].sampleCount);
|
||||
}
|
||||
|
||||
QVk_DebugSetObjectName((uint64_t)vk_depthbuffer.resource.image,
|
||||
VK_OBJECT_TYPE_IMAGE, "Depth Buffer: World");
|
||||
|
@ -738,12 +742,16 @@ static void CreateDrawBuffers()
|
|||
VK_OBJECT_TYPE_IMAGE_VIEW, "Image View: Warp Postprocess Color Buffer");
|
||||
QVk_DebugSetObjectName((uint64_t)vk_colorbufferWarp.resource.memory,
|
||||
VK_OBJECT_TYPE_DEVICE_MEMORY, "Memory: Warp Postprocess Color Buffer");
|
||||
QVk_DebugSetObjectName((uint64_t)vk_msaaColorbuffer.resource.image,
|
||||
VK_OBJECT_TYPE_IMAGE, "Color Buffer: MSAA");
|
||||
QVk_DebugSetObjectName((uint64_t)vk_msaaColorbuffer.imageView,
|
||||
VK_OBJECT_TYPE_IMAGE_VIEW, "Image View: MSAA Color Buffer");
|
||||
QVk_DebugSetObjectName((uint64_t)vk_msaaColorbuffer.resource.memory,
|
||||
VK_OBJECT_TYPE_DEVICE_MEMORY, "Memory: MSAA Color Buffer");
|
||||
|
||||
if (vk_renderpasses[RP_WORLD].sampleCount > 1)
|
||||
{
|
||||
QVk_DebugSetObjectName((uint64_t)vk_msaaColorbuffer.resource.image,
|
||||
VK_OBJECT_TYPE_IMAGE, "Color Buffer: MSAA");
|
||||
QVk_DebugSetObjectName((uint64_t)vk_msaaColorbuffer.imageView,
|
||||
VK_OBJECT_TYPE_IMAGE_VIEW, "Image View: MSAA Color Buffer");
|
||||
QVk_DebugSetObjectName((uint64_t)vk_msaaColorbuffer.resource.memory,
|
||||
VK_OBJECT_TYPE_DEVICE_MEMORY, "Memory: MSAA Color Buffer");
|
||||
}
|
||||
}
|
||||
|
||||
// internal helper
|
||||
|
|
Loading…
Reference in a new issue