| 748 | } |
| 749 | |
| 750 | void TextureViewer::RT_FetchCurrentPixel(IReplayController *r, uint32_t x, uint32_t y, |
| 751 | PixelValue &pickValue, PixelValue &realValue) |
| 752 | { |
| 753 | TextureDescription *texptr = GetCurrentTexture(); |
| 754 | |
| 755 | if(texptr == NULL) |
| 756 | return; |
| 757 | |
| 758 | if(m_TexDisplay.flipY) |
| 759 | y = (texptr->height - 1) - y; |
| 760 | |
| 761 | x = qMax(0U, MipCoordFromBase(x, texptr->width)); |
| 762 | y = qMax(0U, MipCoordFromBase(y, texptr->height)); |
| 763 | |
| 764 | ResourceId id = m_TexDisplay.resourceId; |
| 765 | Subresource sub = m_TexDisplay.subresource; |
| 766 | CompType typeCast = m_TexDisplay.typeCast; |
| 767 | |
| 768 | if(m_TexDisplay.overlay == DebugOverlay::QuadOverdrawDraw || |
| 769 | m_TexDisplay.overlay == DebugOverlay::QuadOverdrawPass || |
| 770 | m_TexDisplay.overlay == DebugOverlay::TriangleSizeDraw || |
| 771 | m_TexDisplay.overlay == DebugOverlay::TriangleSizePass) |
| 772 | { |
| 773 | ResourceId overlayResId = m_Output->GetDebugOverlayTexID(); |
| 774 | |
| 775 | if(overlayResId != ResourceId()) |
| 776 | { |
| 777 | id = overlayResId; |
| 778 | typeCast = CompType::Typeless; |
| 779 | } |
| 780 | } |
| 781 | |
| 782 | realValue = r->PickPixel(id, x, y, sub, typeCast); |
| 783 | |
| 784 | if(m_TexDisplay.customShaderId != ResourceId()) |
| 785 | { |
| 786 | pickValue = r->PickPixel(m_Output->GetCustomShaderTexID(), x, y, |
| 787 | {m_TexDisplay.subresource.mip, 0, 0}, CompType::Typeless); |
| 788 | } |
| 789 | else |
| 790 | { |
| 791 | pickValue = realValue; |
| 792 | } |
| 793 | } |
| 794 | |
| 795 | void TextureViewer::RT_PickPixelsAndUpdate(IReplayController *r) |
| 796 | { |
nothing calls this directly
no test coverage detected