| 5676 | } |
| 5677 | |
| 5678 | bool BufferViewer::isCurrentRasterOut() |
| 5679 | { |
| 5680 | BufferItemModel *model = currentBufferModel(); |
| 5681 | |
| 5682 | // if geometry/tessellation is enabled, only the GS out stage is rasterized output |
| 5683 | if((m_Ctx.CurPipelineState().GetShader(ShaderStage::Tess_Eval) != ResourceId() || |
| 5684 | m_Ctx.CurPipelineState().GetShader(ShaderStage::Geometry) != ResourceId()) && |
| 5685 | m_CurStage != MeshDataStage::GSOut) |
| 5686 | return false; |
| 5687 | |
| 5688 | // task shader outputs are not rasterized by definition |
| 5689 | if(m_CurStage == MeshDataStage::TaskOut) |
| 5690 | return false; |
| 5691 | |
| 5692 | if(model) |
| 5693 | { |
| 5694 | int posEl = model->posColumn(); |
| 5695 | if(posEl >= 0 && posEl < model->getConfig().columns.count()) |
| 5696 | { |
| 5697 | return model->getConfig().props[posEl].systemValue == ShaderBuiltin::Position; |
| 5698 | } |
| 5699 | |
| 5700 | // if the model isn't prepared yet then return a sensible default answer - if no tess/geom, |
| 5701 | // vertex is the output. Otherwise geom is the output. For task/mesh then mesh is the output |
| 5702 | if(model->getConfig().columns.empty()) |
| 5703 | { |
| 5704 | if(m_Ctx.CurPipelineState().GetShader(ShaderStage::Tess_Eval) != ResourceId() || |
| 5705 | m_Ctx.CurPipelineState().GetShader(ShaderStage::Geometry) != ResourceId()) |
| 5706 | return m_CurStage == MeshDataStage::GSOut; |
| 5707 | else if(m_CurStage == MeshDataStage::MeshOut) |
| 5708 | return true; |
| 5709 | else if(m_Ctx.CurPipelineState().GetShader(ShaderStage::Tess_Eval) == ResourceId() && |
| 5710 | m_Ctx.CurPipelineState().GetShader(ShaderStage::Geometry) == ResourceId() && |
| 5711 | m_CurStage == MeshDataStage::VSOut) |
| 5712 | return true; |
| 5713 | } |
| 5714 | } |
| 5715 | |
| 5716 | return false; |
| 5717 | } |
| 5718 | |
| 5719 | int BufferViewer::currentStageIndex() |
| 5720 | { |
nothing calls this directly
no test coverage detected