summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2018-01-24 11:43:55 -0800
committerEmil Velikov <[email protected]>2018-01-26 19:53:01 +0000
commit85c18bb410983b0f6a544d91ae7e3d3fe05591dc (patch)
tree5f26cff5a05e0e2aead5c2f46d6eac859d140802
parentd2e9fe8351b14d8d19022ad9f47c242cb5353672 (diff)
i965/surface_state: Drop brw_aux_surface_disabled
The only purpose of this function is to disable aux on texture surfaces when the corresponding renderbuffer has aux disabled. However, the act of disabling aux on the renderbuffer will cause it to be resolved and intel_miptree_texture_aux_usage will already check the resolved status of a texture and return ISL_AUX_USAGE_NONE for it. Even if we used CCS for it, that wouldn't really be a problem because the CCS will be in the pass-through state and so it would effectively be ignored. Cc: [email protected] Reviewed-by: Kenneth Graunke <[email protected]> (cherry picked from commit 468ea3cc451f2c71e7d1be528090cb0334d500c2)
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm_surface_state.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
index fd2ee36a869..10bd812b1f7 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
@@ -441,23 +441,6 @@ swizzle_to_scs(GLenum swizzle, bool need_green_to_blue)
return (need_green_to_blue && scs == HSW_SCS_GREEN) ? HSW_SCS_BLUE : scs;
}
-static bool
-brw_aux_surface_disabled(const struct brw_context *brw,
- const struct intel_mipmap_tree *mt)
-{
- const struct gl_framebuffer *fb = brw->ctx.DrawBuffer;
-
- for (unsigned i = 0; i < fb->_NumColorDrawBuffers; i++) {
- const struct intel_renderbuffer *irb =
- intel_renderbuffer(fb->_ColorDrawBuffers[i]);
-
- if (irb && irb->mt == mt)
- return brw->draw_aux_buffer_disabled[i];
- }
-
- return false;
-}
-
static void
brw_update_texture_surface(struct gl_context *ctx,
unsigned unit,
@@ -588,9 +571,6 @@ brw_update_texture_surface(struct gl_context *ctx,
enum isl_aux_usage aux_usage =
intel_miptree_texture_aux_usage(brw, mt, format);
- if (brw_aux_surface_disabled(brw, mt))
- aux_usage = ISL_AUX_USAGE_NONE;
-
brw_emit_surface_state(brw, mt, mt->target, view, aux_usage,
surf_offset, surf_index,
0);