<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - [radeonsi] playing back videos with VDPAU exhibits deinterlacing/anti-aliasing issues not visible with VA-API"
href="https://bugs.freedesktop.org/show_bug.cgi?id=97988#c12">Comment # 12</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - [radeonsi] playing back videos with VDPAU exhibits deinterlacing/anti-aliasing issues not visible with VA-API"
href="https://bugs.freedesktop.org/show_bug.cgi?id=97988">bug 97988</a>
from <span class="vcard"><a class="email" href="mailto:tstellar@gmail.com" title="Tom Stellard <tstellar@gmail.com>"> <span class="fn">Tom Stellard</span></a>
</span></b>
<pre>
(In reply to Marek Olšák from <a href="show_bug.cgi?id=97988#c11">comment #11</a>)
<span class="quote">> Thanks Grigori.
>
> GLSL:
> color = fract(gl_FragCoord.y / 2) < 0.5 ?
> texture(texture0, texcoord0) :
> texture(texture1, texcoord0);
>
> texture0 and texture1 are SMEM loads.
>
> LLVM (SimplifyCFG) transforms it to:
> color = texture(fract(gl_FragCoord.y / 2) < 0.5 ? texture0 : texture1,
> texcoord0);
>
> That's a nice transformation. You don't have to use 2 SMEM loads, you can
> just use one SMEM load depending on the result of the condition.
>
> The problem is gl_FragCoord.y is a VGPR and texture0/1 are SGPRs, therefore
> flat VMEM loads are used to load the descriptors. However, image_sample
> requires descriptors in SGPRs, so v_readfirstlane is used. That effectively
> uses the result of the condition from the first active lane, discarding the
> results from all other lanes. The result would be exactly the same if the
> compiler did: v_readfirstlane s0, gl_FragCoord.y;
>
> The test case seems pretty trivial I wonder how many other apps are affected.</span >
I think the best solution here would be to teach the backend how to do a scalar
select based on value of vccz.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>