From: bugzilla-daemon@freedesktop.org
To: dri-devel@lists.freedesktop.org
Subject: [Bug 66067] Trine 2's fragment normal buffer is mixtextured on Radeon HD 6770 (Juniper)
Date: Sat, 13 Feb 2016 03:57:38 +0000 [thread overview]
Message-ID: <bug-66067-502-JOHnHoKog1@http.bugs.freedesktop.org/> (raw)
In-Reply-To: <bug-66067-502@http.bugs.freedesktop.org/>
[-- Attachment #1.1: Type: text/plain, Size: 2978 bytes --]
https://bugs.freedesktop.org/show_bug.cgi?id=66067
--- Comment #35 from Roland Scheidegger <sroland@vmware.com> ---
(In reply to Daniel Scharrer from comment #34)
> Came across another game that does this wrong: Never Alone
> (http://store.steampowered.com/app/295790) However this one does need shadow
> comparison in other shaders.
>
> I've contacted the developers about this (as I have for the other affected
> games) but I fear that this problem will just keep coming up - especially
> with the NVIDIA driver ignoring the shadow sampler from the shader and
> Catalyst also having a workaround (at least the Trine games rendered
> correctly with it the last time I tried). Additionally at one of the
> developers I have contacted suggested they are unlikely to release another
> patch so this will likely remain broken.
>
> Would it be possible to - instead of branching in the shader - create shader
> variants if the TEXTURE_COMPARE_MODE does not match up with the use in the
> shader?
Possible, sure. Essentially you'd have to put a mask into the shader key
indicating which texture units have the PIPE_TEX_COMPARE_R_TO_TEXTURE bit set
in the sampler (well, for used units and only those which actually have shadow
targets). But then you'd have a dependency on sampler changes so you'd need to
recheck that on changes there and recompile (well, recompilation shouldn't be
an issue, as you'd only ever have to do it for those totally broken shaders,
and only once for each shader).
I blame cg - makes it super easy to mistakenly use the shadow variant of a
texture instruction. At least I haven't seen anyone mistakenly using shadow
variant with glsl... I'm wondering though why anyone is still using that stuff.
> Again, would be good to know how the blob handles this.
It would be possible to recognize this bug only on ARB_program shaders, so you
only have some extra cost there - that is make some shader key there and
recompile if it doesn't match currently bound samplers. This actually should be
easier - core gl requires depth_compare_mode being ignored for non-depth
textures (which is why the sampler code in mesa/st checks the base format and
only sets depth compare mode with depth textures) but there is no such
requirement in ARB_fp_shadow as this needs to match (well, just as it needs to
match the target in the shader... just don't tell me the apps don't get this
right neither...). This means you don't have a dependency on the bound
textures, only samplers. I suppose it could be done in the mesa state tracker
that way outside of drivers but I'm not sure if anyone is really thrilled...
Those shaders are really simply terribly broken, broken, broken (and people are
probably less interested in trying to come up with some quite hacky, creative
workarounds if it's really clearly the fault of others...) - there's very good
reasons behavior is undefined for such shaders.
--
You are receiving this mail because:
You are the assignee for the bug.
[-- Attachment #1.2: Type: text/html, Size: 4000 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2016-02-13 3:57 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-23 5:46 [Bug 66067] New: Trine 2 color problems on Radeon HD 6770 (Juniper) bugzilla-daemon
2013-06-23 5:46 ` [Bug 66067] " bugzilla-daemon
2013-06-23 5:47 ` bugzilla-daemon
2013-06-23 16:45 ` bugzilla-daemon
2013-06-23 18:20 ` bugzilla-daemon
2013-07-05 5:30 ` bugzilla-daemon
2013-07-05 5:30 ` bugzilla-daemon
2013-07-05 5:31 ` bugzilla-daemon
2013-07-06 5:59 ` bugzilla-daemon
2013-07-29 18:48 ` [Bug 66067] Trine 2's fragment normal buffer is mixtextured " bugzilla-daemon
2013-09-17 23:25 ` bugzilla-daemon
2013-09-17 23:26 ` bugzilla-daemon
2013-09-18 0:52 ` bugzilla-daemon
2013-09-18 1:37 ` bugzilla-daemon
2013-09-18 1:55 ` bugzilla-daemon
2013-09-18 4:16 ` bugzilla-daemon
2013-09-21 1:09 ` bugzilla-daemon
2014-02-08 20:57 ` bugzilla-daemon
2014-04-15 5:47 ` bugzilla-daemon
2014-05-05 15:27 ` bugzilla-daemon
2014-07-04 3:13 ` bugzilla-daemon
2014-07-04 4:18 ` bugzilla-daemon
2014-07-04 6:25 ` bugzilla-daemon
2014-07-04 11:27 ` bugzilla-daemon
2014-07-04 11:52 ` bugzilla-daemon
2014-07-04 12:45 ` bugzilla-daemon
2014-07-09 8:53 ` bugzilla-daemon
2014-07-09 8:54 ` bugzilla-daemon
2014-07-09 10:54 ` bugzilla-daemon
2014-07-09 12:16 ` bugzilla-daemon
2014-07-09 13:39 ` bugzilla-daemon
2014-07-09 23:09 ` bugzilla-daemon
2014-07-10 0:03 ` bugzilla-daemon
2014-12-13 5:26 ` bugzilla-daemon
2014-12-13 5:38 ` bugzilla-daemon
2014-12-13 9:21 ` bugzilla-daemon
2015-09-13 20:02 ` bugzilla-daemon
2015-09-13 22:47 ` bugzilla-daemon
2015-09-30 13:04 ` bugzilla-daemon
2016-02-13 1:02 ` bugzilla-daemon
2016-02-13 3:57 ` bugzilla-daemon [this message]
2016-02-13 4:02 ` bugzilla-daemon
2016-02-13 4:29 ` bugzilla-daemon
2016-02-13 18:01 ` bugzilla-daemon
2019-09-18 19:04 ` bugzilla-daemon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-66067-502-JOHnHoKog1@http.bugs.freedesktop.org/ \
--to=bugzilla-daemon@freedesktop.org \
--cc=dri-devel@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).