diff options
author | Nanley Chery <[email protected]> | 2018-03-27 15:46:49 -0700 |
---|---|---|
committer | Nanley Chery <[email protected]> | 2018-04-09 10:56:48 -0700 |
commit | 3dbb49a97809cd3a9911d2782bb7b03f8ae1a7d8 (patch) | |
tree | 597cdf445ad91ed3a90a38c52dfe8171eeca63da /src/mesa/drivers/dri/i965/intel_mipmap_tree.h | |
parent | 1ce7ae391e8a41b2ee4dab568cd77faa072a0fe2 (diff) |
i965/miptree: Move the clear color and value setter implementations
These will get more complex in later commits.
Reviewed-by: Topi Pohjolainen <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/intel_mipmap_tree.h')
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_mipmap_tree.h | 25 |
1 files changed, 4 insertions, 21 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.h b/src/mesa/drivers/dri/i965/intel_mipmap_tree.h index df9b76892ac..ff6ce4ecf9e 100644 --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.h +++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.h @@ -731,32 +731,15 @@ bool intel_miptree_sample_with_hiz(struct brw_context *brw, struct intel_mipmap_tree *mt); - -static inline bool +bool intel_miptree_set_clear_color(struct brw_context *brw, struct intel_mipmap_tree *mt, - union isl_color_value clear_color) -{ - if (memcmp(&mt->fast_clear_color, &clear_color, sizeof(clear_color)) != 0) { - mt->fast_clear_color = clear_color; - brw->ctx.NewDriverState |= BRW_NEW_AUX_STATE; - return true; - } - return false; -} + union isl_color_value clear_color); -static inline bool +bool intel_miptree_set_depth_clear_value(struct brw_context *brw, struct intel_mipmap_tree *mt, - float clear_value) -{ - if (mt->fast_clear_color.f32[0] != clear_value) { - mt->fast_clear_color.f32[0] = clear_value; - brw->ctx.NewDriverState |= BRW_NEW_AUX_STATE; - return true; - } - return false; -} + float clear_value); #ifdef __cplusplus } |