mesa: Use correct functions for enum conversion.

Fixes mixing enum types defects reported by Coverity.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
nouveau: Bail out from nouveau_fence_wait if flushing the pushbuf fails.
nv50/ir: Clean up references to function values before destroying them.
nv50/ir/opt: Fix tryPropagateBranch for BBs with several exit branches.

Comments and "if (bf->cfg.incidentCount() == 1)" condition added
by Christoph Bumiller.
nv50/ir/ra: Fix argument const-ness in RegisterSet::idToUnits and idToBytes
nv50/ir/ra: Fix RegisterSet::occupy(const Value *v).
nv50/ir/ra: Fix traversal before the beginning of the active list in buildRIG.
nv50/ir/ra: Fix maxGPR calculation for programs with multiple functions.
nv50/ir/ra: swap copyCompound args if src is compound and dst isn't
nv50/ir/ra: fix confusion with conditional RegisterSet::occupy
nv50/ir/ra: also add pre-existing MERGE,SPLIT to constraint list
nv50/ir/ra: make sure all used function inputs get assigned a reg

A live range [0, 0) counts as empty. For function inputs this can
be a problem, so insert a nop at the beginning to make it [0, 1).
This is a bit of a hack but also the most simple solution.
nv50/ir/tgsi: Accept COMPUTE programs.
nv50/ir/tgsi: Translate grid-related system parameters.
nv50/ir: fix comparison of system values
nv50/ir: Rename "mkLoad" to "mkLoadv" for consistency.
nv50/ir: add various new OPs that will be needed for compute
nv50/ir/opt: make optimization aware of atomics, barriers, surface ops
nv50/ir: initialize CodeEmitters' specialized target fields
nvc0/ir/emit: implement surface related ops