d3d1x: fix shadow comparison to gallium enum off by one
authorChristoph Bumiller <e0425955@student.tuwien.ac.at>
Sun, 25 Sep 2011 17:03:44 +0000 (19:03 +0200)
committerChristoph Bumiller <e0425955@student.tuwien.ac.at>
Fri, 21 Oct 2011 21:00:37 +0000 (23:00 +0200)
src/gallium/state_trackers/d3d1x/gd3d11/d3d11_screen.h

index fdfaacc88b9e4230301ddfefaaafe990901e3e07..401e3121c43304ec48e0e456eb4369df517a8e04 100644 (file)
@@ -594,7 +594,7 @@ struct GalliumD3D11ScreenImpl : public GalliumD3D11Screen
                if(sampler_desc->Filter & 0x80)
                {
                        state.compare_mode = PIPE_TEX_COMPARE_R_TO_TEXTURE;
-                       state.compare_func = sampler_desc->ComparisonFunc;
+                       state.compare_func = sampler_desc->ComparisonFunc - 1;
                }
                state.wrap_s = d3d11_to_pipe_wrap[sampler_desc->AddressU];
                state.wrap_t = d3d11_to_pipe_wrap[sampler_desc->AddressV];