<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Rendering errors when running dolphin-emu with Vulkan backend, radv (Super Smash Bros. Melee)"
href="https://bugs.freedesktop.org/show_bug.cgi?id=103852#c8">Comment # 8</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Rendering errors when running dolphin-emu with Vulkan backend, radv (Super Smash Bros. Melee)"
href="https://bugs.freedesktop.org/show_bug.cgi?id=103852">bug 103852</a>
from <span class="vcard"><a class="email" href="mailto:benclapp55@gmail.com" title="Ben Clapp <benclapp55@gmail.com>"> <span class="fn">Ben Clapp</span></a>
</span></b>
<pre>Today I spent a number of hours looking at the background rendering errors in
RenderDoc.
The vertex shader outputs some vertices that have two vertex colors, colors_0
and colors_1. (Only colors_0 is relevant here)
The fragment shader does a bunch of fiddling around with colors_0, a lot of
unnecessary conversions and re-assignments that effectively do nothing, and
ultimately the colors_0 value is passed to rastemp and tevin_d.
Some more fiddling around and, in the case of the areas of the screen where
there are rendering errors, the value of colors_0/rastemp/tevin_d ("tevin"
means "TEV input", referring to the Gamecube/Wii's Texture EnVironment
hardware) becomes the color value written to the framebuffer.
The problem is not in the vertex shader, nor is it in the fragment shader.
For some reason, the value of colors_0 coming out of the vertex shader is
correct, but the value of colors_0 in the fragment shader is inverted! So blue
will appear yellow, black while appear white, etc...
This seems to be a driver bug after all, and so I did try to spend some time
looking into radv's code to try and see if I could figure out a fix.
The issue might lie in radv_pipeline.c, I would think it probably has something
to do with the inter-stage varying colors_0 not getting filled or interpreted
correctly.
I've done lots of OpenGL and Vulkan programming, but I have little experience
with the driver side of things, so while it might be interesting to talk a bit
with the radv devs and learn a thing or two, I'm not sure how much further I
can go in terms of looking into this on my own without assistance.
Sven: I'll work on making some separate issues on another occasion for the
radeonsi freeze for Melee and the system freezes/GPU hangs for other games.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
<li>You are the QA Contact for the bug.</li>
</ul>
</body>
</html>