Skip to content

Commit

Permalink
Clean up Commit and Uneccessary Changes
Browse files Browse the repository at this point in the history
Removed remnants of earlier code commits that should not have been in the final PR and deleted an unneeded change which added a struct to the DeviceCreateInfo struct if it wasn't already present.
  • Loading branch information
mazvalente committed Jan 10, 2024
1 parent e747196 commit 6a85e9b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 49 deletions.
7 changes: 0 additions & 7 deletions renderdoc/api/replay/vk_pipestate.h
Original file line number Diff line number Diff line change
Expand Up @@ -1114,13 +1114,6 @@ If the list is empty, fdm_offset is disabled and rendering is as normal.
)");
rdcarray<Offset> fragmentDensityOffsets;

DOCUMENT(R"(If VK_QCOM_multiview_per_view_viewports is enabled, contains whether multiple viewports
are allowed to be passed in a single view.
If only a single viewport is present in any view, multiviewPerViewViewports is set to false;
)");
bool multiviewPerViewViewports;

DOCUMENT(R"(If VK_EXT_multisampled_render_to_single_sampled is enabled, contains the number of
samples used to render this subpass.
Expand Down
4 changes: 2 additions & 2 deletions renderdoc/driver/vulkan/vk_overlay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1277,7 +1277,7 @@ ResourceId VulkanReplay::RenderOverlay(ResourceId texid, FloatVector clearCol, D
vt->CmdBeginRenderPass(Unwrap(cmd), &rpbegin, VK_SUBPASS_CONTENTS_INLINE);

VkViewport viewport = state.views[0];
vt->CmdSetViewport(Unwrap(cmd), 0, (uint32_t)state.views.size(), &viewport);
vt->CmdSetViewport(Unwrap(cmd), 0, 1, &viewport);

uint32_t uboOffs = 0;

Expand Down Expand Up @@ -1347,7 +1347,7 @@ ResourceId VulkanReplay::RenderOverlay(ResourceId texid, FloatVector clearCol, D
viewport.width = scissor.z;
viewport.height = scissor.w;

vt->CmdSetViewport(Unwrap(cmd), 0, (uint32_t)state.views.size(), &viewport);
vt->CmdSetViewport(Unwrap(cmd), 0, 1, &viewport);
vt->CmdBindDescriptorSets(Unwrap(cmd), VK_PIPELINE_BIND_POINT_GRAPHICS,
Unwrap(m_Overlay.m_CheckerPipeLayout), 0, 1,
UnwrapPtr(m_Overlay.m_CheckerDescSet), 1, &uboOffs);
Expand Down
9 changes: 7 additions & 2 deletions renderdoc/driver/vulkan/vk_rendertexture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -575,8 +575,13 @@ bool VulkanReplay::RenderTextureInternal(TextureDisplay cfg, const ImageState &i
vt->CmdBindDescriptorSets(Unwrap(cmd), VK_PIPELINE_BIND_POINT_GRAPHICS,
Unwrap(m_TexRender.PipeLayout), 0, 1, UnwrapPtr(descset), 2, offsets);

VulkanRenderState &state = m_pDriver->m_RenderState;
vt->CmdSetViewport(Unwrap(cmd), 0, (uint32_t)state.views.size(), state.views.data());
VkViewport viewport = { (float)rpbegin.renderArea.offset.x,
(float)rpbegin.renderArea.offset.y,
(float)rpbegin.renderArea.extent.width,
(float)rpbegin.renderArea.extent.height,
0.0f,
1.0f };
vt->CmdSetViewport(Unwrap(cmd), 0, 1, &viewport);

vt->CmdDraw(Unwrap(cmd), 4, 1, 0, 0);

Expand Down
38 changes: 0 additions & 38 deletions renderdoc/driver/vulkan/wrappers/vk_device_funcs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1917,15 +1917,6 @@ bool WrappedVulkan::Serialise_vkCreateDevice(SerialiserType &ser, VkPhysicalDevi
RDCLOG("Enabling VK_KHR_performance_query");
}

bool multiviewperviewviewports = false;
if(supportedExtensions.find(VK_QCOM_MULTIVIEW_PER_VIEW_VIEWPORTS_EXTENSION_NAME) !=
supportedExtensions.end())
{
multiviewperviewviewports = true;
Extensions.push_back(VK_QCOM_MULTIVIEW_PER_VIEW_VIEWPORTS_EXTENSION_NAME);
RDCLOG("Enabling VK_QCOM_multiview_per_view_viewports");
}

VkDevice device;

rdcarray<VkQueueFamilyProperties> queueProps;
Expand Down Expand Up @@ -3578,35 +3569,6 @@ bool WrappedVulkan::Serialise_vkCreateDevice(SerialiserType &ser, VkPhysicalDevi
}
}

VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM mvpvvFeature = {
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_VIEWPORTS_FEATURES_QCOM};

if(multiviewperviewviewports)
{
VkPhysicalDeviceFeatures2 availBase = {VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2};
availBase.pNext = &mvpvvFeature;
ObjDisp(physicalDevice)->GetPhysicalDeviceFeatures2(Unwrap(physicalDevice), &availBase);

VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM *existing =
(VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM *)FindNextStruct(
&createInfo,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_VIEWPORTS_FEATURES_QCOM);

if(existing)
{
// feature is already present
existing->multiviewPerViewViewports = VK_TRUE;
}
else
{
// otherwise, add our own, and push it onto the pNext array
mvpvvFeature.multiviewPerViewViewports = VK_TRUE;

mvpvvFeature.pNext = (void *)createInfo.pNext;
createInfo.pNext = &mvpvvFeature;
}
}

VkPhysicalDeviceScalarBlockLayoutFeaturesEXT scalarBlockEXTFeatures = {
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES_EXT,
};
Expand Down

0 comments on commit 6a85e9b

Please sign in to comment.