Implement baseline mesh shader on vulkan

* This supports capture and replay of mesh draws, shader editing with printf
  support, overlays, and pixel shader debugging.
* Not supported yet include the mesh viewer and shader debugging.
This commit is contained in:
baldurk committed 2023-11-16 18:20:24 +00:00
1 parent cc80757e4e
commit 5ad3e67a2d
30 files changed
+2855 -569

No files matched your search

+1
View File
@@ -61,6 +61,7 @@
RESOURCE_DEF(cut, "cut.png") \
RESOURCE_DEF(del, "del.png") \
RESOURCE_DEF(disconnect, "disconnect.png") \
RESOURCE_DEF(draw_vertex, "draw_vertex.png") \
RESOURCE_DEF(find, "find.png") \
RESOURCE_DEF(filter, "filter.png") \
RESOURCE_DEF(filter_reapply, "filter_reapply.png") \
Binary file not shown.

After

Width:  |  Height:  |  Size: 510 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 797 B

+2
View File
@@ -81,6 +81,8 @@
<file>del@2x.png</file>
<file>disconnect.png</file>
<file>disconnect@2x.png</file>
<file>draw_vertex.png</file>
<file>draw_vertex@2x.png</file>
<file>filter.png</file>
<file>filter@2x.png</file>
<file>filter_reapply.png</file>
File diff suppressed because it is too large. Load diff
@@ -71,6 +71,7 @@ private slots:
void on_showEmpty_toggled(bool checked);
void on_meshView_clicked();
void on_msMeshButton_clicked();
void on_viAttrs_itemActivated(RDTreeWidgetItem *item, int column);
void on_viBuffers_itemActivated(RDTreeWidgetItem *item, int column);
void on_viAttrs_mouseMove(QMouseEvent *event);
@@ -100,6 +101,9 @@ private:
PipelineStateViewer &m_Common;
ComputeDebugSelector *m_ComputeDebugSelector;
void setOldMeshPipeFlow();
void setNewMeshPipeFlow();
QVariantList makeSampler(const QString &bindset, const QString &slotname,
const VKPipe::BindingElement &descriptor);
void addResourceRow(ShaderReflection *shaderDetails, const VKPipe::Shader &stage, int bindset,
@@ -170,4 +174,6 @@ private:
// from an combined image to its sampler (since we de-duplicate)
QMap<RDTreeWidgetItem *, RDTreeWidgetItem *> m_CombinedImageSamplers;
bool m_MeshPipe = false;
};
@@ -4132,6 +4132,664 @@
</item>
</layout>
</widget>
<widget class="QWidget" name="TS">
<attribute name="title">
<string>Task Shader</string>
</attribute>
<layout class="QVBoxLayout" name="tsShaderVerticalLayout">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QGroupBox" name="tsShaderGroup">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Shader</string>
</property>
<layout class="QHBoxLayout" name="tsShaderHorizontalLayout">
<property name="spacing">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>4</number>
</property>
<item>
<widget class="RDLabel" name="tsShader">
<property name="frameShape">
<enum>QFrame::Box</enum>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="tsShaderViewButton">
<property name="cursor">
<cursorShape>PointingHandCursor</cursorShape>
</property>
<property name="toolTip">
<string>Open Shader Source</string>
</property>
<property name="text">
<string>View</string>
</property>
<property name="icon">
<iconset resource="../../Resources/resources.qrc">
<normaloff>:/action.png</normaloff>:/action.png</iconset>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextBesideIcon</enum>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="tsShaderEditButton">
<property name="toolTip">
<string>Edit Shader</string>
</property>
<property name="text">
<string>Edit</string>
</property>
<property name="icon">
<iconset resource="../../Resources/resources.qrc">
<normaloff>:/page_white_edit.png</normaloff>:/page_white_edit.png</iconset>
</property>
<property name="popupMode">
<enum>QToolButton::MenuButtonPopup</enum>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextBesideIcon</enum>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="tsShaderSaveButton">
<property name="toolTip">
<string>Save Shader SPIR-V</string>
</property>
<property name="text">
<string>Save</string>
</property>
<property name="icon">
<iconset resource="../../Resources/resources.qrc">
<normaloff>:/save.png</normaloff>:/save.png</iconset>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextBesideIcon</enum>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="tsShaderMessagesButton">
<property name="toolTip">
<string>View Shader Messages</string>
</property>
<property name="text">
<string>Messages</string>
</property>
<property name="icon">
<iconset resource="../../Resources/resources.qrc">
<normaloff>:/text_add.png</normaloff>:/text_add.png</iconset>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextBesideIcon</enum>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<spacer name="tsShaderSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QScrollArea" name="tsScroll">
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="widgetResizable">
<bool>true</bool>
</property>
<widget class="QWidget" name="tsScrollContents">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>96</width>
<height>172</height>
</rect>
</property>
<layout class="QVBoxLayout" name="tsShaderVerticalLayout2">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="CollapseGroupBox" name="tsResGroup">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>1</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Resources</string>
</property>
<layout class="QHBoxLayout" name="tsShaderHorizontalLayout2">
<property name="leftMargin">
<number>2</number>
</property>
<property name="topMargin">
<number>2</number>
</property>
<property name="rightMargin">
<number>2</number>
</property>
<property name="bottomMargin">
<number>2</number>
</property>
<item>
<widget class="RDTreeWidget" name="tsResources">
<property name="frameShape">
<enum>QFrame::Box</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Plain</enum>
</property>
<property name="editTriggers">
<set>QAbstractItemView::NoEditTriggers</set>
</property>
<property name="showDropIndicator" stdset="0">
<bool>false</bool>
</property>
<property name="rootIsDecorated">
<bool>true</bool>
</property>
<property name="uniformRowHeights">
<bool>true</bool>
</property>
<property name="allColumnsShowFocus">
<bool>true</bool>
</property>
<attribute name="headerStretchLastSection">
<bool>false</bool>
</attribute>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="CollapseGroupBox" name="tsUBOGroup">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>1</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Uniform Buffers</string>
</property>
<layout class="QHBoxLayout" name="tsShaderHorizontalLayout3">
<property name="leftMargin">
<number>2</number>
</property>
<property name="topMargin">
<number>2</number>
</property>
<property name="rightMargin">
<number>2</number>
</property>
<property name="bottomMargin">
<number>2</number>
</property>
<item>
<widget class="RDTreeWidget" name="tsUBOs">
<property name="frameShape">
<enum>QFrame::Box</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Plain</enum>
</property>
<property name="editTriggers">
<set>QAbstractItemView::NoEditTriggers</set>
</property>
<property name="showDropIndicator" stdset="0">
<bool>false</bool>
</property>
<property name="rootIsDecorated">
<bool>true</bool>
</property>
<property name="uniformRowHeights">
<bool>true</bool>
</property>
<property name="allColumnsShowFocus">
<bool>true</bool>
</property>
<attribute name="headerStretchLastSection">
<bool>false</bool>
</attribute>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="tsVerticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::MinimumExpanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="MS">
<attribute name="title">
<string>Mesh Shader</string>
</attribute>
<layout class="QVBoxLayout" name="msShaderVerticalLayout">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QGroupBox" name="msShaderGroup">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Shader</string>
</property>
<layout class="QHBoxLayout" name="msShaderHorizontalLayout">
<property name="spacing">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>4</number>
</property>
<item>
<widget class="RDLabel" name="msShader">
<property name="frameShape">
<enum>QFrame::Box</enum>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="msShaderViewButton">
<property name="cursor">
<cursorShape>PointingHandCursor</cursorShape>
</property>
<property name="toolTip">
<string>Open Shader Source</string>
</property>
<property name="text">
<string>View</string>
</property>
<property name="icon">
<iconset resource="../../Resources/resources.qrc">
<normaloff>:/action.png</normaloff>:/action.png</iconset>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextBesideIcon</enum>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="msShaderEditButton">
<property name="toolTip">
<string>Edit Shader</string>
</property>
<property name="text">
<string>Edit</string>
</property>
<property name="icon">
<iconset resource="../../Resources/resources.qrc">
<normaloff>:/page_white_edit.png</normaloff>:/page_white_edit.png</iconset>
</property>
<property name="popupMode">
<enum>QToolButton::MenuButtonPopup</enum>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextBesideIcon</enum>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="msShaderSaveButton">
<property name="toolTip">
<string>Save Shader SPIR-V</string>
</property>
<property name="text">
<string>Save</string>
</property>
<property name="icon">
<iconset resource="../../Resources/resources.qrc">
<normaloff>:/save.png</normaloff>:/save.png</iconset>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextBesideIcon</enum>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="msShaderMessagesButton">
<property name="toolTip">
<string>View Shader Messages</string>
</property>
<property name="text">
<string>Messages</string>
</property>
<property name="icon">
<iconset resource="../../Resources/resources.qrc">
<normaloff>:/text_add.png</normaloff>:/text_add.png</iconset>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextBesideIcon</enum>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="msMeshButton">
<property name="toolTip">
<string>View Mesh</string>
</property>
<property name="text">
<string>View Mesh</string>
</property>
<property name="icon">
<iconset resource="../../Resources/resources.qrc">
<normaloff>:/draw_vertex.png</normaloff>:/draw_vertex.png</iconset>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextBesideIcon</enum>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="msTopoLabel">
<property name="text">
<string> Output Topology: </string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="msTopology">
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<spacer name="msShaderSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QScrollArea" name="msScroll">
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="widgetResizable">
<bool>true</bool>
</property>
<widget class="QWidget" name="msScrollContents">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>96</width>
<height>172</height>
</rect>
</property>
<layout class="QVBoxLayout" name="msShaderVerticalLayout2">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="CollapseGroupBox" name="msResGroup">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>1</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Resources</string>
</property>
<layout class="QHBoxLayout" name="msShaderHorizontalLayout2">
<property name="leftMargin">
<number>2</number>
</property>
<property name="topMargin">
<number>2</number>
</property>
<property name="rightMargin">
<number>2</number>
</property>
<property name="bottomMargin">
<number>2</number>
</property>
<item>
<widget class="RDTreeWidget" name="msResources">
<property name="frameShape">
<enum>QFrame::Box</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Plain</enum>
</property>
<property name="editTriggers">
<set>QAbstractItemView::NoEditTriggers</set>
</property>
<property name="showDropIndicator" stdset="0">
<bool>false</bool>
</property>
<property name="rootIsDecorated">
<bool>true</bool>
</property>
<property name="uniformRowHeights">
<bool>true</bool>
</property>
<property name="allColumnsShowFocus">
<bool>true</bool>
</property>
<attribute name="headerStretchLastSection">
<bool>false</bool>
</attribute>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="CollapseGroupBox" name="msUBOGroup">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>1</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Uniform Buffers</string>
</property>
<layout class="QHBoxLayout" name="msShaderHorizontalLayout3">
<property name="leftMargin">
<number>2</number>
</property>
<property name="topMargin">
<number>2</number>
</property>
<property name="rightMargin">
<number>2</number>
</property>
<property name="bottomMargin">
<number>2</number>
</property>
<item>
<widget class="RDTreeWidget" name="msUBOs">
<property name="frameShape">
<enum>QFrame::Box</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Plain</enum>
</property>
<property name="editTriggers">
<set>QAbstractItemView::NoEditTriggers</set>
</property>
<property name="showDropIndicator" stdset="0">
<bool>false</bool>
</property>
<property name="rootIsDecorated">
<bool>true</bool>
</property>
<property name="uniformRowHeights">
<bool>true</bool>
</property>
<property name="allColumnsShowFocus">
<bool>true</bool>
</property>
<attribute name="headerStretchLastSection">
<bool>false</bool>
</attribute>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="msVerticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::MinimumExpanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
+2
View File
@@ -1980,6 +1980,8 @@
<Image Include="Resources\del.png" />
<Image Include="Resources\disconnect%402x.png" />
<Image Include="Resources\disconnect.png" />
<Image Include="Resources\draw_vertex%402x.png" />
<Image Include="Resources\draw_vertex.png" />
<Image Include="Resources\filter%402x.png" />
<Image Include="Resources\filter.png" />
<Image Include="Resources\filter_reapply%402x.png" />
@@ -1978,6 +1978,12 @@
<Image Include="Resources\help%402x.png">
<Filter>Resources\Files</Filter>
</Image>
<Image Include="Resources\draw_vertex%402x.png">
<Filter>Resources\Files</Filter>
</Image>
<Image Include="Resources\draw_vertex.png">
<Filter>Resources\Files</Filter>
</Image>
</ItemGroup>
<ItemGroup>
<Natvis Include="python36.natvis" />