https://bugs.freedesktop.org/show_bug.cgi?id=31159
Brian Paul <brian.e.p...@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #11 from Brian Paul <brian.e.p...@gmail.com> 2011-03-08 07:32:12 PST --- (In reply to comment #10) > Created an attachment (id=44230) View: https://bugs.freedesktop.org/attachment.cgi?id=44230 Review: https://bugs.freedesktop.org/review?bug=31159&attachment=44230 > swrast patch > > This adds clamping to swrast's sample_depth_texture, but there's another bug: > With GL_LEQUAL, shadow_compare correctly returns 1 if coord <= depthSample, > whereas shadow_compare4 returns 0 if depthXX <= coord (for all XX). Looks like > compare4 is trying to flip the conditional, but flipping <= gives > not >=, so > it's wrong when e.g. depthXX == coord == 1. Fixing this (plus the clamping) > makes the shadows work for me in swrast. > > Also, I noticed the GL_ALWAYS case in shadow_compare4 differs from > shadow_compare and seems wrong. Also the default case reports the wrong > function name and the return value differs from shadow_compare. So I've tried > to fix those as well. > > Mesa/master softpipe and llvmpipe both fix the shadow bug for me too. Thanks. The GL_EQUAL and GL_NOTEQUAL cases were wrong too. I'll fix that bit in the patch. I think I'll flip the conditionals in shadow_compare4() so it looks more like shadow_compare() and the spec language. Closing. -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev