Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Pixel History columns for dual source output and blend src/dest on Vulkan #3003

Closed
wants to merge 18 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
ccccb9a
Create pixel history shader out 2 variable
w-pearson Jul 28, 2023
8104d26
Create pixel history blend source and blend dest variables
w-pearson Jul 28, 2023
5df9762
Blend pixel history widget background color with selection color
w-pearson Jul 28, 2023
70b412d
Fix debug pixel at primitive and event message mixing parameter order up
w-pearson Jul 28, 2023
33f4b4b
Use an enum for pixel history column ids instead of magic numbers
w-pearson Jul 28, 2023
c10467e
Allow changing the columns for pixel history
w-pearson Jul 28, 2023
0605594
Create pixel history tex before column
w-pearson Jul 28, 2023
551f147
Create pixel history shader out 2 column
w-pearson Jul 28, 2023
2098868
Create pixel history blend source and blend dest columns
w-pearson Jul 28, 2023
3040f8c
Add constants for pixel history colors
w-pearson Jul 28, 2023
7ec39b9
Clean up 3 small non-behavioral issues with Vulkan pixel history
w-pearson Jul 28, 2023
b57b488
Fix undersized buffer for Vulkan pixel history with many fragments
w-pearson Jul 28, 2023
a3d23a3
Create GetDualSrcSwappedShader for Vulkan dual source pixel history
w-pearson Jul 28, 2023
f6fed2b
Implement Vulkan dual source pixel history
w-pearson Jul 28, 2023
88436bf
Implement Vulkan blend source/blend dest pixel history
w-pearson Jul 28, 2023
94f9b13
Allow configuring the surface format for Vulkan demos
w-pearson Jul 28, 2023
3a689af
Add dual source blending demo and test
w-pearson Jul 28, 2023
c115cb6
Add demo/test for many primitives hitting the same pixel in one drawcall
w-pearson Jul 29, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 19 additions & 3 deletions qrenderdoc/Styles/RDStyle/RDStyle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1450,9 +1450,25 @@ void RDStyle::drawPrimitive(PrimitiveElement element, const QStyleOption *opt, Q
group = QPalette::Inactive;

if(viewitem->state & QStyle::State_Selected)
p->fillRect(viewitem->rect, viewitem->palette.brush(group, QPalette::Highlight));
else if(viewitem->backgroundBrush.style() != Qt::NoBrush)
p->fillRect(viewitem->rect, viewitem->backgroundBrush);
{
if(viewitem->backgroundBrush.style() != Qt::NoBrush)
{
p->fillRect(viewitem->rect, viewitem->backgroundBrush);
// If we have a custom color, use the selection color at half opacity over the custom color
QColor col = viewitem->palette.color(group, QPalette::Highlight);
col.setAlphaF(0.5f);
p->fillRect(viewitem->rect, QBrush(col));
}
else
{
p->fillRect(viewitem->rect, viewitem->palette.brush(group, QPalette::Highlight));
}
}
else
{
if(viewitem->backgroundBrush.style() != Qt::NoBrush)
p->fillRect(viewitem->rect, viewitem->backgroundBrush);
}

return;
}
Expand Down
17 changes: 5 additions & 12 deletions qrenderdoc/Widgets/Extended/RDTreeView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -771,18 +771,11 @@ void RDTreeView::drawBranches(QPainter *painter, const QRect &rect, const QModel
idx = idx.parent();
}

opt.rect = rect;
opt.rect.setWidth(depth * indentation());
opt.rect = allLinesRect;
opt.showDecorationSelected = true;
opt.backgroundBrush = index.data(Qt::BackgroundRole).value<QBrush>();
style()->drawPrimitive(QStyle::PE_PanelItemViewItem, &opt, painter, this);

QBrush back = index.data(Qt::BackgroundRole).value<QBrush>();

if(!selectionModel()->isSelected(index) && back.style() != Qt::NoBrush)
{
painter->fillRect(allLinesRect, back);
}

if(m_VisibleBranches)
{
QTreeView::drawBranches(painter, rect, index);
Expand Down Expand Up @@ -821,12 +814,12 @@ void RDTreeView::drawBranches(QPainter *painter, const QRect &rect, const QModel
{
parent = parents.pop();

back = parent.data(RDTreeView::TreeLineColorRole).value<QBrush>();
QBrush line = parent.data(RDTreeView::TreeLineColorRole).value<QBrush>();

if(back.style() != Qt::NoBrush)
if(line.style() != Qt::NoBrush)
{
// draw a centred pen vertically down the middle of branchRect
painter->setPen(QPen(QBrush(back), m_treeColorLineWidth));
painter->setPen(QPen(line, m_treeColorLineWidth));

QPoint topCentre = QRect(branchRect).center();
QPoint bottomCentre = topCentre;
Expand Down
Loading