[Bug 97988] [radeonsi] playing back videos with VDPAU exhibits deinterlacing/anti-aliasing issues not visible with VA-API
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Mon Oct 3 17:29:38 UTC 2016
https://bugs.freedesktop.org/show_bug.cgi?id=97988
--- Comment #12 from Tom Stellard <tstellar at gmail.com> ---
(In reply to Marek Olšák from comment #11)
> 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.
I think the best solution here would be to teach the backend how to do a scalar
select based on value of vccz.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20161003/4bcc14b0/attachment-0001.html>
More information about the dri-devel
mailing list