diff options
author | Kenneth Graunke <[email protected]> | 2011-09-23 22:42:18 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2011-09-23 22:42:18 -0700 |
commit | d7cdbc3c5415d2dd5eee58834b13714a89eacf2b (patch) | |
tree | 490dfbef3e2544e2d46198a019369cd0d790e843 /src | |
parent | 0d949a51bb44da51cd843abcf6ecddc5e3d3a2f1 (diff) |
intel: Remove pointless boolean return value from *_miptree_layout.
i915_miptree_layout, i945_miptree_layout, and brw_miptree_layout always
just return GL_TRUE, so there's really no point to it. Change them to
void functions and remove the (dead) error checking code.
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Yuanhan Liu <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/i915/i915_tex_layout.c | 8 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_tex_layout.c | 6 | ||||
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_mipmap_tree.c | 13 | ||||
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_mipmap_tree.h | 8 |
4 files changed, 11 insertions, 24 deletions
diff --git a/src/mesa/drivers/dri/i915/i915_tex_layout.c b/src/mesa/drivers/dri/i915/i915_tex_layout.c index 45ca38e75d5..a86384bbcfd 100644 --- a/src/mesa/drivers/dri/i915/i915_tex_layout.c +++ b/src/mesa/drivers/dri/i915/i915_tex_layout.c @@ -224,7 +224,7 @@ i915_miptree_layout_2d(struct intel_mipmap_tree * mt) } } -GLboolean +void i915_miptree_layout(struct intel_mipmap_tree * mt) { switch (mt->target) { @@ -246,8 +246,6 @@ i915_miptree_layout(struct intel_mipmap_tree * mt) DBG("%s: %dx%dx%d\n", __FUNCTION__, mt->total_width, mt->total_height, mt->cpp); - - return GL_TRUE; } @@ -455,7 +453,7 @@ i945_miptree_layout_3d(struct intel_mipmap_tree * mt) } } -GLboolean +void i945_miptree_layout(struct intel_mipmap_tree * mt) { switch (mt->target) { @@ -480,6 +478,4 @@ i945_miptree_layout(struct intel_mipmap_tree * mt) DBG("%s: %dx%dx%d\n", __FUNCTION__, mt->total_width, mt->total_height, mt->cpp); - - return GL_TRUE; } diff --git a/src/mesa/drivers/dri/i965/brw_tex_layout.c b/src/mesa/drivers/dri/i965/brw_tex_layout.c index 16ce8f68b81..83690ef9b7b 100644 --- a/src/mesa/drivers/dri/i965/brw_tex_layout.c +++ b/src/mesa/drivers/dri/i965/brw_tex_layout.c @@ -39,8 +39,8 @@ #define FILE_DEBUG_FLAG DEBUG_MIPTREE -GLboolean brw_miptree_layout(struct intel_context *intel, - struct intel_mipmap_tree *mt) +void +brw_miptree_layout(struct intel_context *intel, struct intel_mipmap_tree *mt) { /* XXX: these vary depending on image format: */ /* GLint align_w = 4; */ @@ -166,7 +166,5 @@ GLboolean brw_miptree_layout(struct intel_context *intel, } DBG("%s: %dx%dx%d\n", __FUNCTION__, mt->total_width, mt->total_height, mt->cpp); - - return GL_TRUE; } diff --git a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c index 18427b5c8ea..df9e45981a9 100644 --- a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c +++ b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c @@ -63,7 +63,6 @@ intel_miptree_create_internal(struct intel_context *intel, GLuint height0, GLuint depth0) { - GLboolean ok; struct intel_mipmap_tree *mt = calloc(sizeof(*mt), 1); int compress_byte = 0; @@ -89,19 +88,13 @@ intel_miptree_create_internal(struct intel_context *intel, #ifdef I915 (void) intel; if (intel->is_945) - ok = i945_miptree_layout(mt); + i945_miptree_layout(mt); else - ok = i915_miptree_layout(mt); + i915_miptree_layout(mt); #else - ok = brw_miptree_layout(intel, mt); + brw_miptree_layout(intel, mt); #endif - if (!ok) { - free(mt); - DBG("%s not okay - returning NULL\n", __FUNCTION__); - return NULL; - } - return mt; } diff --git a/src/mesa/drivers/dri/intel/intel_mipmap_tree.h b/src/mesa/drivers/dri/intel/intel_mipmap_tree.h index 7f20319581f..0ecb469c060 100644 --- a/src/mesa/drivers/dri/intel/intel_mipmap_tree.h +++ b/src/mesa/drivers/dri/intel/intel_mipmap_tree.h @@ -211,9 +211,9 @@ void intel_miptree_image_copy(struct intel_context *intel, /* i915_mipmap_tree.c: */ -GLboolean i915_miptree_layout(struct intel_mipmap_tree *mt); -GLboolean i945_miptree_layout(struct intel_mipmap_tree *mt); -GLboolean brw_miptree_layout(struct intel_context *intel, - struct intel_mipmap_tree *mt); +void i915_miptree_layout(struct intel_mipmap_tree *mt); +void i945_miptree_layout(struct intel_mipmap_tree *mt); +void brw_miptree_layout(struct intel_context *intel, + struct intel_mipmap_tree *mt); #endif |