aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/program
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2020-02-26 17:21:43 -0500
committerMarek Olšák <[email protected]>2020-02-27 22:53:12 -0500
commitad192385e3348b12d15f466225c2792adf42e7e7 (patch)
tree70f0cdb279634e190cc09b331edff86ff3918b90 /src/mesa/program
parent6d7b076166e6a26f68c33ea75b9f9473fc162738 (diff)
mesa: fix 11 warnings
Reviewed-by: Eric Anholt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3970>
Diffstat (limited to 'src/mesa/program')
-rw-r--r--src/mesa/program/ir_to_mesa.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp
index 2bf01098db9..4cd9abb9ce3 100644
--- a/src/mesa/program/ir_to_mesa.cpp
+++ b/src/mesa/program/ir_to_mesa.cpp
@@ -1367,7 +1367,7 @@ ir_to_mesa_visitor::visit(ir_swizzle *ir)
{
src_reg src;
int i;
- int swizzle[4];
+ int swizzle[4] = {0};
/* Note that this is only swizzles in expressions, not those on the left
* hand side of an assignment, which do write masking. See ir_assignment
@@ -2420,8 +2420,8 @@ add_uniform_to_shader::visit_field(const glsl_type *type, const char *name,
* This avoids relying on names to match parameters and uniform
* storages later when associating uniform storage.
*/
- unsigned location;
- const bool found =
+ unsigned location = -1;
+ ASSERTED const bool found =
shader_program->UniformHash->get(location, params->Parameters[index].Name);
assert(found);