Bug 14002

Summary: [i965] GL_COMPARE_R_TO_TEXTURE_ARB is not handled well
Product: Mesa Reporter: Shuang He <shuang.he>
Component: Drivers/DRI/i965Assignee: haihao <haihao.xiang>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: medium CC: dri-devel
Version: unspecified   
Hardware: Other   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: test case

Description Shuang He 2008-01-09 18:53:01 UTC
System Environment:
--------------------------
--Platform: FC6
--Xf86_video_intel:f089942689df622b1af00569eade4883a84eb7a3
--Mesa:3369cd9a6f943365242d7832e69788d4aede9a8f 
--DRM:cd19dcef4f7cc454f68618a0a1e903f159db21ad
--Kernel:2.6.22

Bug detailed description:
--------------------------
this issue doesn't happen in software rendering mode
this issue doesn't happen on i915
GL_COMPARE_R_TO_TEXTURE_ARB is not handled well.
the driver will complains:
"Unknown value in intel_translate_shadow_compare_func: 884e"

and it seems, the code related here is:
src/mesa/drivers/dri/i965/brw_wm_sampler_state.c:324L
   if (key->comparemode == GL_COMPARE_R_TO_TEXTURE_ARB) {
      /* Shadowing is "enabled" by emitting a particular sampler
       * message (sample_c).  So need to recompile WM program when
       * shadow comparison is enabled on each/any texture unit.
       */
      sampler->ss0.shadow_function =
         intel_translate_shadow_compare_func(key->comparemode);
   }
but intel_translate_shadow_compare_func can't handle this comparemode

Reproduce steps:
----------------
start X
compile and run the attached test case


Current result:
----------------
GL_COMPARE_R_TO_TEXTURE_ARB is not handled well


Expected result:
----------------
GL_COMPARE_R_TO_TEXTURE_ARB should be handled well
Comment 1 Shuang He 2008-01-09 18:54:52 UTC
Created attachment 13632 [details]
test case
Comment 2 haihao 2008-01-10 00:43:58 UTC
fixed in mesa (7086df58688dc375ffd4c0fb9a9884eae05a6e46)
Comment 3 Shuang He 2008-01-10 21:13:20 UTC
verified, thanks

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.