Compare commits
19 Commits
mesa-7.11-
...
mesa-7.11-
Author | SHA1 | Date | |
---|---|---|---|
|
7e1d9b3dfc | ||
|
929b3cc9b5 | ||
|
7e4e5b0b75 | ||
|
ba7db857c2 | ||
|
35bc35a70c | ||
|
dd3bb73153 | ||
|
0167c85562 | ||
|
8ea7989f18 | ||
|
317389f601 | ||
|
01a94f72e9 | ||
|
c97a20f3ef | ||
|
716bcfd24d | ||
|
a75aaaaa09 | ||
|
3d0bb72795 | ||
|
e4b60bf38c | ||
|
47fc05cf46 | ||
|
45769e5d80 | ||
|
928137b099 | ||
|
26adbcaeb5 |
6
Makefile
6
Makefile
@@ -183,7 +183,7 @@ ultrix-gcc:
|
||||
|
||||
# Rules for making release tarballs
|
||||
|
||||
VERSION=7.11-rc2
|
||||
VERSION=7.11-rc3
|
||||
DIRECTORY = Mesa-$(VERSION)
|
||||
LIB_NAME = MesaLib-$(VERSION)
|
||||
GLUT_NAME = MesaGLUT-$(VERSION)
|
||||
@@ -481,13 +481,13 @@ rm_config: parsers
|
||||
rm -f configs/autoconf
|
||||
|
||||
$(LIB_NAME).tar: rm_config
|
||||
cd .. ; tar -cf $(DIRECTORY)/$(LIB_NAME).tar $(LIB_FILES)
|
||||
cd .. ; tar --dereference -cf $(DIRECTORY)/$(LIB_NAME).tar $(LIB_FILES)
|
||||
|
||||
$(LIB_NAME).tar.gz: $(LIB_NAME).tar
|
||||
gzip --stdout --best $(LIB_NAME).tar > $(LIB_NAME).tar.gz
|
||||
|
||||
$(GLUT_NAME).tar:
|
||||
cd .. ; tar -cf $(DIRECTORY)/$(GLUT_NAME).tar $(GLUT_FILES)
|
||||
cd .. ; tar --dereference -cf $(DIRECTORY)/$(GLUT_NAME).tar $(GLUT_FILES)
|
||||
|
||||
$(GLUT_NAME).tar.gz: $(GLUT_NAME).tar
|
||||
gzip --stdout --best $(GLUT_NAME).tar > $(GLUT_NAME).tar.gz
|
||||
|
@@ -29,6 +29,21 @@
|
||||
*
|
||||
* Pre-DX10 GPUs often don't have a native way to do this operation,
|
||||
* and this works around that.
|
||||
*
|
||||
* The lowering process proceeds as follows. Each non-constant index
|
||||
* found in an r-value is converted to a canonical form \c array[i]. Each
|
||||
* element of the array is conditionally assigned to a temporary by comparing
|
||||
* \c i to a constant index. This is done by cloning the canonical form and
|
||||
* replacing all occurances of \c i with a constant. Each remaining occurance
|
||||
* of the canonical form in the IR is replaced with a dereference of the
|
||||
* temporary variable.
|
||||
*
|
||||
* L-values with non-constant indices are handled similarly. In this case,
|
||||
* the RHS of the assignment is assigned to a temporary. The non-constant
|
||||
* index is replace with the canonical form (just like for r-values). The
|
||||
* temporary is conditionally assigned to each element of the canonical form
|
||||
* by comparing \c i with each index. The same clone-and-replace scheme is
|
||||
* used.
|
||||
*/
|
||||
|
||||
#include "ir.h"
|
||||
@@ -37,10 +52,76 @@
|
||||
#include "glsl_types.h"
|
||||
#include "main/macros.h"
|
||||
|
||||
static inline bool
|
||||
is_array_or_matrix(const ir_instruction *ir)
|
||||
{
|
||||
return (ir->type->is_array() || ir->type->is_matrix());
|
||||
}
|
||||
|
||||
/**
|
||||
* Replace a dereference of a variable with a specified r-value
|
||||
*
|
||||
* Each time a dereference of the specified value is replaced, the r-value
|
||||
* tree is cloned.
|
||||
*/
|
||||
class deref_replacer : public ir_rvalue_visitor {
|
||||
public:
|
||||
deref_replacer(const ir_variable *variable_to_replace, ir_rvalue *value)
|
||||
: variable_to_replace(variable_to_replace), value(value),
|
||||
progress(false)
|
||||
{
|
||||
assert(this->variable_to_replace != NULL);
|
||||
assert(this->value != NULL);
|
||||
}
|
||||
|
||||
virtual void handle_rvalue(ir_rvalue **rvalue)
|
||||
{
|
||||
ir_dereference_variable *const dv = (*rvalue)->as_dereference_variable();
|
||||
|
||||
if ((dv != NULL) && (dv->var == this->variable_to_replace)) {
|
||||
this->progress = true;
|
||||
*rvalue = this->value->clone(ralloc_parent(*rvalue), NULL);
|
||||
}
|
||||
}
|
||||
|
||||
const ir_variable *variable_to_replace;
|
||||
ir_rvalue *value;
|
||||
bool progress;
|
||||
};
|
||||
|
||||
/**
|
||||
* Find a variable index dereference of an array in an rvalue tree
|
||||
*/
|
||||
class find_variable_index : public ir_hierarchical_visitor {
|
||||
public:
|
||||
find_variable_index()
|
||||
: deref(NULL)
|
||||
{
|
||||
/* empty */
|
||||
}
|
||||
|
||||
virtual ir_visitor_status visit_enter(ir_dereference_array *ir)
|
||||
{
|
||||
if (is_array_or_matrix(ir->array)
|
||||
&& (ir->array_index->as_constant() == NULL)) {
|
||||
this->deref = ir;
|
||||
return visit_stop;
|
||||
}
|
||||
|
||||
return visit_continue;
|
||||
}
|
||||
|
||||
/**
|
||||
* First array dereference found in the tree that has a non-constant index.
|
||||
*/
|
||||
ir_dereference_array *deref;
|
||||
};
|
||||
|
||||
struct assignment_generator
|
||||
{
|
||||
ir_instruction* base_ir;
|
||||
ir_rvalue* array;
|
||||
ir_dereference *rvalue;
|
||||
ir_variable *old_index;
|
||||
bool is_write;
|
||||
unsigned int write_mask;
|
||||
ir_variable* var;
|
||||
@@ -55,18 +136,23 @@ struct assignment_generator
|
||||
* underlying variable.
|
||||
*/
|
||||
void *mem_ctx = ralloc_parent(base_ir);
|
||||
ir_dereference *element =
|
||||
new(mem_ctx) ir_dereference_array(this->array->clone(mem_ctx, NULL),
|
||||
new(mem_ctx) ir_constant(i));
|
||||
ir_rvalue *variable = new(mem_ctx) ir_dereference_variable(this->var);
|
||||
|
||||
ir_assignment *assignment;
|
||||
if (is_write) {
|
||||
assignment = new(mem_ctx) ir_assignment(element, variable, condition,
|
||||
write_mask);
|
||||
} else {
|
||||
assignment = new(mem_ctx) ir_assignment(variable, element, condition);
|
||||
}
|
||||
/* Clone the old r-value in its entirety. Then replace any occurances of
|
||||
* the old variable index with the new constant index.
|
||||
*/
|
||||
ir_dereference *element = this->rvalue->clone(mem_ctx, NULL);
|
||||
ir_constant *const index = new(mem_ctx) ir_constant(i);
|
||||
deref_replacer r(this->old_index, index);
|
||||
element->accept(&r);
|
||||
assert(r.progress);
|
||||
|
||||
/* Generate a conditional assignment to (or from) the constant indexed
|
||||
* array dereference.
|
||||
*/
|
||||
ir_rvalue *variable = new(mem_ctx) ir_dereference_variable(this->var);
|
||||
ir_assignment *const assignment = (is_write)
|
||||
? new(mem_ctx) ir_assignment(element, variable, condition, write_mask)
|
||||
: new(mem_ctx) ir_assignment(variable, element, condition);
|
||||
|
||||
list->push_tail(assignment);
|
||||
}
|
||||
@@ -233,21 +319,18 @@ public:
|
||||
bool lower_temps;
|
||||
bool lower_uniforms;
|
||||
|
||||
bool is_array_or_matrix(const ir_instruction *ir) const
|
||||
bool storage_type_needs_lowering(ir_dereference_array *deref) const
|
||||
{
|
||||
return (ir->type->is_array() || ir->type->is_matrix());
|
||||
}
|
||||
|
||||
bool needs_lowering(ir_dereference_array *deref) const
|
||||
{
|
||||
if (deref == NULL || deref->array_index->as_constant()
|
||||
|| !is_array_or_matrix(deref->array))
|
||||
return false;
|
||||
|
||||
if (deref->array->ir_type == ir_type_constant)
|
||||
/* If a variable isn't eventually the target of this dereference, then
|
||||
* it must be a constant or some sort of anonymous temporary storage.
|
||||
*
|
||||
* FINISHME: Is this correct? Most drivers treat arrays of constants as
|
||||
* FINISHME: uniforms. It seems like this should do the same.
|
||||
*/
|
||||
const ir_variable *const var = deref->array->variable_referenced();
|
||||
if (var == NULL)
|
||||
return this->lower_temps;
|
||||
|
||||
const ir_variable *const var = deref->array->variable_referenced();
|
||||
switch (var->mode) {
|
||||
case ir_var_auto:
|
||||
case ir_var_temporary:
|
||||
@@ -267,8 +350,18 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
bool needs_lowering(ir_dereference_array *deref) const
|
||||
{
|
||||
if (deref == NULL || deref->array_index->as_constant()
|
||||
|| !is_array_or_matrix(deref->array))
|
||||
return false;
|
||||
|
||||
return this->storage_type_needs_lowering(deref);
|
||||
}
|
||||
|
||||
ir_variable *convert_dereference_array(ir_dereference_array *orig_deref,
|
||||
ir_assignment* orig_assign)
|
||||
ir_assignment* orig_assign,
|
||||
ir_dereference *orig_base)
|
||||
{
|
||||
assert(is_array_or_matrix(orig_deref->array));
|
||||
|
||||
@@ -314,9 +407,12 @@ public:
|
||||
new(mem_ctx) ir_assignment(lhs, orig_deref->array_index, NULL);
|
||||
base_ir->insert_before(assign);
|
||||
|
||||
orig_deref->array_index = lhs->clone(mem_ctx, NULL);
|
||||
|
||||
assignment_generator ag;
|
||||
ag.array = orig_deref->array;
|
||||
ag.rvalue = orig_base;
|
||||
ag.base_ir = base_ir;
|
||||
ag.old_index = index;
|
||||
ag.var = var;
|
||||
if (orig_assign) {
|
||||
ag.is_write = true;
|
||||
@@ -327,21 +423,40 @@ public:
|
||||
|
||||
switch_generator sg(ag, index, 4, 4);
|
||||
|
||||
exec_list list;
|
||||
sg.generate(0, length, &list);
|
||||
base_ir->insert_before(&list);
|
||||
/* If the original assignment has a condition, respect that original
|
||||
* condition! This is acomplished by wrapping the new conditional
|
||||
* assignments in an if-statement that uses the original condition.
|
||||
*/
|
||||
if ((orig_assign != NULL) && (orig_assign->condition != NULL)) {
|
||||
/* No need to clone the condition because the IR that it hangs on is
|
||||
* going to be removed from the instruction sequence.
|
||||
*/
|
||||
ir_if *if_stmt = new(mem_ctx) ir_if(orig_assign->condition);
|
||||
|
||||
sg.generate(0, length, &if_stmt->then_instructions);
|
||||
base_ir->insert_before(if_stmt);
|
||||
} else {
|
||||
exec_list list;
|
||||
|
||||
sg.generate(0, length, &list);
|
||||
base_ir->insert_before(&list);
|
||||
}
|
||||
|
||||
return var;
|
||||
}
|
||||
|
||||
virtual void handle_rvalue(ir_rvalue **pir)
|
||||
{
|
||||
if (this->in_assignee)
|
||||
return;
|
||||
|
||||
if (!*pir)
|
||||
return;
|
||||
|
||||
ir_dereference_array* orig_deref = (*pir)->as_dereference_array();
|
||||
if (needs_lowering(orig_deref)) {
|
||||
ir_variable* var = convert_dereference_array(orig_deref, 0);
|
||||
ir_variable *var =
|
||||
convert_dereference_array(orig_deref, NULL, orig_deref);
|
||||
assert(var);
|
||||
*pir = new(ralloc_parent(base_ir)) ir_dereference_variable(var);
|
||||
this->progress = true;
|
||||
@@ -353,10 +468,11 @@ public:
|
||||
{
|
||||
ir_rvalue_visitor::visit_leave(ir);
|
||||
|
||||
ir_dereference_array *orig_deref = ir->lhs->as_dereference_array();
|
||||
find_variable_index f;
|
||||
ir->lhs->accept(&f);
|
||||
|
||||
if (needs_lowering(orig_deref)) {
|
||||
convert_dereference_array(orig_deref, ir);
|
||||
if ((f.deref != NULL) && storage_type_needs_lowering(f.deref)) {
|
||||
convert_dereference_array(f.deref, ir, ir->lhs);
|
||||
ir->remove();
|
||||
this->progress = true;
|
||||
}
|
||||
@@ -377,7 +493,17 @@ lower_variable_index_to_cond_assign(exec_list *instructions,
|
||||
lower_temp,
|
||||
lower_uniform);
|
||||
|
||||
visit_list_elements(&v, instructions);
|
||||
/* Continue lowering until no progress is made. If there are multiple
|
||||
* levels of indirection (e.g., non-constant indexing of array elements and
|
||||
* matrix columns of an array of matrix), each pass will only lower one
|
||||
* level of indirection.
|
||||
*/
|
||||
bool progress_ever = false;
|
||||
do {
|
||||
v.progress = false;
|
||||
visit_list_elements(&v, instructions);
|
||||
progress_ever = v.progress || progress_ever;
|
||||
} while (v.progress);
|
||||
|
||||
return v.progress;
|
||||
return progress_ever;
|
||||
}
|
||||
|
@@ -171,21 +171,23 @@ ir_vec_index_to_cond_assign_visitor::visit_leave(ir_assignment *ir)
|
||||
|
||||
assert(orig_deref->array_index->type->base_type == GLSL_TYPE_INT);
|
||||
|
||||
exec_list list;
|
||||
|
||||
/* Store the index to a temporary to avoid reusing its tree. */
|
||||
index = new(ir) ir_variable(glsl_type::int_type, "vec_index_tmp_i",
|
||||
ir_var_temporary);
|
||||
ir->insert_before(index);
|
||||
list.push_tail(index);
|
||||
deref = new(ir) ir_dereference_variable(index);
|
||||
assign = new(ir) ir_assignment(deref, orig_deref->array_index, NULL);
|
||||
ir->insert_before(assign);
|
||||
list.push_tail(assign);
|
||||
|
||||
/* Store the RHS to a temporary to avoid reusing its tree. */
|
||||
var = new(ir) ir_variable(ir->rhs->type, "vec_index_tmp_v",
|
||||
ir_var_temporary);
|
||||
ir->insert_before(var);
|
||||
list.push_tail(var);
|
||||
deref = new(ir) ir_dereference_variable(var);
|
||||
assign = new(ir) ir_assignment(deref, ir->rhs, NULL);
|
||||
ir->insert_before(assign);
|
||||
list.push_tail(assign);
|
||||
|
||||
/* Generate a conditional move of each vector element to the temp. */
|
||||
for (i = 0; i < orig_deref->array->type->vector_elements; i++) {
|
||||
@@ -205,8 +207,25 @@ ir_vec_index_to_cond_assign_visitor::visit_leave(ir_assignment *ir)
|
||||
|
||||
deref = new(ir) ir_dereference_variable(var);
|
||||
assign = new(ir) ir_assignment(swizzle, deref, condition);
|
||||
ir->insert_before(assign);
|
||||
list.push_tail(assign);
|
||||
}
|
||||
|
||||
/* If the original assignment has a condition, respect that original
|
||||
* condition! This is acomplished by wrapping the new conditional
|
||||
* assignments in an if-statement that uses the original condition.
|
||||
*/
|
||||
if (ir->condition != NULL) {
|
||||
/* No need to clone the condition because the IR that it hangs on is
|
||||
* going to be removed from the instruction sequence.
|
||||
*/
|
||||
ir_if *if_stmt = new(mem_ctx) ir_if(ir->condition);
|
||||
|
||||
list.move_nodes_to(&if_stmt->then_instructions);
|
||||
ir->insert_before(if_stmt);
|
||||
} else {
|
||||
ir->insert_before(&list);
|
||||
}
|
||||
|
||||
ir->remove();
|
||||
|
||||
this->progress = true;
|
||||
|
@@ -59,7 +59,8 @@ fs_visitor::generate_fb_write(fs_inst *inst)
|
||||
|
||||
if (inst->target > 0) {
|
||||
/* Set the render target index for choosing BLEND_STATE. */
|
||||
brw_MOV(p, retype(brw_vec1_reg(BRW_MESSAGE_REGISTER_FILE, 0, 2),
|
||||
brw_MOV(p, retype(brw_vec1_reg(BRW_MESSAGE_REGISTER_FILE,
|
||||
inst->base_mrf, 2),
|
||||
BRW_REGISTER_TYPE_UD),
|
||||
brw_imm_ud(inst->target));
|
||||
}
|
||||
|
@@ -595,9 +595,11 @@ fs_visitor::emit_texture_gen4(ir_texture *ir, fs_reg dst, fs_reg coordinate,
|
||||
/* gen4's SIMD8 sampler always has the slots for u,v,r present. */
|
||||
mlen += 3;
|
||||
} else if (ir->op == ir_txd) {
|
||||
this->result = reg_undef;
|
||||
ir->lod_info.grad.dPdx->accept(this);
|
||||
fs_reg dPdx = this->result;
|
||||
|
||||
this->result = reg_undef;
|
||||
ir->lod_info.grad.dPdy->accept(this);
|
||||
fs_reg dPdy = this->result;
|
||||
|
||||
@@ -778,9 +780,11 @@ fs_visitor::emit_texture_gen5(ir_texture *ir, fs_reg dst, fs_reg coordinate,
|
||||
inst = emit(FS_OPCODE_TXL, dst);
|
||||
break;
|
||||
case ir_txd: {
|
||||
this->result = reg_undef;
|
||||
ir->lod_info.grad.dPdx->accept(this);
|
||||
fs_reg dPdx = this->result;
|
||||
|
||||
this->result = reg_undef;
|
||||
ir->lod_info.grad.dPdy->accept(this);
|
||||
fs_reg dPdy = this->result;
|
||||
|
||||
@@ -842,6 +846,7 @@ fs_visitor::emit_texture_gen7(ir_texture *ir, fs_reg dst, fs_reg coordinate,
|
||||
}
|
||||
|
||||
if (ir->shadow_comparitor && ir->op != ir_txd) {
|
||||
this->result = reg_undef;
|
||||
ir->shadow_comparitor->accept(this);
|
||||
emit(BRW_OPCODE_MOV, fs_reg(MRF, base_mrf + mlen), this->result);
|
||||
mlen += reg_width;
|
||||
@@ -852,11 +857,13 @@ fs_visitor::emit_texture_gen7(ir_texture *ir, fs_reg dst, fs_reg coordinate,
|
||||
case ir_tex:
|
||||
break;
|
||||
case ir_txb:
|
||||
this->result = reg_undef;
|
||||
ir->lod_info.bias->accept(this);
|
||||
emit(BRW_OPCODE_MOV, fs_reg(MRF, base_mrf + mlen), this->result);
|
||||
mlen += reg_width;
|
||||
break;
|
||||
case ir_txl:
|
||||
this->result = reg_undef;
|
||||
ir->lod_info.lod->accept(this);
|
||||
emit(BRW_OPCODE_MOV, fs_reg(MRF, base_mrf + mlen), this->result);
|
||||
mlen += reg_width;
|
||||
@@ -865,9 +872,11 @@ fs_visitor::emit_texture_gen7(ir_texture *ir, fs_reg dst, fs_reg coordinate,
|
||||
if (c->dispatch_width == 16)
|
||||
fail("Gen7 does not support sample_d/sample_d_c in SIMD16 mode.");
|
||||
|
||||
this->result = reg_undef;
|
||||
ir->lod_info.grad.dPdx->accept(this);
|
||||
fs_reg dPdx = this->result;
|
||||
|
||||
this->result = reg_undef;
|
||||
ir->lod_info.grad.dPdy->accept(this);
|
||||
fs_reg dPdy = this->result;
|
||||
|
||||
@@ -1062,6 +1071,7 @@ fs_visitor::visit(ir_texture *ir)
|
||||
if (hw_compare_supported) {
|
||||
inst->shadow_compare = true;
|
||||
} else {
|
||||
this->result = reg_undef;
|
||||
ir->shadow_comparitor->accept(this);
|
||||
fs_reg ref = this->result;
|
||||
|
||||
|
@@ -1821,6 +1821,9 @@ accumulator_contains(struct brw_vs_compile *c, struct brw_reg val)
|
||||
if (val.address_mode != BRW_ADDRESS_DIRECT)
|
||||
return GL_FALSE;
|
||||
|
||||
if (val.negate || val.abs)
|
||||
return GL_FALSE;
|
||||
|
||||
switch (prev_insn->header.opcode) {
|
||||
case BRW_OPCODE_MOV:
|
||||
case BRW_OPCODE_MAC:
|
||||
@@ -1980,9 +1983,22 @@ void brw_vs_emit(struct brw_vs_compile *c )
|
||||
const struct prog_src_register *src = &inst->SrcReg[i];
|
||||
index = src->Index;
|
||||
file = src->File;
|
||||
if (file == PROGRAM_OUTPUT && c->output_regs[index].used_in_src)
|
||||
args[i] = c->output_regs[index].reg;
|
||||
else
|
||||
if (file == PROGRAM_OUTPUT && c->output_regs[index].used_in_src) {
|
||||
/* Can't just make get_arg "do the right thing" here because
|
||||
* other callers of get_arg and get_src_reg don't expect any
|
||||
* special behavior for the c->output_regs[index].used_in_src
|
||||
* case.
|
||||
*/
|
||||
args[i] = c->output_regs[index].reg;
|
||||
args[i].dw1.bits.swizzle =
|
||||
BRW_SWIZZLE4(GET_SWZ(src->Swizzle, 0),
|
||||
GET_SWZ(src->Swizzle, 1),
|
||||
GET_SWZ(src->Swizzle, 2),
|
||||
GET_SWZ(src->Swizzle, 3));
|
||||
|
||||
/* Note this is ok for non-swizzle ARB_vp instructions */
|
||||
args[i].negate = src->Negate ? 1 : 0;
|
||||
} else
|
||||
args[i] = get_arg(c, inst, i);
|
||||
}
|
||||
|
||||
@@ -1993,7 +2009,11 @@ void brw_vs_emit(struct brw_vs_compile *c )
|
||||
index = inst->DstReg.Index;
|
||||
file = inst->DstReg.File;
|
||||
if (file == PROGRAM_OUTPUT && c->output_regs[index].used_in_src)
|
||||
dst = c->output_regs[index].reg;
|
||||
/* Can't just make get_dst "do the right thing" here because other
|
||||
* callers of get_dst don't expect any special behavior for the
|
||||
* c->output_regs[index].used_in_src case.
|
||||
*/
|
||||
dst = brw_writemask(c->output_regs[index].reg, inst->DstReg.WriteMask);
|
||||
else
|
||||
dst = get_dst(c, inst->DstReg);
|
||||
|
||||
|
@@ -211,6 +211,7 @@ static void brw_new_batch( struct intel_context *intel )
|
||||
intel->batch.need_workaround_flush = true;
|
||||
|
||||
brw->vb.nr_current_buffers = 0;
|
||||
brw->ib.type = -1;
|
||||
|
||||
/* Mark that the current program cache BO has been used by the GPU.
|
||||
* It will be reallocated if we need to put new programs in for the
|
||||
|
@@ -1094,9 +1094,16 @@ void emit_tex(struct brw_wm_compile *c,
|
||||
if (intel->gen < 5 && c->dispatch_width == 8)
|
||||
nr_texcoords = 3;
|
||||
|
||||
/* For shadow comparisons, we have to supply u,v,r. */
|
||||
if (shadow)
|
||||
nr_texcoords = 3;
|
||||
if (shadow) {
|
||||
if (intel->gen < 7) {
|
||||
/* For shadow comparisons, we have to supply u,v,r. */
|
||||
nr_texcoords = 3;
|
||||
} else {
|
||||
/* On Ivybridge, the shadow comparitor comes first. Just load it. */
|
||||
brw_MOV(p, brw_message_reg(cur_mrf), arg[2]);
|
||||
cur_mrf += mrf_per_channel;
|
||||
}
|
||||
}
|
||||
|
||||
/* Emit the texcoords. */
|
||||
for (i = 0; i < nr_texcoords; i++) {
|
||||
@@ -1113,7 +1120,7 @@ void emit_tex(struct brw_wm_compile *c,
|
||||
}
|
||||
|
||||
/* Fill in the shadow comparison reference value. */
|
||||
if (shadow) {
|
||||
if (shadow && intel->gen < 7) {
|
||||
if (intel->gen >= 5) {
|
||||
/* Fill in the cube map array index value. */
|
||||
brw_MOV(p, brw_message_reg(cur_mrf), brw_imm_f(0));
|
||||
|
@@ -388,6 +388,7 @@ intel_batchbuffer_emit_mi_flush(struct intel_context *intel)
|
||||
OUT_BATCH(PIPE_CONTROL_INSTRUCTION_FLUSH |
|
||||
PIPE_CONTROL_WRITE_FLUSH |
|
||||
PIPE_CONTROL_DEPTH_CACHE_FLUSH |
|
||||
PIPE_CONTROL_TC_FLUSH |
|
||||
PIPE_CONTROL_NO_WRITE);
|
||||
OUT_BATCH(0); /* write address */
|
||||
OUT_BATCH(0); /* write data */
|
||||
|
@@ -35,7 +35,7 @@ struct gl_context;
|
||||
#define MESA_MAJOR 7
|
||||
#define MESA_MINOR 11
|
||||
#define MESA_PATCH 0
|
||||
#define MESA_VERSION_STRING "7.11-rc2"
|
||||
#define MESA_VERSION_STRING "7.11-rc3"
|
||||
|
||||
/* To make version comparison easy */
|
||||
#define MESA_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
|
||||
|
@@ -134,7 +134,7 @@ src_reg::src_reg(dst_reg reg)
|
||||
this->index = reg.index;
|
||||
this->swizzle = SWIZZLE_XYZW;
|
||||
this->negate = 0;
|
||||
this->reladdr = NULL;
|
||||
this->reladdr = reg.reladdr;
|
||||
}
|
||||
|
||||
dst_reg::dst_reg(src_reg reg)
|
||||
@@ -1494,6 +1494,18 @@ ir_to_mesa_visitor::visit(ir_dereference_array *ir)
|
||||
this->result, src_reg_for_float(element_size));
|
||||
}
|
||||
|
||||
/* If there was already a relative address register involved, add the
|
||||
* new and the old together to get the new offset.
|
||||
*/
|
||||
if (src.reladdr != NULL) {
|
||||
src_reg accum_reg = get_temp(glsl_type::float_type);
|
||||
|
||||
emit(ir, OPCODE_ADD, dst_reg(accum_reg),
|
||||
index_reg, *src.reladdr);
|
||||
|
||||
index_reg = accum_reg;
|
||||
}
|
||||
|
||||
src.reladdr = ralloc(mem_ctx, src_reg);
|
||||
memcpy(src.reladdr, &index_reg, sizeof(index_reg));
|
||||
}
|
||||
|
@@ -1319,6 +1319,15 @@ _mesa_simplify_cmp(struct gl_program * program)
|
||||
|
||||
inst->Opcode = OPCODE_MOV;
|
||||
inst->SrcReg[0] = inst->SrcReg[1];
|
||||
|
||||
/* Unused operands are expected to have the file set to
|
||||
* PROGRAM_UNDEFINED. This is how _mesa_init_instructions initializes
|
||||
* all of the sources.
|
||||
*/
|
||||
inst->SrcReg[1].File = PROGRAM_UNDEFINED;
|
||||
inst->SrcReg[1].Swizzle = SWIZZLE_NOOP;
|
||||
inst->SrcReg[2].File = PROGRAM_UNDEFINED;
|
||||
inst->SrcReg[2].Swizzle = SWIZZLE_NOOP;
|
||||
}
|
||||
}
|
||||
if (dbg) {
|
||||
|
Reference in New Issue
Block a user