Don't consider interim position builtins to be projected/rasterized

* Even if the VS outputs to the position builtin, if there's a tessellation or
  geometry shader consuming it that doesn't mean much.
This commit is contained in:
baldurk
2019-06-05 17:51:43 +01:00
parent 700b100dc5
commit 70007d0794
+11
View File
@@ -2610,6 +2610,11 @@ void BufferViewer::UI_CalculateMeshFormats()
m_PostVSPosition.vertexByteOffset += vsoutConfig.columns[elIdx].offset;
m_PostVSPosition.unproject = vsoutConfig.columns[elIdx].systemValue == ShaderBuiltin::Position;
// if geometry/tessellation is enabled, don't unproject VS output data
if(m_Ctx.CurPipelineState().GetShader(ShaderStage::Tess_Eval) != ResourceId() ||
m_Ctx.CurPipelineState().GetShader(ShaderStage::Geometry) != ResourceId())
m_PostVSPosition.unproject = false;
elIdx = m_ModelVSOut->secondaryColumn();
if(elIdx >= 0 && elIdx < vsoutConfig.columns.count())
@@ -2965,6 +2970,12 @@ bool BufferViewer::isCurrentRasterOut()
BufferItemModel *model = currentBufferModel();
int stage = currentStageIndex();
// if geometry/tessellation is enabled, only the GS out stage is rasterized output
if((m_Ctx.CurPipelineState().GetShader(ShaderStage::Tess_Eval) != ResourceId() ||
m_Ctx.CurPipelineState().GetShader(ShaderStage::Geometry) != ResourceId()) &&
m_CurStage != MeshDataStage::GSOut)
return false;
if(model)
{
int posEl = model->posColumn();