summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Berry <[email protected]>2013-04-25 10:57:48 -0700
committerPaul Berry <[email protected]>2013-04-30 13:46:57 -0700
commitbdf13dc8324c391b7d34f8bdaea72c4452ab7edb (patch)
tree4a84104f241a632a54ac5a73770c53a369ea299e
parentd48054ff222ac75241ca74b8e4080261eae9e8e9 (diff)
i965: Stop passing num_samples to intel_miptree_alloc_hiz().
The number of samples is already available in the miptree data structure, so there's no need to pass it in. I suspect this may fix a subtle bug because in one case (intel_renderbuffer_update_wrapper) we were always passing zero for num_samples, even though the buffer in question was not guaranteed to be single-sampled. But I wasn't able to find a failing test case. Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
-rw-r--r--src/mesa/drivers/dri/intel/intel_fbo.c4
-rw-r--r--src/mesa/drivers/dri/intel/intel_mipmap_tree.c7
-rw-r--r--src/mesa/drivers/dri/intel/intel_mipmap_tree.h3
3 files changed, 6 insertions, 8 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_fbo.c b/src/mesa/drivers/dri/intel/intel_fbo.c
index 15d3918110c..6730d263fa2 100644
--- a/src/mesa/drivers/dri/intel/intel_fbo.c
+++ b/src/mesa/drivers/dri/intel/intel_fbo.c
@@ -526,7 +526,7 @@ intel_renderbuffer_update_wrapper(struct intel_context *intel,
if (mt->hiz_mt == NULL &&
intel->vtbl.is_hiz_depth_format(intel, rb->Format)) {
- intel_miptree_alloc_hiz(intel, mt, 0 /* num_samples */);
+ intel_miptree_alloc_hiz(intel, mt);
if (!mt->hiz_mt)
return false;
}
@@ -1025,7 +1025,7 @@ intel_renderbuffer_move_to_temp(struct intel_context *intel,
false /* force_y_tiling */);
if (intel->vtbl.is_hiz_depth_format(intel, new_mt->format)) {
- intel_miptree_alloc_hiz(intel, new_mt, irb->mt->num_samples);
+ intel_miptree_alloc_hiz(intel, new_mt);
}
intel_miptree_copy_teximage(intel, intel_image, new_mt, invalidate);
diff --git a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
index 12a4a220786..c5f9f1fc8af 100644
--- a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
@@ -573,7 +573,7 @@ intel_miptree_create_for_renderbuffer(struct intel_context *intel,
goto fail;
if (intel->vtbl.is_hiz_depth_format(intel, format)) {
- ok = intel_miptree_alloc_hiz(intel, mt, num_samples);
+ ok = intel_miptree_alloc_hiz(intel, mt);
if (!ok)
goto fail;
}
@@ -1066,8 +1066,7 @@ intel_miptree_slice_enable_hiz(struct intel_context *intel,
bool
intel_miptree_alloc_hiz(struct intel_context *intel,
- struct intel_mipmap_tree *mt,
- GLuint num_samples)
+ struct intel_mipmap_tree *mt)
{
assert(mt->hiz_mt == NULL);
mt->hiz_mt = intel_miptree_create(intel,
@@ -1079,7 +1078,7 @@ intel_miptree_alloc_hiz(struct intel_context *intel,
mt->logical_height0,
mt->logical_depth0,
true,
- num_samples,
+ mt->num_samples,
false /* force_y_tiling */);
if (!mt->hiz_mt)
diff --git a/src/mesa/drivers/dri/intel/intel_mipmap_tree.h b/src/mesa/drivers/dri/intel/intel_mipmap_tree.h
index 29cd09d9194..b7376e03055 100644
--- a/src/mesa/drivers/dri/intel/intel_mipmap_tree.h
+++ b/src/mesa/drivers/dri/intel/intel_mipmap_tree.h
@@ -540,8 +540,7 @@ intel_miptree_alloc_mcs(struct intel_context *intel,
bool
intel_miptree_alloc_hiz(struct intel_context *intel,
- struct intel_mipmap_tree *mt,
- GLuint num_samples);
+ struct intel_mipmap_tree *mt);
bool
intel_miptree_slice_has_hiz(struct intel_mipmap_tree *mt,