summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2017-12-05 11:09:13 -0800
committerKenneth Graunke <[email protected]>2017-12-06 20:30:24 -0800
commitd6d16c02180929278dc49d3c9bdceece0aab189e (patch)
tree4fd6df63b23fce6b83f9c053e04668a7ecc197cb
parent9d53ccccb251d21f9291abaa3a28a41d06ce8c91 (diff)
meta: Initialize depth/clear values on declaration.
This helps avoid compiler warningss in the next commit - everything was initialized, but it wasn't obvious to static analysis. Suggested-by: Tapani Pälli <[email protected]>
-rw-r--r--src/mesa/drivers/common/meta.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c
index 1cc736cff1c..85ac7a1fed6 100644
--- a/src/mesa/drivers/common/meta.c
+++ b/src/mesa/drivers/common/meta.c
@@ -3487,8 +3487,8 @@ cleartexsubimage_depth_stencil(struct gl_context *ctx,
const GLvoid *clearValue,
GLint zoffset)
{
- GLint stencilValue;
- GLfloat depthValue;
+ GLint stencilValue = 0;
+ GLfloat depthValue = 0.0f;
GLenum status;
_mesa_meta_framebuffer_texture_image(ctx, ctx->DrawBuffer,
@@ -3519,9 +3519,6 @@ cleartexsubimage_depth_stencil(struct gl_context *ctx,
*/
memcpy(&depthValue, depthStencilValue, sizeof depthValue);
stencilValue = depthStencilValue[1] & 0xff;
- } else {
- depthValue = 0.0f;
- stencilValue = 0;
}
if (texImage->_BaseFormat == GL_DEPTH_STENCIL)