diff options
author | Marek Olšák <marek.olsak@amd.com> | 2017-06-09 20:37:34 +0200 |
---|---|---|
committer | Marek Olšák <marek.olsak@amd.com> | 2017-06-22 01:48:30 +0200 |
commit | c2408838c83719cb133332c7adac71ef50503259 (patch) | |
tree | e09e430dd0678f4398b500824966ce16114bde51 /src/mesa/drivers/dri/i915 | |
parent | d28cc798bdf10c7e85189dc2dc3461d63e2fbfc7 (diff) |
mesa: replace _mesa_update_stencil() with helper functions
The idea is to remove the dependency on _mesa_update_state_locked,
so that st/mesa can skip it for stencil state updates, and then stop
setting _NEW_STENCIL in mesa/main if the driver is st/mesa.
The main motivation is to stop invoking _mesa_update_state_locked for
certain state groups.
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Diffstat (limited to 'src/mesa/drivers/dri/i915')
-rw-r--r-- | src/mesa/drivers/dri/i915/i915_state.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i915/intel_pixel.c | 3 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i915/intel_pixel_copy.c | 3 |
3 files changed, 5 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/i915/i915_state.c b/src/mesa/drivers/dri/i915/i915_state.c index 715db1fffa3..232fc9dce19 100644 --- a/src/mesa/drivers/dri/i915/i915_state.c +++ b/src/mesa/drivers/dri/i915/i915_state.c @@ -127,7 +127,7 @@ i915_update_stencil(struct gl_context * ctx) S5_STENCIL_PASS_Z_PASS_SHIFT)); /* Set back state if different from front. */ - if (ctx->Stencil._TestTwoSide) { + if (_mesa_stencil_is_two_sided(ctx)) { set_ctx_bits(I915_CTXREG_BF_STENCIL_OPS, BFO_STENCIL_REF_MASK | BFO_STENCIL_TEST_MASK | diff --git a/src/mesa/drivers/dri/i915/intel_pixel.c b/src/mesa/drivers/dri/i915/intel_pixel.c index feb1a3f97e8..b536c9b56d5 100644 --- a/src/mesa/drivers/dri/i915/intel_pixel.c +++ b/src/mesa/drivers/dri/i915/intel_pixel.c @@ -28,6 +28,7 @@ #include "main/accum.h" #include "main/enums.h" #include "main/state.h" +#include "main/stencil.h" #include "main/bufferobj.h" #include "main/context.h" #include "swrast/swrast.h" @@ -110,7 +111,7 @@ intel_check_blit_fragment_ops(struct gl_context * ctx, bool src_alpha_is_one) return false; } - if (ctx->Stencil._Enabled) { + if (_mesa_stencil_is_enabled(ctx)) { DBG("fallback due to image stencil\n"); return false; } diff --git a/src/mesa/drivers/dri/i915/intel_pixel_copy.c b/src/mesa/drivers/dri/i915/intel_pixel_copy.c index 213cdbd0f53..e447511f587 100644 --- a/src/mesa/drivers/dri/i915/intel_pixel_copy.c +++ b/src/mesa/drivers/dri/i915/intel_pixel_copy.c @@ -28,6 +28,7 @@ #include "main/glheader.h" #include "main/image.h" #include "main/state.h" +#include "main/stencil.h" #include "main/mtypes.h" #include "main/condrender.h" #include "main/fbobject.h" @@ -111,7 +112,7 @@ do_blit_copypixels(struct gl_context * ctx, return false; } - if (ctx->Stencil._Enabled) { + if (_mesa_stencil_is_enabled(ctx)) { perf_debug("glCopyPixels(): Unsupported stencil test state\n"); return false; } |