aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/program
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2014-09-21 18:11:28 +0200
committermarha <marha@users.sourceforge.net>2014-09-21 18:11:28 +0200
commit438af0c7d4bf60b408b259c88205ff2193195466 (patch)
tree46fd6465cb7431f64a3cb475a40587a261983af4 /mesalib/src/mesa/program
parentd0f70707dde032e662dbd5bc70df6ac915403abe (diff)
downloadvcxsrv-438af0c7d4bf60b408b259c88205ff2193195466.tar.gz
vcxsrv-438af0c7d4bf60b408b259c88205ff2193195466.tar.bz2
vcxsrv-438af0c7d4bf60b408b259c88205ff2193195466.zip
libxtrans xkeyboard-config xserver mesa plink glproto git update 21 Sep 2014
plink revision 10233 xserver commit 28337cb14e4347e1dd7936c5393a22e042866687 xkeyboard-config commit 48e1c0b351b6711edc0f167cbb81e4424b75291a glproto commit bd3d751e1eb17efb39f65093271bb4ac071aa9e0 libxtrans commit fb7f198c88e97d22c8c89e76e9cd06b2b2720a96 mesa commit 4eb2bbefd2bf0359aff7ebbb8e931a1c7833606f
Diffstat (limited to 'mesalib/src/mesa/program')
-rw-r--r--mesalib/src/mesa/program/ir_to_mesa.cpp7
-rw-r--r--mesalib/src/mesa/program/prog_optimize.c9
-rw-r--r--mesalib/src/mesa/program/register_allocate.c1
-rw-r--r--mesalib/src/mesa/program/register_allocate.h5
4 files changed, 10 insertions, 12 deletions
diff --git a/mesalib/src/mesa/program/ir_to_mesa.cpp b/mesalib/src/mesa/program/ir_to_mesa.cpp
index 49e4a7a40..293fe34b9 100644
--- a/mesalib/src/mesa/program/ir_to_mesa.cpp
+++ b/mesalib/src/mesa/program/ir_to_mesa.cpp
@@ -2505,12 +2505,7 @@ _mesa_associate_uniform_storage(struct gl_context *ctx,
columns = storage->type->matrix_columns;
break;
case GLSL_TYPE_BOOL:
- if (ctx->Const.NativeIntegers) {
- format = (ctx->Const.UniformBooleanTrue == 1)
- ? uniform_bool_int_0_1 : uniform_bool_int_0_not0;
- } else {
- format = uniform_bool_float;
- }
+ format = uniform_native;
columns = 1;
break;
case GLSL_TYPE_SAMPLER:
diff --git a/mesalib/src/mesa/program/prog_optimize.c b/mesalib/src/mesa/program/prog_optimize.c
index 08c1c3046..60530ebf0 100644
--- a/mesalib/src/mesa/program/prog_optimize.c
+++ b/mesalib/src/mesa/program/prog_optimize.c
@@ -114,7 +114,6 @@ get_src_arg_mask(const struct prog_instruction *inst,
read_mask = 0x0;
for (comp = 0; comp < 4; ++comp) {
const GLuint coord = GET_SWZ(inst->SrcReg[arg].Swizzle, comp);
- ASSERT(coord < 4);
if (channel_mask & (1 << comp) && coord <= SWIZZLE_W)
read_mask |= 1 << coord;
}
@@ -284,11 +283,11 @@ _mesa_remove_dead_code_global(struct gl_program *prog)
for (comp = 0; comp < 4; comp++) {
const GLuint swz = GET_SWZ(inst->SrcReg[j].Swizzle, comp);
- ASSERT(swz < 4);
- if ((read_mask & (1 << swz)) == 0)
- continue;
- if (swz <= SWIZZLE_W)
+ if (swz <= SWIZZLE_W) {
+ if ((read_mask & (1 << swz)) == 0)
+ continue;
tempRead[index][swz] = GL_TRUE;
+ }
}
}
}
diff --git a/mesalib/src/mesa/program/register_allocate.c b/mesalib/src/mesa/program/register_allocate.c
index db2be5dfa..7faf67215 100644
--- a/mesalib/src/mesa/program/register_allocate.c
+++ b/mesalib/src/mesa/program/register_allocate.c
@@ -434,6 +434,7 @@ decrement_q(struct ra_graph *g, unsigned int n)
unsigned int n2_class = g->nodes[n2].class;
if (n != n2 && !g->nodes[n2].in_stack) {
+ assert(g->nodes[n2].q_total >= g->regs->classes[n2_class]->q[n_class]);
g->nodes[n2].q_total -= g->regs->classes[n2_class]->q[n_class];
}
}
diff --git a/mesalib/src/mesa/program/register_allocate.h b/mesalib/src/mesa/program/register_allocate.h
index bfc9190dc..dc6874495 100644
--- a/mesalib/src/mesa/program/register_allocate.h
+++ b/mesalib/src/mesa/program/register_allocate.h
@@ -56,7 +56,10 @@ void ra_set_finalize(struct ra_regs *regs, unsigned int **conflicts);
* Each interference graph node is a virtual variable in the IL. It
* is up to the user to ra_set_node_class() for the virtual variable,
* and compute live ranges and ra_node_interfere() between conflicting
- * live ranges.
+ * live ranges. Note that an interference *must not* be added between
+ * two nodes if their classes haven't been assigned yet. The user
+ * should set the class of each node before building the interference
+ * graph.
*/
struct ra_graph *ra_alloc_interference_graph(struct ra_regs *regs,
unsigned int count);