https://bugs.freedesktop.org/show_bug.cgi?id=31159
--- Comment #10 from Philip Taylor <exc...@gmail.com> 2011-03-08 06:32:23 PST --- 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. -- 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