mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-10-25 00:03:42 +00:00
Add support for VK_AMD_negative_viewport_height
This commit is contained in:
1 parent
00566622e3
commit
90e068a111
7 files changed
+616
-587
No files matched your search
@@ -125,6 +125,12 @@ private:
|
||||
uint32_t m_Major, m_Minor, m_Patch;
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
VkCheckExt_AMD_neg_viewport,
|
||||
VkCheckExt_Max,
|
||||
};
|
||||
|
||||
// structure for casting to easily iterate and template specialising Serialise
|
||||
struct VkGenericStruct
|
||||
{
|
||||
|
||||
@@ -690,6 +690,9 @@ static const VkExtensionProperties supportedExtensions[] = {
|
||||
{
|
||||
VK_AMD_GCN_SHADER_EXTENSION_NAME, VK_AMD_GCN_SHADER_SPEC_VERSION,
|
||||
},
|
||||
{
|
||||
VK_AMD_NEGATIVE_VIEWPORT_HEIGHT_EXTENSION_NAME, VK_AMD_NEGATIVE_VIEWPORT_HEIGHT_SPEC_VERSION,
|
||||
},
|
||||
// this extension is 'free' - it just marks SPIR-V extension availability
|
||||
{
|
||||
VK_AMD_SHADER_BALLOT_EXTENSION_NAME, VK_AMD_SHADER_BALLOT_SPEC_VERSION,
|
||||
|
||||
@@ -618,6 +618,8 @@ private:
|
||||
|
||||
VulkanDrawcallTreeNode m_ParentDrawcall;
|
||||
|
||||
bool m_ExtensionsEnabled[VkCheckExt_Max];
|
||||
|
||||
// in vk_<platform>.cpp
|
||||
bool AddRequiredExtensions(bool instance, vector<string> &extensionList,
|
||||
const std::set<string> &supportedExtensions);
|
||||
|
||||
@@ -5446,6 +5446,9 @@ ResourceId VulkanDebugManager::RenderOverlay(ResourceId texid, TextureDisplayOve
|
||||
ubo->Scissor = 0;
|
||||
ubo->ViewRect = Vec4f(viewport.x, viewport.y, viewport.width, viewport.height);
|
||||
|
||||
if(m_pDriver->m_ExtensionsEnabled[VkCheckExt_AMD_neg_viewport])
|
||||
ubo->ViewRect.w = fabs(viewport.height);
|
||||
|
||||
m_OutlineUBO.Unmap();
|
||||
|
||||
vt->CmdBindPipeline(Unwrap(cmd), VK_PIPELINE_BIND_POINT_GRAPHICS,
|
||||
|
||||
@@ -117,6 +117,8 @@ ReplayCreateStatus WrappedVulkan::Initialise(VkInitParams ¶ms)
|
||||
}
|
||||
}
|
||||
|
||||
RDCEraseEl(m_ExtensionsEnabled);
|
||||
|
||||
std::set<string> supportedExtensions;
|
||||
|
||||
for(size_t i = 0; i <= params.Layers.size(); i++)
|
||||
@@ -786,6 +788,10 @@ bool WrappedVulkan::Serialise_vkCreateDevice(Serialiser *localSerialiser,
|
||||
Extensions.push_back(createInfo.ppEnabledExtensionNames[i]);
|
||||
}
|
||||
|
||||
if(std::find(Extensions.begin(), Extensions.end(),
|
||||
VK_AMD_NEGATIVE_VIEWPORT_HEIGHT_EXTENSION_NAME) != Extensions.end())
|
||||
m_ExtensionsEnabled[VkCheckExt_AMD_neg_viewport] = true;
|
||||
|
||||
std::vector<string> Layers;
|
||||
for(uint32_t i = 0; i < createInfo.enabledLayerCount; i++)
|
||||
Layers.push_back(createInfo.ppEnabledLayerNames[i]);
|
||||
|
||||
+590
-586
File diff suppressed because it is too large.
Load diff
@@ -1489,7 +1489,12 @@ namespace renderdocui.Windows.PipelineState
|
||||
int i = 0;
|
||||
foreach (var v in state.VP.viewportScissors)
|
||||
{
|
||||
var node = viewports.Nodes.Add(new object[] { i, v.vp.x, v.vp.y, v.vp.Width, v.vp.Height, v.vp.MinDepth, v.vp.MaxDepth });
|
||||
string misc = "";
|
||||
|
||||
if (v.vp.Height < 0.0f)
|
||||
misc = "Inverted (negative height)";
|
||||
|
||||
var node = viewports.Nodes.Add(new object[] { i, v.vp.x, v.vp.y, v.vp.Width, Math.Abs(v.vp.Height), v.vp.MinDepth, v.vp.MaxDepth, misc });
|
||||
|
||||
if (v.vp.Width == 0 || v.vp.Height == 0 || v.vp.MinDepth == v.vp.MaxDepth)
|
||||
EmptyRow(node);
|
||||
|
||||
Reference in new issue
Block a user