i965: Use set_clear_color for depth miptrees
Reduce code duplication now and prevent it in the following commits. Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
This commit is contained in:
parent
92a0a87b6f
commit
6f609ca609
|
@ -213,7 +213,8 @@ brw_fast_clear_depth(struct gl_context *ctx)
|
|||
}
|
||||
}
|
||||
|
||||
intel_miptree_set_depth_clear_value(brw, mt, clear_value);
|
||||
const union isl_color_value clear_color = { .f32 = {clear_value, } };
|
||||
intel_miptree_set_clear_color(brw, mt, clear_color);
|
||||
same_clear_value = false;
|
||||
}
|
||||
|
||||
|
|
|
@ -3734,19 +3734,6 @@ intel_miptree_set_clear_color(struct brw_context *brw,
|
|||
return false;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
union isl_color_value
|
||||
intel_miptree_get_clear_color(const struct gen_device_info *devinfo,
|
||||
const struct intel_mipmap_tree *mt,
|
||||
|
|
|
@ -716,11 +716,6 @@ intel_miptree_get_clear_color(const struct gen_device_info *devinfo,
|
|||
struct brw_bo **clear_color_bo,
|
||||
uint32_t *clear_color_offset);
|
||||
|
||||
bool
|
||||
intel_miptree_set_depth_clear_value(struct brw_context *brw,
|
||||
struct intel_mipmap_tree *mt,
|
||||
float clear_value);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue