Mesa (master): mesa/vbo: s/inline/INLINE/

2011-09-06 Thread Vinson Lee
Module: Mesa
Branch: master
Commit: 6edef25a4b41583e1c285653fc0b84a316e9743d
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=6edef25a4b41583e1c285653fc0b84a316e9743d

Author: Vinson Lee 
Date:   Tue Sep  6 21:43:51 2011 -0700

mesa/vbo: s/inline/INLINE/

MSVC does not support inline keyword.

---

 src/mesa/vbo/vbo_attrib_tmp.h |   12 ++--
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/mesa/vbo/vbo_attrib_tmp.h b/src/mesa/vbo/vbo_attrib_tmp.h
index d6448df..65717eb 100644
--- a/src/mesa/vbo/vbo_attrib_tmp.h
+++ b/src/mesa/vbo/vbo_attrib_tmp.h
@@ -59,12 +59,12 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 #define MAT_ATTR( A, N, V ) ATTR( A, N, (V)[0], (V)[1], (V)[2], (V)[3] )
 
-static inline float conv_ui10_to_norm_float(unsigned ui10)
+static INLINE float conv_ui10_to_norm_float(unsigned ui10)
 {
return (float)(ui10) / 1023.0;
 }
 
-static inline float conv_ui2_to_norm_float(unsigned ui2)
+static INLINE float conv_ui2_to_norm_float(unsigned ui2)
 {
return (float)(ui2) / 3.0;
 }
@@ -91,28 +91,28 @@ static inline float conv_ui2_to_norm_float(unsigned ui2)
 struct attr_bits_10 {signed int x:10;};
 struct attr_bits_2 {signed int x:2;};
 
-static inline float conv_i10_to_i(int i10)
+static INLINE float conv_i10_to_i(int i10)
 {
struct attr_bits_10 val;
val.x = i10;
return (float)val.x;
 }
 
-static inline float conv_i2_to_i(int i2)
+static INLINE float conv_i2_to_i(int i2)
 {
struct attr_bits_2 val;
val.x = i2;
return (float)val.x;
 }
 
-static inline float conv_i10_to_norm_float(int i10)
+static INLINE float conv_i10_to_norm_float(int i10)
 {
struct attr_bits_10 val;
val.x = i10;
return (2.0F * (float)val.x + 1.0F) * (1.0F  / 511.0F);
 }
 
-static inline float conv_i2_to_norm_float(int i2)
+static INLINE float conv_i2_to_norm_float(int i2)
 {
struct attr_bits_2 val;
val.x = i2;

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): i965/vs: Fix point size handling on gen4.

2011-09-06 Thread Eric Anholt
Module: Mesa
Branch: master
Commit: 9bd8d90646572a170bd96a72d2f8d5739df381be
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=9bd8d90646572a170bd96a72d2f8d5739df381be

Author: Eric Anholt 
Date:   Tue Aug 30 15:34:43 2011 -0700

i965/vs: Fix point size handling on gen4.

Fixes glsl-vs-point-size.

Reviewed-by: Kenneth Graunke 

---

 src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp |9 +
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp 
b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
index e0e3ce3..dac8cf9 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
@@ -1748,14 +1748,15 @@ vec4_visitor::emit_psiz_and_flags(struct brw_reg reg)
   emit(MOV(header1, 0u));
 
   if (c->prog_data.outputs_written & BITFIELD64_BIT(VERT_RESULT_PSIZ)) {
-assert(!"finishme: psiz");
-src_reg psiz;
+src_reg psiz = src_reg(output_reg[VERT_RESULT_PSIZ]);
 
+current_annotation = "Point size";
 header1.writemask = WRITEMASK_W;
-emit(MUL(header1, psiz, 1u << 11));
+emit(MUL(header1, psiz, src_reg((float)(1 << 11;
 emit(AND(header1, src_reg(header1), 0x7ff << 8));
   }
 
+  current_annotation = "Clipping flags";
   for (i = 0; i < c->key.nr_userclip; i++) {
 vec4_instruction *inst;
 
@@ -1792,7 +1793,7 @@ vec4_visitor::emit_psiz_and_flags(struct brw_reg reg)
   }
 
   header1.writemask = WRITEMASK_XYZW;
-  emit(MOV(reg, src_reg(header1)));
+  emit(MOV(retype(reg, BRW_REGISTER_TYPE_UD), src_reg(header1)));
} else if (intel->gen < 6) {
   emit(MOV(retype(reg, BRW_REGISTER_TYPE_UD), 0u));
} else {

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): i965/vs: Use write commits on scratch writes in pre-gen6.

2011-09-06 Thread Eric Anholt
Module: Mesa
Branch: master
Commit: 9367960ea64a087895caaadbd0353080c14b4bab
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=9367960ea64a087895caaadbd0353080c14b4bab

Author: Eric Anholt 
Date:   Tue Aug 30 17:56:33 2011 -0700

i965/vs: Use write commits on scratch writes in pre-gen6.

This is required to ensure ordering between reads and writes within a
thread.

Reviewed-by: Kenneth Graunke 

---

 src/mesa/drivers/dri/i965/brw_vec4_emit.cpp |   24 ++--
 1 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_vec4_emit.cpp 
b/src/mesa/drivers/dri/i965/brw_vec4_emit.cpp
index ac1ef0d..30bb0f6 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_emit.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_emit.cpp
@@ -431,6 +431,7 @@ vec4_visitor::generate_scratch_write(vec4_instruction *inst,
 struct brw_reg index)
 {
struct brw_reg header = brw_vec8_grf(0, 0);
+   bool write_commit;
 
/* If the instruction is predicated, we'll predicate the send, not
 * the header setup.
@@ -455,6 +456,25 @@ vec4_visitor::generate_scratch_write(vec4_instruction 
*inst,
 
brw_set_predicate_control(p, inst->predicate);
 
+   /* Pre-gen6, we have to specify write commits to ensure ordering
+* between reads and writes within a thread.  Afterwards, that's
+* guaranteed and write commits only matter for inter-thread
+* synchronization.
+*/
+   if (intel->gen >= 6) {
+  write_commit = false;
+   } else {
+  /* The visitor set up our destination register to be g0.  This
+   * means that when the next read comes along, we will end up
+   * reading from g0 and causing a block on the write commit.  For
+   * write-after-read, we are relying on the value of the previous
+   * read being used (and thus blocking on completion) before our
+   * write is executed.  This means we have to be careful in
+   * instruction scheduling to not violate this assumption.
+   */
+  write_commit = true;
+   }
+
/* Each of the 8 channel enables is considered for whether each
 * dword is written.
 */
@@ -470,9 +490,9 @@ vec4_visitor::generate_scratch_write(vec4_instruction *inst,
3, /* mlen */
true, /* header present */
false, /* pixel scoreboard */
-   0, /* rlen */
+   write_commit, /* rlen */
false, /* eot */
-   false /* commit */);
+   write_commit);
 }
 
 void

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): i965/vs: Fix setup of scratch space pointer on pre-gen6.

2011-09-06 Thread Eric Anholt
Module: Mesa
Branch: master
Commit: 838bfe0c46969c359be8f5d02e2b41bb7ff044e1
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=838bfe0c46969c359be8f5d02e2b41bb7ff044e1

Author: Eric Anholt 
Date:   Tue Aug 30 16:58:03 2011 -0700

i965/vs: Fix setup of scratch space pointer on pre-gen6.

We were failing to relocate, so on the first draw run our scratch
would tend to get written to 0x0.

Reviewed-by: Kenneth Graunke 

---

 src/mesa/drivers/dri/i965/brw_vs_state.c |   10 ++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_vs_state.c 
b/src/mesa/drivers/dri/i965/brw_vs_state.c
index 29b3e47..a01b614 100644
--- a/src/mesa/drivers/dri/i965/brw_vs_state.c
+++ b/src/mesa/drivers/dri/i965/brw_vs_state.c
@@ -157,6 +157,16 @@ brw_prepare_vs_unit(struct brw_context *brw)
 */
vs->vs6.vs_enable = 1;
 
+   /* Emit scratch space relocation */
+   if (brw->vs.prog_data->total_scratch != 0) {
+  drm_intel_bo_emit_reloc(intel->batch.bo,
+ brw->vs.state_offset +
+ offsetof(struct brw_vs_unit_state, thread2),
+ brw->vs.scratch_bo,
+ vs->thread2.per_thread_scratch_space,
+ I915_GEM_DOMAIN_RENDER, I915_GEM_DOMAIN_RENDER);
+   }
+
brw->state.dirty.cache |= CACHE_NEW_VS_UNIT;
 }
 

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): i965/vs: Fix message setup for array read/writes on pre-gen6 .

2011-09-06 Thread Eric Anholt
Module: Mesa
Branch: master
Commit: ddf8e602a774ecfd1b660e398dd9bf763d86a074
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=ddf8e602a774ecfd1b660e398dd9bf763d86a074

Author: Eric Anholt 
Date:   Tue Aug 30 16:47:43 2011 -0700

i965/vs: Fix message setup for array read/writes on pre-gen6.

We were passing an MRF as the source argument, instead of using the
implied move and putting the MRF number in the proper place in the
instruction encoding.

Reviewed-by: Kenneth Graunke 

---

 src/mesa/drivers/dri/i965/brw_vec4_emit.cpp |   32 +++---
 1 files changed, 14 insertions(+), 18 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_vec4_emit.cpp 
b/src/mesa/drivers/dri/i965/brw_vec4_emit.cpp
index 61a1092..ac1ef0d 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_emit.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_emit.cpp
@@ -391,14 +391,9 @@ vec4_visitor::generate_scratch_read(vec4_instruction *inst,
struct brw_reg dst,
struct brw_reg index)
 {
-   if (intel->gen >= 6) {
-  brw_push_insn_state(p);
-  brw_set_mask_control(p, BRW_MASK_DISABLE);
-  brw_MOV(p,
- retype(brw_message_reg(inst->base_mrf), BRW_REGISTER_TYPE_D),
- retype(brw_vec8_grf(0, 0), BRW_REGISTER_TYPE_D));
-  brw_pop_insn_state(p);
-   }
+   struct brw_reg header = brw_vec8_grf(0, 0);
+
+   gen6_resolve_implied_move(p, &header, inst->base_mrf);
 
generate_oword_dual_block_offsets(brw_message_reg(inst->base_mrf + 1),
 index);
@@ -417,7 +412,9 @@ vec4_visitor::generate_scratch_read(vec4_instruction *inst,
 */
struct brw_instruction *send = brw_next_insn(p, BRW_OPCODE_SEND);
brw_set_dest(p, send, dst);
-   brw_set_src0(p, send, brw_message_reg(inst->base_mrf));
+   brw_set_src0(p, send, header);
+   if (intel->gen < 6)
+  send->header.destreg__conditionalmod = inst->base_mrf;
brw_set_dp_read_message(p, send,
   255, /* binding table index: stateless access */
   BRW_DATAPORT_OWORD_DUAL_BLOCK_1OWORD,
@@ -433,19 +430,14 @@ vec4_visitor::generate_scratch_write(vec4_instruction 
*inst,
 struct brw_reg src,
 struct brw_reg index)
 {
+   struct brw_reg header = brw_vec8_grf(0, 0);
+
/* If the instruction is predicated, we'll predicate the send, not
 * the header setup.
 */
brw_set_predicate_control(p, false);
 
-   if (intel->gen >= 6) {
-  brw_push_insn_state(p);
-  brw_set_mask_control(p, BRW_MASK_DISABLE);
-  brw_MOV(p,
- retype(brw_message_reg(inst->base_mrf), BRW_REGISTER_TYPE_D),
- retype(brw_vec8_grf(0, 0), BRW_REGISTER_TYPE_D));
-  brw_pop_insn_state(p);
-   }
+   gen6_resolve_implied_move(p, &header, inst->base_mrf);
 
generate_oword_dual_block_offsets(brw_message_reg(inst->base_mrf + 1),
 index);
@@ -468,7 +460,9 @@ vec4_visitor::generate_scratch_write(vec4_instruction *inst,
 */
struct brw_instruction *send = brw_next_insn(p, BRW_OPCODE_SEND);
brw_set_dest(p, send, dst);
-   brw_set_src0(p, send, brw_message_reg(inst->base_mrf));
+   brw_set_src0(p, send, header);
+   if (intel->gen < 6)
+  send->header.destreg__conditionalmod = inst->base_mrf;
brw_set_dp_write_message(p, send,
255, /* binding table index: stateless access */
BRW_DATAPORT_OWORD_DUAL_BLOCK_1OWORD,
@@ -508,6 +502,8 @@ vec4_visitor::generate_pull_constant_load(vec4_instruction 
*inst,
struct brw_instruction *send = brw_next_insn(p, BRW_OPCODE_SEND);
brw_set_dest(p, send, dst);
brw_set_src0(p, send, header);
+   if (intel->gen < 6)
+  send->header.destreg__conditionalmod = inst->base_mrf;
brw_set_dp_read_message(p, send,
   SURF_INDEX_VERT_CONST_BUFFER,
   BRW_DATAPORT_OWORD_DUAL_BLOCK_1OWORD,

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): i965/vs: Fix constant-indexed array read/ write addresses on pre-gen6.

2011-09-06 Thread Eric Anholt
Module: Mesa
Branch: master
Commit: 88612e2c1b1580b92d229ec6d2236fe07b32e060
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=88612e2c1b1580b92d229ec6d2236fe07b32e060

Author: Eric Anholt 
Date:   Tue Aug 30 16:40:06 2011 -0700

i965/vs: Fix constant-indexed array read/write addresses on pre-gen6.

The second vertex was getting a garbage index.

Reviewed-by: Kenneth Graunke 

---

 src/mesa/drivers/dri/i965/brw_vec4_emit.cpp |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_vec4_emit.cpp 
b/src/mesa/drivers/dri/i965/brw_vec4_emit.cpp
index 828a9c1..61a1092 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_emit.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_emit.cpp
@@ -377,7 +377,7 @@ vec4_visitor::generate_oword_dual_block_offsets(struct 
brw_reg m1,
 
brw_set_predicate_inverse(p, true);
if (index.file == BRW_IMMEDIATE_VALUE) {
-  index_4.dw1.ud++;
+  index_4.dw1.ud += second_vertex_offset;
   brw_MOV(p, m1_4, index_4);
} else {
   brw_ADD(p, m1_4, index_4, brw_imm_d(second_vertex_offset));

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): i965/vs: Add support for vector comparison ops resulting in bool cond codes.

2011-09-06 Thread Eric Anholt
Module: Mesa
Branch: master
Commit: bba910373fc6cdca939422d94adfe58b43e41b86
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=bba910373fc6cdca939422d94adfe58b43e41b86

Author: Eric Anholt 
Date:   Tue Aug 30 16:23:44 2011 -0700

i965/vs: Add support for vector comparison ops resulting in bool cond codes.

Fixes a giant pile of VS tests on gen4.

Reviewed-by: Kenneth Graunke 

---

 src/mesa/drivers/dri/i965/brw_vec4.h   |4 +-
 src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp |   50 +++-
 2 files changed, 33 insertions(+), 21 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_vec4.h 
b/src/mesa/drivers/dri/i965/brw_vec4.h
index 360aa60..67b509a 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4.h
+++ b/src/mesa/drivers/dri/i965/brw_vec4.h
@@ -433,12 +433,12 @@ public:
/** Walks an exec_list of ir_instruction and sends it through this visitor. 
*/
void visit_instructions(const exec_list *list);
 
-   void emit_bool_to_cond_code(ir_rvalue *ir);
+   void emit_bool_to_cond_code(ir_rvalue *ir, uint32_t *predicate);
void emit_bool_comparison(unsigned int op, dst_reg dst, src_reg src0, 
src_reg src1);
void emit_if_gen6(ir_if *ir);
 
void emit_block_move(dst_reg *dst, src_reg *src,
-   const struct glsl_type *type, bool predicated);
+   const struct glsl_type *type, uint32_t predicate);
 
void emit_constant_values(dst_reg *dst, ir_constant *value);
 
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp 
b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
index 344c4e0..e0e3ce3 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
@@ -583,18 +583,18 @@ vec4_visitor::variable_storage(ir_variable *var)
 }
 
 void
-vec4_visitor::emit_bool_to_cond_code(ir_rvalue *ir)
+vec4_visitor::emit_bool_to_cond_code(ir_rvalue *ir, uint32_t *predicate)
 {
ir_expression *expr = ir->as_expression();
 
+   *predicate = BRW_PREDICATE_NORMAL;
+
if (expr) {
   src_reg op[2];
   vec4_instruction *inst;
 
   assert(expr->get_num_operands() <= 2);
   for (unsigned int i = 0; i < expr->get_num_operands(); i++) {
-assert(expr->operands[i]->type->is_scalar());
-
 expr->operands[i]->accept(this);
 op[i] = this->result;
   }
@@ -638,14 +638,27 @@ vec4_visitor::emit_bool_to_cond_code(ir_rvalue *ir)
 }
 break;
 
+  case ir_binop_all_equal:
+inst = emit(CMP(dst_null_d(), op[0], op[1], BRW_CONDITIONAL_Z));
+*predicate = BRW_PREDICATE_ALIGN16_ALL4H;
+break;
+
+  case ir_binop_any_nequal:
+inst = emit(CMP(dst_null_d(), op[0], op[1], BRW_CONDITIONAL_NZ));
+*predicate = BRW_PREDICATE_ALIGN16_ANY4H;
+break;
+
+  case ir_unop_any:
+inst = emit(CMP(dst_null_d(), op[0], src_reg(0), BRW_CONDITIONAL_NZ));
+*predicate = BRW_PREDICATE_ALIGN16_ANY4H;
+break;
+
   case ir_binop_greater:
   case ir_binop_gequal:
   case ir_binop_less:
   case ir_binop_lequal:
   case ir_binop_equal:
-  case ir_binop_all_equal:
   case ir_binop_nequal:
-  case ir_binop_any_nequal:
 emit(CMP(dst_null_d(), op[0], op[1],
  brw_conditional_for_comparison(expr->operation)));
 break;
@@ -1394,18 +1407,18 @@ get_assignment_lhs(ir_dereference *ir, vec4_visitor *v)
 
 void
 vec4_visitor::emit_block_move(dst_reg *dst, src_reg *src,
- const struct glsl_type *type, bool predicated)
+ const struct glsl_type *type, uint32_t predicate)
 {
if (type->base_type == GLSL_TYPE_STRUCT) {
   for (unsigned int i = 0; i < type->length; i++) {
-emit_block_move(dst, src, type->fields.structure[i].type, predicated);
+emit_block_move(dst, src, type->fields.structure[i].type, predicate);
   }
   return;
}
 
if (type->is_array()) {
   for (unsigned int i = 0; i < type->length; i++) {
-emit_block_move(dst, src, type->fields.array, predicated);
+emit_block_move(dst, src, type->fields.array, predicate);
   }
   return;
}
@@ -1417,7 +1430,7 @@ vec4_visitor::emit_block_move(dst_reg *dst, src_reg *src,
 type->vector_elements, 1);
 
   for (int i = 0; i < type->matrix_columns; i++) {
-emit_block_move(dst, src, vec_type, predicated);
+emit_block_move(dst, src, vec_type, predicate);
   }
   return;
}
@@ -1434,8 +1447,7 @@ vec4_visitor::emit_block_move(dst_reg *dst, src_reg *src,
src->swizzle = swizzle_for_size(type->vector_elements);
 
vec4_instruction *inst = emit(MOV(*dst, *src));
-   if (predicated)
-  inst->predicate = BRW_PREDICATE_NORMAL;
+   inst->predicate = predicate;
 
dst->reg_offset++;
src->reg_offset++;
@@ -1502,6 +1514,7 @@ void
 vec4_visitor::visit(ir_assignment *ir)
 {
dst_reg dst = get_assignment_lhs(ir->lhs

Mesa (master): i965/vs: Make pre-gen6 math operate in vector mode instead of scalar.

2011-09-06 Thread Eric Anholt
Module: Mesa
Branch: master
Commit: 9f842886077258ddda5d5a32b1f5d9fe2e5818bc
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=9f842886077258ddda5d5a32b1f5d9fe2e5818bc

Author: Eric Anholt 
Date:   Tue Aug 30 15:59:26 2011 -0700

i965/vs: Make pre-gen6 math operate in vector mode instead of scalar.

On the old backend, we used scalar mode because Mesa IR math is
result.xyzw = math(op0.), which matched up well.  However, in GLSL
IR we do things like result.xy = math(op0.xy), so we want vector mode.
For the common case of result.x = math(op0.x), performance will be the
same (no cost for un-executed channels), though result.xyzw =
math(op0.) would be worse.

Reviewed-by: Kenneth Graunke 

---

 src/mesa/drivers/dri/i965/brw_vec4_emit.cpp |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_vec4_emit.cpp 
b/src/mesa/drivers/dri/i965/brw_vec4_emit.cpp
index 4b8b276..828a9c1 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_emit.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_emit.cpp
@@ -259,7 +259,7 @@ vec4_visitor::generate_math1_gen4(vec4_instruction *inst,
BRW_MATH_SATURATE_NONE,
inst->base_mrf,
src,
-   BRW_MATH_DATA_SCALAR,
+   BRW_MATH_DATA_VECTOR,
BRW_MATH_PRECISION_FULL);
 }
 

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): i965/vs: Fix copy-and-paste disaster in pre-gen6 POW support .

2011-09-06 Thread Eric Anholt
Module: Mesa
Branch: master
Commit: 87be0ac96ce5aaea2a08f1ed63871c0dd3a3f9d5
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=87be0ac96ce5aaea2a08f1ed63871c0dd3a3f9d5

Author: Eric Anholt 
Date:   Fri Sep  2 16:58:30 2011 -0700

i965/vs: Fix copy-and-paste disaster in pre-gen6 POW support.

Fixes vs-pow-float-float and friends.

Reviewed-by: Kenneth Graunke 

---

 src/mesa/drivers/dri/i965/brw_vec4_emit.cpp |5 -
 1 files changed, 0 insertions(+), 5 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_vec4_emit.cpp 
b/src/mesa/drivers/dri/i965/brw_vec4_emit.cpp
index 2d1c878..4b8b276 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_emit.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_emit.cpp
@@ -319,12 +319,8 @@ vec4_visitor::generate_math2_gen4(vec4_instruction *inst,
  struct brw_reg src0,
  struct brw_reg src1)
 {
-   /* Can't do writemask because math can't be align16. */
-   assert(dst.dw1.bits.writemask == WRITEMASK_XYZW);
-
brw_MOV(p, brw_message_reg(inst->base_mrf + 1), src1);
 
-   brw_set_access_mode(p, BRW_ALIGN_1);
brw_math(p,
dst,
brw_math_function(inst->opcode),
@@ -333,7 +329,6 @@ vec4_visitor::generate_math2_gen4(vec4_instruction *inst,
src0,
BRW_MATH_DATA_VECTOR,
BRW_MATH_PRECISION_FULL);
-   brw_set_access_mode(p, BRW_ALIGN_16);
 }
 
 void

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): i965/vs: Fix gen4 comparisons used for predication.

2011-09-06 Thread Eric Anholt
Module: Mesa
Branch: master
Commit: 2ffc5ac1da40186ef1c5155df21caa3aa3c34ccb
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=2ffc5ac1da40186ef1c5155df21caa3aa3c34ccb

Author: Eric Anholt 
Date:   Fri Sep  2 16:46:46 2011 -0700

i965/vs: Fix gen4 comparisons used for predication.

When we tried to retype a brw_null_reg() in CMP(), the retyping didn't
take effect because HW_REG just ignores the type field.

Reviewed-by: Kenneth Graunke 

---

 src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp |5 -
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp 
b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
index 2cea90d..344c4e0 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
@@ -203,8 +203,11 @@ vec4_visitor::CMP(dst_reg dst, src_reg src0, src_reg src1, 
uint32_t condition)
 * before before comparison, producing garbage results for floating
 * point comparisons.
 */
-   if (intel->gen == 4)
+   if (intel->gen == 4) {
   dst.type = src0.type;
+  if (dst.file == HW_REG)
+dst.fixed_hw_reg.type = dst.type;
+   }
 
inst = new(mem_ctx) vec4_instruction(this, BRW_OPCODE_CMP, dst, src0, src1);
inst->conditional_mod = condition;

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): i965/vs: Fix GPU hangs in shaders with large virtual GRFs pre-gen6.

2011-09-06 Thread Eric Anholt
Module: Mesa
Branch: master
Commit: 8adcad213ef6cbbaa9adf1485827125cc05aa033
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=8adcad213ef6cbbaa9adf1485827125cc05aa033

Author: Eric Anholt 
Date:   Tue Aug 30 15:50:17 2011 -0700

i965/vs: Fix GPU hangs in shaders with large virtual GRFs pre-gen6.

If you get your total GRF count wrong, you write over some other
shader's g0, and the GPU fails shortly thereafter.

Reviewed-by: Kenneth Graunke 

---

 .../drivers/dri/i965/brw_vec4_reg_allocate.cpp |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_vec4_reg_allocate.cpp 
b/src/mesa/drivers/dri/i965/brw_vec4_reg_allocate.cpp
index 72e0c07..9fd4922 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_reg_allocate.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_reg_allocate.cpp
@@ -216,7 +216,8 @@ vec4_visitor::reg_allocate()
   int reg = ra_get_node_reg(g, i);
 
   hw_reg_mapping[i] = first_assigned_grf + brw->vs.ra_reg_to_grf[reg];
-  prog_data->total_grf = MAX2(prog_data->total_grf, hw_reg_mapping[i] + 1);
+  prog_data->total_grf = MAX2(prog_data->total_grf,
+ hw_reg_mapping[i] + virtual_grf_sizes[i]);
}
 
foreach_list(node, &this->instructions) {

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): i965: add casts to silence int/enum conversion warnings

2011-09-06 Thread Brian Paul
Module: Mesa
Branch: master
Commit: 23eec54bb0f368d9c88894b544b4af8f01cae2ae
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=23eec54bb0f368d9c88894b544b4af8f01cae2ae

Author: Brian Paul 
Date:   Tue Sep  6 16:50:27 2011 -0600

i965: add casts to silence int/enum conversion warnings

---

 src/mesa/drivers/dri/i965/brw_fs.cpp |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp 
b/src/mesa/drivers/dri/i965/brw_fs.cpp
index 1f3d9d8..7f5194b 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -672,7 +672,7 @@ fs_visitor::calculate_urb_setup()
   /* FINISHME: The sf doesn't map VS->FS inputs for us very well. */
   for (unsigned int i = 0; i < VERT_RESULT_MAX; i++) {
 if (c->key.vp_outputs_written & BITFIELD64_BIT(i)) {
-   int fp_index = _mesa_vert_result_to_frag_attrib(i);
+   int fp_index = _mesa_vert_result_to_frag_attrib((gl_vert_result) i);
 
if (fp_index >= 0)
   urb_setup[fp_index] = urb_next++;
@@ -1826,7 +1826,7 @@ brw_fs_precompile(struct gl_context *ctx, struct 
gl_shader_program *prog)
 
   key.proj_attrib_mask |= 1 << i;
 
-  int vp_index = _mesa_vert_result_to_frag_attrib(i);
+  int vp_index = _mesa_vert_result_to_frag_attrib((gl_vert_result) i);
 
   if (vp_index >= 0)
 key.vp_outputs_written |= BITFIELD64_BIT(vp_index);

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): state_trackers/dri/sw: Implement texture_from_pixmap.

2011-09-06 Thread Stephane Marchesin
Module: Mesa
Branch: master
Commit: 02f1b50987c0d24da3dcc36dbb44821c20d0660c
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=02f1b50987c0d24da3dcc36dbb44821c20d0660c

Author: Stéphane Marchesin 
Date:   Mon Aug 29 17:22:03 2011 -0700

state_trackers/dri/sw: Implement texture_from_pixmap.

Signed-off-by: Stuart Abercrombie 
Signed-off-by: Stéphane Marchesin 

---

 src/gallium/state_trackers/dri/sw/dri_drawable.c |   50 +++---
 1 files changed, 43 insertions(+), 7 deletions(-)

diff --git a/src/gallium/state_trackers/dri/sw/dri_drawable.c 
b/src/gallium/state_trackers/dri/sw/dri_drawable.c
index 7b8de31..05c64b6 100644
--- a/src/gallium/state_trackers/dri/sw/dri_drawable.c
+++ b/src/gallium/state_trackers/dri/sw/dri_drawable.c
@@ -37,7 +37,8 @@
 #include "util/u_format.h"
 #include "util/u_memory.h"
 #include "util/u_inlines.h"
- 
+
+#include "state_tracker/st_context.h" 
 
 static boolean
 dri_st_framebuffer_validate(struct st_framebuffer_iface *stfbi,
@@ -195,14 +196,23 @@ dri_set_tex_buffer2(__DRIcontext *pDRICtx, GLint target,
 {
struct dri_context *ctx = dri_context(pDRICtx);
struct dri_drawable *drawable = dri_drawable(dPriv);
-   struct pipe_resource *pt;
-
+   struct pipe_resource *res;
+   struct st_context *stctx = (struct st_context *)ctx->st;
+   struct pipe_context *pipe = stctx->pipe;
+   struct pipe_transfer *tex_xfer;
+   char *map;
+   __DRIscreen *sPriv = dPriv->driScreenPriv;
+   int x, y, w, h, line, ximage_stride;
+
+   sPriv->swrast_loader->getDrawableInfo(dPriv, &x, &y, &w, &h, 
dPriv->loaderPrivate);
+ 
dri_drawable_validate_att(drawable, ST_ATTACHMENT_FRONT_LEFT);
 
-   pt = drawable->textures[ST_ATTACHMENT_FRONT_LEFT];
+   /* Use the pipe resource associated with the X drawable */
+   res = drawable->textures[ST_ATTACHMENT_FRONT_LEFT];
 
-   if (pt) {
-  enum pipe_format internal_format = pt->format;
+   if (res) {
+  enum pipe_format internal_format = res->format;
 
   if (format == __DRI_TEXTURE_FORMAT_RGB)  {
  /* only need to cover the formats recognized by dri_fill_st_visual */
@@ -218,9 +228,35 @@ dri_set_tex_buffer2(__DRIcontext *pDRICtx, GLint target,
  }
   }
 
+
+  tex_xfer = pipe_get_transfer(pipe, res,
+0, 0,// level, layer
+PIPE_TRANSFER_WRITE,
+x, y,
+w, h);
+
+
+  map = pipe_transfer_map(pipe, tex_xfer);
+ 
+  /* Copy the Drawable content to the mapped texture buffer */
+  sPriv->swrast_loader->getImage(dPriv, x, y, w, h, map,
+  dPriv->loaderPrivate);
+
+  /* The pipe transfer has a pitch rounded up to the nearest 64 pixels.
+ We assume 32 bit pixels. */
+  ximage_stride = w * 4;  
+  for (line = h-1; line; --line) {
+ memmove(&map[line * tex_xfer->stride], &map[line * ximage_stride], 
ximage_stride);
+  }
+
+  pipe_transfer_unmap(pipe, tex_xfer);
+
+  pipe_transfer_destroy(pipe, tex_xfer);
+
   ctx->st->teximage(ctx->st,
 (target == GL_TEXTURE_2D) ? ST_TEXTURE_2D : ST_TEXTURE_RECT,
-0, internal_format, pt, FALSE);
+0, internal_format, res, FALSE);
+
}
 }
 

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): Duplicate state_tracker/dri/sw/dri_drawable.c

2011-09-06 Thread Stephane Marchesin
Module: Mesa
Branch: master
Commit: 569bde1fa7d03fb7688d0d391b32e61e857ad44e
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=569bde1fa7d03fb7688d0d391b32e61e857ad44e

Author: Stéphane Marchesin 
Date:   Mon Aug 29 17:19:29 2011 -0700

Duplicate state_tracker/dri/sw/dri_drawable.c

We need this for the upcoming fix for sw texture_from_pixmap.

Signed-off-by: Stuart Abercrombie 
Signed-off-by: Stéphane Marchesin 

---

 src/gallium/state_trackers/dri/sw/dri_drawable.c |  270 +-
 1 files changed, 269 insertions(+), 1 deletions(-)

diff --git a/src/gallium/state_trackers/dri/sw/dri_drawable.c 
b/src/gallium/state_trackers/dri/sw/dri_drawable.c
deleted file mode 12
index 0fc19be..7b8de31
--- a/src/gallium/state_trackers/dri/sw/dri_drawable.c
+++ /dev/null
@@ -1 +0,0 @@
-../common/dri_drawable.c
\ No newline at end of file
diff --git a/src/gallium/state_trackers/dri/sw/dri_drawable.c 
b/src/gallium/state_trackers/dri/sw/dri_drawable.c
new file mode 100644
index 0fc19be..7b8de31
--- /dev/null
+++ b/src/gallium/state_trackers/dri/sw/dri_drawable.c
@@ -0,0 +1,269 @@
+/**
+ *
+ * Copyright 2009, VMware, Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **/
+/*
+ * Author: Keith Whitwell 
+ * Author: Jakob Bornecrantz 
+ */
+
+#include "dri_screen.h"
+#include "dri_context.h"
+#include "dri_drawable.h"
+
+#include "pipe/p_screen.h"
+#include "util/u_format.h"
+#include "util/u_memory.h"
+#include "util/u_inlines.h"
+ 
+
+static boolean
+dri_st_framebuffer_validate(struct st_framebuffer_iface *stfbi,
+const enum st_attachment_type *statts,
+unsigned count,
+struct pipe_resource **out)
+{
+   struct dri_drawable *drawable =
+  (struct dri_drawable *) stfbi->st_manager_private;
+   struct dri_screen *screen = dri_screen(drawable->sPriv);
+   unsigned statt_mask, new_mask;
+   boolean new_stamp;
+   int i;
+
+   statt_mask = 0x0;
+   for (i = 0; i < count; i++)
+  statt_mask |= (1 << statts[i]);
+
+   /* record newly allocated textures */
+   new_mask = (statt_mask & ~drawable->texture_mask);
+
+   /*
+* dPriv->pStamp is the server stamp.  It should be accessed with a lock, at
+* least for DRI1.  dPriv->lastStamp is the client stamp.  It has the value
+* of the server stamp when last checked.
+*/
+   new_stamp = (drawable->texture_stamp != drawable->dPriv->lastStamp);
+
+   if (new_stamp || new_mask || screen->broken_invalidate) {
+  if (new_stamp && drawable->update_drawable_info)
+ drawable->update_drawable_info(drawable);
+
+  drawable->allocate_textures(drawable, statts, count);
+
+  /* add existing textures */
+  for (i = 0; i < ST_ATTACHMENT_COUNT; i++) {
+ if (drawable->textures[i])
+statt_mask |= (1 << i);
+  }
+
+  drawable->texture_stamp = drawable->dPriv->lastStamp;
+  drawable->texture_mask = statt_mask;
+   }
+
+   if (!out)
+  return TRUE;
+
+   for (i = 0; i < count; i++) {
+  out[i] = NULL;
+  pipe_resource_reference(&out[i], drawable->textures[statts[i]]);
+   }
+
+   return TRUE;
+}
+
+static boolean
+dri_st_framebuffer_flush_front(struct st_framebuffer_iface *stfbi,
+   enum st_attachment_type statt)
+{
+   struct dri_drawable *drawable =
+  (struct dri_drawable *) stfbi->st_manager_private;
+
+   /* XXX remove this and just set the correct one on the framebuffer */
+   drawable->flush_frontbuffer(drawable, statt);
+
+   return TRUE;
+}
+
+/**
+ * This is called when we need to set up GL rendering to a new X window.
+ */
+boolean
+dri_create_buffer(__DRIscreen * sPriv,
+ __DRIdrawable * dPriv,
+ con

Mesa (master): Enable GLX_EXT_texture_from_pixmap in software.

2011-09-06 Thread Stephane Marchesin
Module: Mesa
Branch: master
Commit: 55e763c86da1aa2042d50d190d797574d6fb6fa8
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=55e763c86da1aa2042d50d190d797574d6fb6fa8

Author: nobled 
Date:   Mon Aug 29 16:24:59 2011 -0700

Enable GLX_EXT_texture_from_pixmap in software.

Signed-off-by: nobled 
Signed-off-by: Stuart Abercrombie 
Signed-off-by: Stéphane Marchesin 

---

 src/glx/drisw_glx.c |   83 +-
 1 files changed, 81 insertions(+), 2 deletions(-)

diff --git a/src/glx/drisw_glx.c b/src/glx/drisw_glx.c
index 7bd6450..21d0a0a 100644
--- a/src/glx/drisw_glx.c
+++ b/src/glx/drisw_glx.c
@@ -48,6 +48,8 @@ struct drisw_screen
__GLXDRIscreen vtable;
const __DRIcoreExtension *core;
const __DRIswrastExtension *swrast;
+   const __DRItexBufferExtension *texBuffer;
+
const __DRIconfig **driver_configs;
 
void *driver;
@@ -294,6 +296,66 @@ drisw_unbind_context(struct glx_context *context, struct 
glx_context *new)
(*psc->core->unbindContext) (pcp->driContext);
 }
 
+static void
+drisw_bind_tex_image(Display * dpy,
+   GLXDrawable drawable,
+   int buffer, const int *attrib_list)
+{
+   struct glx_context *gc = __glXGetCurrentContext();
+   struct drisw_context *pcp = (struct drisw_context *) gc;
+   __GLXDRIdrawable *base = GetGLXDRIDrawable(dpy, drawable);
+   struct glx_display *dpyPriv = __glXInitialize(dpy);
+   struct drisw_drawable *pdraw = (struct drisw_drawable *) base;
+   struct drisw_screen *psc;
+
+   if (pdraw != NULL) {
+  psc = (struct drisw_screen *) base->psc;
+
+  if (!psc->texBuffer)
+ return;
+
+  if (psc->texBuffer->base.version >= 2 &&
+psc->texBuffer->setTexBuffer2 != NULL) {
+ (*psc->texBuffer->setTexBuffer2) (pcp->driContext,
+  pdraw->base.textureTarget,
+  pdraw->base.textureFormat,
+  pdraw->driDrawable);
+  }
+  else {
+ (*psc->texBuffer->setTexBuffer) (pcp->driContext,
+ pdraw->base.textureTarget,
+ pdraw->driDrawable);
+  }
+   }
+}
+
+static void
+drisw_release_tex_image(Display * dpy, GLXDrawable drawable, int buffer)
+{
+#if __DRI_TEX_BUFFER_VERSION >= 3
+   struct glx_context *gc = __glXGetCurrentContext();
+   struct dri2_context *pcp = (struct dri2_context *) gc;
+   __GLXDRIdrawable *base = GetGLXDRIDrawable(dpy, drawable);
+   struct glx_display *dpyPriv = __glXInitialize(dpy);
+   struct dri2_drawable *pdraw = (struct dri2_drawable *) base;
+   struct dri2_screen *psc;
+
+   if (pdraw != NULL) {
+  psc = (struct dri2_screen *) base->psc;
+
+  if (!psc->texBuffer)
+ return;
+
+  if (psc->texBuffer->base.version >= 3 &&
+  psc->texBuffer->releaseTexBuffer != NULL) {
+ (*psc->texBuffer->releaseTexBuffer) (pcp->driContext,
+   pdraw->base.textureTarget,
+   pdraw->driDrawable);
+  }
+   }
+#endif
+}
+
 static const struct glx_context_vtable drisw_context_vtable = {
drisw_destroy_context,
drisw_bind_context,
@@ -301,8 +363,8 @@ static const struct glx_context_vtable drisw_context_vtable 
= {
NULL,
NULL,
DRI_glXUseXFont,
-   NULL,
-   NULL,
+   drisw_bind_tex_image,
+   drisw_release_tex_image,
NULL, /* get_proc_address */
 };
 
@@ -439,6 +501,20 @@ static const struct glx_screen_vtable drisw_screen_vtable 
= {
drisw_create_context
 };
 
+static void
+driswBindExtensions(struct drisw_screen *psc, const __DRIextension 
**extensions)
+{
+   int i;
+
+   /* FIXME: Figure out what other extensions can be ported here from dri2. */
+   for (i = 0; extensions[i]; i++) {
+  if ((strcmp(extensions[i]->name, __DRI_TEX_BUFFER) == 0)) {
+psc->texBuffer = (__DRItexBufferExtension *) extensions[i];
+__glXEnableDirectExtension(&psc->base, "GLX_EXT_texture_from_pixmap");
+  }
+   }
+}
+
 static struct glx_screen *
 driswCreateScreen(int screen, struct glx_display *priv)
 {
@@ -488,6 +564,9 @@ driswCreateScreen(int screen, struct glx_display *priv)
   goto handle_error;
}
 
+   extensions = psc->core->getExtensions(psc->driScreen);
+   driswBindExtensions(psc, extensions);
+
psc->base.configs =
   driConvertConfigs(psc->core, psc->base.configs, driver_configs);
psc->base.visuals =

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): st/mesa: remove unneeded #include

2011-09-06 Thread Brian Paul
Module: Mesa
Branch: master
Commit: a4adc88a2d855bd2d8c7caf7059b4a52199dc609
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=a4adc88a2d855bd2d8c7caf7059b4a52199dc609

Author: Brian Paul 
Date:   Tue Sep  6 15:44:44 2011 -0600

st/mesa: remove unneeded #include

---

 src/mesa/state_tracker/st_cb_eglimage.c |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/src/mesa/state_tracker/st_cb_eglimage.c 
b/src/mesa/state_tracker/st_cb_eglimage.c
index dfde821..531296f 100644
--- a/src/mesa/state_tracker/st_cb_eglimage.c
+++ b/src/mesa/state_tracker/st_cb_eglimage.c
@@ -28,7 +28,6 @@
 
 #include "main/mfeatures.h"
 #include "main/texobj.h"
-#include "main/texfetch.h"
 #include "main/teximage.h"
 #include "util/u_inlines.h"
 #include "util/u_format.h"

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): mesa: whitespace fixes, just to be consistent

2011-09-06 Thread Brian Paul
Module: Mesa
Branch: master
Commit: 1a65d098cea54352335460fedf97f705d20f2ab7
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=1a65d098cea54352335460fedf97f705d20f2ab7

Author: Brian Paul 
Date:   Tue Sep  6 15:30:14 2011 -0600

mesa: whitespace fixes, just to be consistent

---

 src/mesa/main/mtypes.h |9 +++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 8b479f4..ae500b4 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -339,6 +339,7 @@ typedef enum
FRAG_ATTRIB_MAX = (FRAG_ATTRIB_VAR0 + MAX_VARYING)
 } gl_frag_attrib;
 
+
 /**
  * Convert from a gl_vert_result value to the corresponding gl_frag_attrib.
  *
@@ -348,7 +349,8 @@ typedef enum
  * (VERT_RESULT_PSIZ, VERT_RESULT_BFC0, VERT_RESULT_BFC1, and
  * VERT_RESULT_EDGE) are converted to a value of -1.
  */
-static INLINE int _mesa_vert_result_to_frag_attrib(gl_vert_result vert_result)
+static INLINE int
+_mesa_vert_result_to_frag_attrib(gl_vert_result vert_result)
 {
if (vert_result >= VERT_RESULT_VAR0)
   return vert_result - VERT_RESULT_VAR0 + FRAG_ATTRIB_VAR0;
@@ -358,6 +360,7 @@ static INLINE int 
_mesa_vert_result_to_frag_attrib(gl_vert_result vert_result)
   return -1;
 }
 
+
 /**
  * Convert from a gl_frag_attrib value to the corresponding gl_vert_result.
  *
@@ -366,7 +369,8 @@ static INLINE int 
_mesa_vert_result_to_frag_attrib(gl_vert_result vert_result)
  * gl_frag_attrib values which have no corresponding gl_vert_result
  * (FRAG_ATTRIB_FACE and FRAG_ATTRIB_PNTC) are converted to a value of -1.
  */
-static INLINE int _mesa_frag_attrib_to_vert_result(gl_frag_attrib frag_attrib)
+static INLINE int
+_mesa_frag_attrib_to_vert_result(gl_frag_attrib frag_attrib)
 {
if (frag_attrib <= FRAG_ATTRIB_TEX7)
   return frag_attrib;
@@ -376,6 +380,7 @@ static INLINE int 
_mesa_frag_attrib_to_vert_result(gl_frag_attrib frag_attrib)
   return -1;
 }
 
+
 /**
  * Bitflags for fragment program input attributes.
  */

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): mesa: put _mesa_ prefix on vert_result_to_frag_attrib()

2011-09-06 Thread Brian Paul
Module: Mesa
Branch: master
Commit: 51e7b058750cc480c296d45f773d7a5a662457f5
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=51e7b058750cc480c296d45f773d7a5a662457f5

Author: Brian Paul 
Date:   Tue Sep  6 15:29:24 2011 -0600

mesa: put _mesa_ prefix on vert_result_to_frag_attrib()

---

 src/mesa/drivers/dri/i965/brw_fs.cpp|4 ++--
 src/mesa/drivers/dri/i965/brw_vs_constval.c |2 +-
 src/mesa/drivers/dri/i965/brw_wm_pass2.c|2 +-
 src/mesa/drivers/dri/i965/gen6_sf_state.c   |2 +-
 src/mesa/main/mtypes.h  |8 
 5 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp 
b/src/mesa/drivers/dri/i965/brw_fs.cpp
index 9332373..1f3d9d8 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -672,7 +672,7 @@ fs_visitor::calculate_urb_setup()
   /* FINISHME: The sf doesn't map VS->FS inputs for us very well. */
   for (unsigned int i = 0; i < VERT_RESULT_MAX; i++) {
 if (c->key.vp_outputs_written & BITFIELD64_BIT(i)) {
-   int fp_index = vert_result_to_frag_attrib(i);
+   int fp_index = _mesa_vert_result_to_frag_attrib(i);
 
if (fp_index >= 0)
   urb_setup[fp_index] = urb_next++;
@@ -1826,7 +1826,7 @@ brw_fs_precompile(struct gl_context *ctx, struct 
gl_shader_program *prog)
 
   key.proj_attrib_mask |= 1 << i;
 
-  int vp_index = vert_result_to_frag_attrib(i);
+  int vp_index = _mesa_vert_result_to_frag_attrib(i);
 
   if (vp_index >= 0)
 key.vp_outputs_written |= BITFIELD64_BIT(vp_index);
diff --git a/src/mesa/drivers/dri/i965/brw_vs_constval.c 
b/src/mesa/drivers/dri/i965/brw_vs_constval.c
index 4d9d4b7..67af23e 100644
--- a/src/mesa/drivers/dri/i965/brw_vs_constval.c
+++ b/src/mesa/drivers/dri/i965/brw_vs_constval.c
@@ -146,7 +146,7 @@ static void calc_sizes( struct tracker *t )
for (vertRes = VERT_RESULT_TEX0; vertRes < VERT_RESULT_MAX; vertRes++) {
 
   /* map vertex program output index to fragment program input index */
-  GLint fragAttrib = vert_result_to_frag_attrib(vertRes);
+  GLint fragAttrib = _mesa_vert_result_to_frag_attrib(vertRes);
   if (fragAttrib < 0)
  continue;
   assert(fragAttrib >= FRAG_ATTRIB_TEX0);
diff --git a/src/mesa/drivers/dri/i965/brw_wm_pass2.c 
b/src/mesa/drivers/dri/i965/brw_wm_pass2.c
index f1d70f7..27c0a94 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_pass2.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_pass2.c
@@ -94,7 +94,7 @@ static void init_registers( struct brw_wm_compile *c )
} else {
   for (j = 0; j < VERT_RESULT_MAX; j++) {
 if (c->key.vp_outputs_written & BITFIELD64_BIT(j)) {
-   int fp_index = vert_result_to_frag_attrib(j);
+   int fp_index = _mesa_vert_result_to_frag_attrib(j);
 
nr_interp_regs++;
if (fp_index >= 0)
diff --git a/src/mesa/drivers/dri/i965/gen6_sf_state.c 
b/src/mesa/drivers/dri/i965/gen6_sf_state.c
index ed49593..4a9c094 100644
--- a/src/mesa/drivers/dri/i965/gen6_sf_state.c
+++ b/src/mesa/drivers/dri/i965/gen6_sf_state.c
@@ -56,7 +56,7 @@ get_attr_override(struct brw_vue_map *vue_map, int 
urb_entry_read_offset,
   int fs_attr, bool two_side_color)
 {
int attr_override, slot;
-   int vs_attr = frag_attrib_to_vert_result(fs_attr);
+   int vs_attr = _mesa_frag_attrib_to_vert_result(fs_attr);
if (vs_attr < 0 || vs_attr == VERT_RESULT_HPOS) {
   /* These attributes will be overwritten by the fragment shader's
* interpolation code (see emit_interp() in brw_wm_fp.c), so just let
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 4e5cc46..8b479f4 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -216,7 +216,7 @@ typedef enum
 
 /**
  * Indexes for vertex program result attributes.  Note that
- * vert_result_to_frag_attrib() and frag_attrib_to_vert_result() make
+ * _mesa_vert_result_to_frag_attrib() and _mesa_frag_attrib_to_vert_result() 
make
  * assumptions about the layout of this enum.
  */
 typedef enum
@@ -316,7 +316,7 @@ typedef enum
 
 /**
  * Indexes for fragment program input attributes.  Note that
- * vert_result_to_frag_attrib() and frag_attrib_to_vert_result() make
+ * _mesa_vert_result_to_frag_attrib() and frag_attrib_to_vert_result() make
  * assumptions about the layout of this enum.
  */
 typedef enum
@@ -348,7 +348,7 @@ typedef enum
  * (VERT_RESULT_PSIZ, VERT_RESULT_BFC0, VERT_RESULT_BFC1, and
  * VERT_RESULT_EDGE) are converted to a value of -1.
  */
-static INLINE int vert_result_to_frag_attrib(gl_vert_result vert_result)
+static INLINE int _mesa_vert_result_to_frag_attrib(gl_vert_result vert_result)
 {
if (vert_result >= VERT_RESULT_VAR0)
   return vert_result - VERT_RESULT_VAR0 + FRAG_ATTRIB_VAR0;
@@ -366,7 +366,7 @@ static INLINE int vert_result_to_frag_attrib(gl_vert_result 
vert_result)
  * gl_frag_attrib values which have no corresponding gl_vert

Mesa (master): mesa: fix vert_result_to_frag_attrib() parameter type

2011-09-06 Thread Brian Paul
Module: Mesa
Branch: master
Commit: a794ad3709a6eb26bc96934203c20a8b3b8d8672
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=a794ad3709a6eb26bc96934203c20a8b3b8d8672

Author: Brian Paul 
Date:   Tue Sep  6 15:24:14 2011 -0600

mesa: fix vert_result_to_frag_attrib() parameter type

---

 src/mesa/main/mtypes.h |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 396a752..4e5cc46 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -348,7 +348,7 @@ typedef enum
  * (VERT_RESULT_PSIZ, VERT_RESULT_BFC0, VERT_RESULT_BFC1, and
  * VERT_RESULT_EDGE) are converted to a value of -1.
  */
-static INLINE int vert_result_to_frag_attrib(int vert_result)
+static INLINE int vert_result_to_frag_attrib(gl_vert_result vert_result)
 {
if (vert_result >= VERT_RESULT_VAR0)
   return vert_result - VERT_RESULT_VAR0 + FRAG_ATTRIB_VAR0;
@@ -366,7 +366,7 @@ static INLINE int vert_result_to_frag_attrib(int 
vert_result)
  * gl_frag_attrib values which have no corresponding gl_vert_result
  * (FRAG_ATTRIB_FACE and FRAG_ATTRIB_PNTC) are converted to a value of -1.
  */
-static INLINE int frag_attrib_to_vert_result(int frag_attrib)
+static INLINE int frag_attrib_to_vert_result(gl_frag_attrib frag_attrib)
 {
if (frag_attrib <= FRAG_ATTRIB_TEX7)
   return frag_attrib;

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): mesa: s/inline/INLINE/ to fix MSVC build

2011-09-06 Thread Brian Paul
Module: Mesa
Branch: master
Commit: 37afc99264f93c0d3a588427a24218e2ec9d
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=37afc99264f93c0d3a588427a24218e2ec9d

Author: Brian Paul 
Date:   Tue Sep  6 15:20:33 2011 -0600

mesa: s/inline/INLINE/ to fix MSVC build

---

 src/mesa/main/mtypes.h |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 129403c..396a752 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -348,7 +348,7 @@ typedef enum
  * (VERT_RESULT_PSIZ, VERT_RESULT_BFC0, VERT_RESULT_BFC1, and
  * VERT_RESULT_EDGE) are converted to a value of -1.
  */
-static inline int vert_result_to_frag_attrib(int vert_result)
+static INLINE int vert_result_to_frag_attrib(int vert_result)
 {
if (vert_result >= VERT_RESULT_VAR0)
   return vert_result - VERT_RESULT_VAR0 + FRAG_ATTRIB_VAR0;
@@ -366,7 +366,7 @@ static inline int vert_result_to_frag_attrib(int 
vert_result)
  * gl_frag_attrib values which have no corresponding gl_vert_result
  * (FRAG_ATTRIB_FACE and FRAG_ATTRIB_PNTC) are converted to a value of -1.
  */
-static inline int frag_attrib_to_vert_result(int frag_attrib)
+static INLINE int frag_attrib_to_vert_result(int frag_attrib)
 {
if (frag_attrib <= FRAG_ATTRIB_TEX7)
   return frag_attrib;

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): Remove an AmiWin leftover

2011-09-06 Thread Adam Jackson
Module: Mesa
Branch: master
Commit: 7f379df4015ca6b886627c5c0d18778b0f8611be
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=7f379df4015ca6b886627c5c0d18778b0f8611be

Author: Adam Jackson 
Date:   Tue Sep  6 15:55:11 2011 -0400

Remove an AmiWin leftover

Signed-off-by: Adam Jackson 

---

 src/mesa/drivers/x11/xmesa.h |6 --
 1 files changed, 0 insertions(+), 6 deletions(-)

diff --git a/src/mesa/drivers/x11/xmesa.h b/src/mesa/drivers/x11/xmesa.h
index 347394e..9030eb6 100644
--- a/src/mesa/drivers/x11/xmesa.h
+++ b/src/mesa/drivers/x11/xmesa.h
@@ -77,12 +77,6 @@ extern "C" {
 #include "xmesa_x.h"
 #include "GL/gl.h"
 
-#ifdef AMIWIN
-#include 
-extern struct Library *XLibBase;
-#endif
-
-
 #define XMESA_MAJOR_VERSION 6
 #define XMESA_MINOR_VERSION 3
 

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): Drop some Glide remnants

2011-09-06 Thread Adam Jackson
Module: Mesa
Branch: master
Commit: 7826067bd195bd1e7f69565b83d2161638e5a230
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=7826067bd195bd1e7f69565b83d2161638e5a230

Author: Adam Jackson 
Date:   Tue Sep  6 15:58:00 2011 -0400

Drop some Glide remnants

Apparently the x11 driver had a hack for glide passthrough.  Who knew?

Signed-off-by: Adam Jackson 

---

 src/mesa/drivers/x11/Makefile   |2 -
 src/mesa/drivers/x11/fxmesa.h   |   92 -
 src/mesa/drivers/x11/xm_glide.c |  269 ---
 src/mesa/drivers/x11/xm_glide.h |   40 --
 src/mesa/drivers/x11/xmesaP.h   |4 -
 5 files changed, 0 insertions(+), 407 deletions(-)

diff --git a/src/mesa/drivers/x11/Makefile b/src/mesa/drivers/x11/Makefile
index 6b2a13c..a7631f3 100644
--- a/src/mesa/drivers/x11/Makefile
+++ b/src/mesa/drivers/x11/Makefile
@@ -20,7 +20,6 @@ HEADERS = \
glxheader.h \
xfonts.h \
xmesaP.h \
-   xm_glide.h \
xm_image.h
 
 SOURCES = \
@@ -30,7 +29,6 @@ SOURCES = \
xm_api.c \
xm_buffer.c \
xm_dd.c \
-   xm_glide.c \
xm_image.c \
xm_line.c \
xm_span.c \
diff --git a/src/mesa/drivers/x11/fxmesa.h b/src/mesa/drivers/x11/fxmesa.h
deleted file mode 100644
index 7df65cf..000
--- a/src/mesa/drivers/x11/fxmesa.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Mesa 3-D graphics library
- * Version:  4.0
- * Copyright (C) 1995-2001  Brian Paul
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the Free
- * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-
-/*
- * FXMesa - 3Dfx Glide driver for Mesa.  Contributed by David Bucciarelli
- *
- * NOTE: This version requires Glide3 (http://sourceforge.net/projects/glide)
- */
-
-
-#ifndef FXMESA_H
-#define FXMESA_H
-
-
-#include 
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-#define FXMESA_MAJOR_VERSION 6
-#define FXMESA_MINOR_VERSION 3
-
-
-/*
- * Values for attribList parameter to fxMesaCreateContext():
- */
-#define FXMESA_NONE0   /* to terminate attribList */
-#define FXMESA_DOUBLEBUFFER10
-#define FXMESA_ALPHA_SIZE  11  /* followed by an integer */
-#define FXMESA_DEPTH_SIZE  12  /* followed by an integer */
-#define FXMESA_STENCIL_SIZE13  /* followed by an integer */
-#define FXMESA_ACCUM_SIZE  14  /* followed by an integer */
-#define FXMESA_COLORDEPTH  20  /* followed by an integer */
-#define FXMESA_SHARE_CONTEXT 990099/* keep in sync with xmesa1.c! */
-
-
-
-typedef struct tfxMesaContext *fxMesaContext;
-
-
-GLAPI fxMesaContext GLAPIENTRY fxMesaCreateContext(GLuint win, 
GrScreenResolution_t,
- GrScreenRefresh_t,
- const GLint attribList[]);
-
-GLAPI fxMesaContext GLAPIENTRY fxMesaCreateBestContext(GLuint win,
- GLint width, GLint height,
- const GLint attribList[]);
-GLAPI void GLAPIENTRY fxMesaDestroyContext(fxMesaContext ctx);
-
-GLAPI GLint GLAPIENTRY fxMesaSelectCurrentBoard(int n);
-
-GLAPI void GLAPIENTRY fxMesaMakeCurrent(fxMesaContext ctx);
-
-GLAPI fxMesaContext GLAPIENTRY fxMesaGetCurrentContext(void);
-
-GLAPI void GLAPIENTRY fxMesaSwapBuffers(void);
-
-GLAPI void GLAPIENTRY fxMesaSetNearFar(GLfloat nearVal, GLfloat farVal);
-
-GLAPI void GLAPIENTRY fxMesaUpdateScreenSize(fxMesaContext ctx);
-
-GLAPI void GLAPIENTRY fxCloseHardware(void);
-
-GLAPI void GLAPIENTRY fxGetScreenGeometry (GLint *w, GLint *h);
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif
diff --git a/src/mesa/drivers/x11/xm_glide.c b/src/mesa/drivers/x11/xm_glide.c
deleted file mode 100644
index d8a0e6d..000
--- a/src/mesa/drivers/x11/xm_glide.c
+++ /dev/null
@@ -1,269 +0,0 @@
-/*
- * Mesa 3-D graphics library
- * Version:  6.5
- *
- * Copyright (C) 1999-2006  Brian Paul   All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furni

Mesa (master): Remove dead glfbdev.h

2011-09-06 Thread Adam Jackson
Module: Mesa
Branch: master
Commit: c7cc61fea92ebb1e3be693cf6fa0be5e263f115a
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=c7cc61fea92ebb1e3be693cf6fa0be5e263f115a

Author: Adam Jackson 
Date:   Tue Sep  6 15:50:11 2011 -0400

Remove dead glfbdev.h

This belonged to the now-dead swrast-on-fbdev driver.

Signed-off-by: Adam Jackson 

---

 include/GL/glfbdev.h |  152 --
 1 files changed, 0 insertions(+), 152 deletions(-)

diff --git a/include/GL/glfbdev.h b/include/GL/glfbdev.h
deleted file mode 100644
index 452a643..000
--- a/include/GL/glfbdev.h
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- * Mesa 3-D graphics library
- * Version:  6.5
- *
- * Copyright (C) 1999-2005  Brian Paul   All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-
-#ifndef GLFBDEV_H
-#define GLFBDEV_H
-
-
-/* for size_t */
-#include 
-
-/* avoid including linux/fb.h */
-struct fb_fix_screeninfo;
-struct fb_var_screeninfo;
-
-
-/* public types */
-typedef struct GLFBDevVisualRec *GLFBDevVisualPtr;
-typedef struct GLFBDevBufferRec *GLFBDevBufferPtr;
-typedef struct GLFBDevContextRec *GLFBDevContextPtr;
-
-
-/* API version */
-#define GLFBDEV_VERSION_1_0   1
-
-
-/* For glFBDevCreateVisual */
-#define GLFBDEV_DOUBLE_BUFFER   100
-#define GLFBDEV_COLOR_INDEX 101
-#define GLFBDEV_DEPTH_SIZE  102
-#define GLFBDEV_STENCIL_SIZE103
-#define GLFBDEV_ACCUM_SIZE  104
-#define GLFBDEV_LEVEL   105
-#define GLFBDEV_MULTISAMPLE 106
-#define GLFBDEV_NONE  0
-
-/* For glFBDevGetString */
-#define GLFBDEV_VERSION 200
-#define GLFBDEV_VENDOR  201
-
-
-/* Misc functions */
-
-extern const char *
-glFBDevGetString( int str );
-
-
-typedef void (*GLFBDevProc)();
-
-
-extern GLFBDevProc
-glFBDevGetProcAddress( const char *procName );
-
-
-
-/**
- * Create a GLFBDevVisual.
- * \param fixInfo - needed to get the visual types, etc.
- * \param varInfo - needed to get the bits_per_pixel, etc.
- * \param attribs - for requesting depth, stencil, accum buffers, etc.
- */
-extern GLFBDevVisualPtr
-glFBDevCreateVisual( const struct fb_fix_screeninfo *fixInfo,
- const struct fb_var_screeninfo *varInfo,
- const int *attribs );
-
-extern void
-glFBDevDestroyVisual( GLFBDevVisualPtr visual );
-
-extern int
-glFBDevGetVisualAttrib( const GLFBDevVisualPtr visual, int attrib);
-
-
-
-/**
- * Create a GLFBDevBuffer.
- * \param fixInfo, varInfo - needed in order to get the screen size
- * (resolution), etc.
- * \param visual - as returned by glFBDevCreateVisual()
- * \param frontBuffer - address of front color buffer
- * \param backBuffer - address of back color buffer (may be NULL)
- * \param size - size of the color buffer(s) in bytes.
- */
-extern GLFBDevBufferPtr
-glFBDevCreateBuffer( const struct fb_fix_screeninfo *fixInfo,
- const struct fb_var_screeninfo *varInfo,
- const GLFBDevVisualPtr visual,
- void *frontBuffer, void *backBuffer, size_t size );
-
-extern void
-glFBDevDestroyBuffer( GLFBDevBufferPtr buffer );
-
-extern int
-glFBDevGetBufferAttrib( const GLFBDevBufferPtr buffer, int attrib);
-
-extern GLFBDevBufferPtr
-glFBDevGetCurrentDrawBuffer( void );
-
-extern GLFBDevBufferPtr
-glFBDevGetCurrentReadBuffer( void );
-
-extern void
-glFBDevSwapBuffers( GLFBDevBufferPtr buffer );
-
-
-
-/**
- * Create a GLFBDevContext.
- * \param visual - as created by glFBDevCreateVisual.
- * \param share - specifies another context with which to share textures,
- * display lists, etc. (may be NULL).
- */
-extern GLFBDevContextPtr
-glFBDevCreateContext( const GLFBDevVisualPtr visual, GLFBDevContextPtr share );
-
-extern void
-glFBDevDestroyContext( GLFBDevContextPtr context );
-
-extern int
-glFBDevGetContextAttrib( const GLFBDevContextPtr context, int attrib);
-
-extern GLFBDevContextPtr
-glFBDevGetCurrentContext( void );
-
-extern int
-glFBDevMa

Mesa (master): Drop documentation references for deleted backends

2011-09-06 Thread Adam Jackson
Module: Mesa
Branch: master
Commit: f6f2f59818f2d70190f21de2f16ab6f617fa982a
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=f6f2f59818f2d70190f21de2f16ab6f617fa982a

Author: Adam Jackson 
Date:   Wed Jun 29 10:48:43 2011 -0400

Drop documentation references for deleted backends

Signed-off-by: Adam Jackson 

---

 docs/README.3DFX |  830 --
 docs/README.AMIWIN   |  181 ---
 docs/README.DJ   |  275 -
 docs/README.GGI  |   26 --
 docs/README.LYNXOS   |   64 
 docs/README.NeXT |6 -
 docs/README.OS2  |   96 --
 docs/README.OpenStep |   35 ---
 docs/README.WINDML   |  146 -
 docs/systems.html|   27 --
 10 files changed, 0 insertions(+), 1686 deletions(-)

Diff:   
http://cgit.freedesktop.org/mesa/mesa/diff/?id=f6f2f59818f2d70190f21de2f16ab6f617fa982a
___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): rtasm,translate: Disable on Mingw-w64.

2011-09-06 Thread Jose Fonseca
Module: Mesa
Branch: master
Commit: f4dd0991719ef3e2606920c5100b372181c60899
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=f4dd0991719ef3e2606920c5100b372181c60899

Author: José Fonseca 
Date:   Tue Sep  6 20:40:21 2011 +0100

rtasm,translate: Disable on Mingw-w64.

Causes crash and stack corruption.

Needs more investigation. Disable for now.

---

 src/gallium/auxiliary/rtasm/rtasm_x86sse.c  |2 +-
 src/gallium/auxiliary/translate/translate_sse.c |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/gallium/auxiliary/rtasm/rtasm_x86sse.c 
b/src/gallium/auxiliary/rtasm/rtasm_x86sse.c
index 5231bb0..cb88082 100644
--- a/src/gallium/auxiliary/rtasm/rtasm_x86sse.c
+++ b/src/gallium/auxiliary/rtasm/rtasm_x86sse.c
@@ -24,7 +24,7 @@
 #include "pipe/p_config.h"
 #include "util/u_cpu_detect.h"
 
-#if defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64)
+#if defined(PIPE_ARCH_X86) || (defined(PIPE_ARCH_X86_64) && 
!defined(__MINGW32__))
 
 #include "pipe/p_compiler.h"
 #include "util/u_debug.h"
diff --git a/src/gallium/auxiliary/translate/translate_sse.c 
b/src/gallium/auxiliary/translate/translate_sse.c
index c3d1566..8cb3fd6 100644
--- a/src/gallium/auxiliary/translate/translate_sse.c
+++ b/src/gallium/auxiliary/translate/translate_sse.c
@@ -35,7 +35,7 @@
 #include "translate.h"
 
 
-#if defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64)
+#if defined(PIPE_ARCH_X86) || (defined(PIPE_ARCH_X86_64) && 
!defined(__MINGW32__))
 
 #include "rtasm/rtasm_cpu.h"
 #include "rtasm/rtasm_x86sse.h"

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): docs: skeleton file for 7.12 release notes

2011-09-06 Thread Ian Romanick
Module: Mesa
Branch: master
Commit: 5812b24845a2c56b65e2459c9daf1c4c565710fc
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=5812b24845a2c56b65e2459c9daf1c4c565710fc

Author: Ian Romanick 
Date:   Wed Aug 31 13:20:00 2011 -0700

docs: skeleton file for 7.12 release notes

Current just the items that have been removed from Mesa are mentioned
in the release notes.

Reviewed-by: Brian Paul 
Reviewed-by: Kenneth Graunke 

---

 docs/relnotes-7.12.html |   64 +++
 docs/relnotes.html  |1 +
 2 files changed, 65 insertions(+), 0 deletions(-)

diff --git a/docs/relnotes-7.12.html b/docs/relnotes-7.12.html
new file mode 100644
index 000..ac20788
--- /dev/null
+++ b/docs/relnotes-7.12.html
@@ -0,0 +1,64 @@
+
+
+
+Mesa Release Notes
+
+
+
+
+
+
+
+
+Mesa 7.12 Release Notes / (release date TBD)
+
+
+Mesa 7.12 is a new development release.
+People who are concerned with stability and reliability should stick
+with a previous release or wait for Mesa 7.12.1.
+
+
+Mesa 7.12 implements the OpenGL 2.1 API, but the version reported by
+glGetString(GL_VERSION) depends on the particular driver being used.
+Some drivers don't support all the features required in OpenGL 2.1.
+
+
+See the Compiling/Installing page for prerequisites
+for DRI hardware acceleration.
+
+
+
+MD5 checksums
+
+tbd
+
+
+
+New features
+
+
+
+
+Bug fixes
+
+
+
+
+Changes
+
+Removed all DRI drivers that did not support DRI2.  Specifically,
+  i810, mach64, mga, r128, savage, sis, tdfx, and unichrome were
+  removed.
+Removed support for BeOS.
+Removed the obsolete (and unmaintained) Windows "gldirect" and
+  "ICD" drivers.
+Removed the linux-fbdev software driver.
+Removed all remnants of paletted texture support.  As required by
+  desktop OpenGL, GL_COLOR_INDEX data can still be uploaded
+  to a color (e.g., RGBA) texture.  However, the data cannot be stored
+  internally as color-index.
+
+
+
+
+
diff --git a/docs/relnotes.html b/docs/relnotes.html
index e1f0c32..7e02172 100644
--- a/docs/relnotes.html
+++ b/docs/relnotes.html
@@ -13,6 +13,7 @@ The release notes summarize what's new or changed in each 
Mesa release.
 
 
 
+7.12 release notes
 7.11 release notes
 7.10.3 release notes
 7.10.2 release notes

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): mesa: Remove support for unpacking from client memory to color-index pixels

2011-09-06 Thread Ian Romanick
Module: Mesa
Branch: master
Commit: 3602fbb201bdea158590692a3a7a7245e0ff69ce
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=3602fbb201bdea158590692a3a7a7245e0ff69ce

Author: Ian Romanick 
Date:   Mon Aug 29 14:33:51 2011 -0700

mesa: Remove support for unpacking from client memory to color-index pixels

Mesa hasn't supported color-index rendering for a long time.

Reviewed-by: Brian Paul 
Reviewed-by: Kenneth Graunke 

---

 src/mesa/main/pack.c |   52 +++--
 1 files changed, 12 insertions(+), 40 deletions(-)

diff --git a/src/mesa/main/pack.c b/src/mesa/main/pack.c
index 7de1d05..fd3f89d 100644
--- a/src/mesa/main/pack.c
+++ b/src/mesa/main/pack.c
@@ -3459,8 +3459,7 @@ _mesa_unpack_color_span_chan( struct gl_context *ctx,
   dstFormat == GL_RED ||
   dstFormat == GL_RG ||
   dstFormat == GL_RGB ||
-  dstFormat == GL_RGBA ||
-  dstFormat == GL_COLOR_INDEX);
+  dstFormat == GL_RGBA);
 
ASSERT(srcFormat == GL_RED ||
   srcFormat == GL_GREEN ||
@@ -3646,24 +3645,11 @@ _mesa_unpack_color_span_chan( struct gl_context *ctx,
  extract_uint_indexes(n, indexes, srcFormat, srcType, source,
   srcPacking);
 
- if (dstFormat == GL_COLOR_INDEX) {
-GLuint i;
-_mesa_apply_ci_transfer_ops(ctx, transferOps, n, indexes);
-/* convert to GLchan and return */
-for (i = 0; i < n; i++) {
-   dest[i] = (GLchan) (indexes[i] & 0xff);
-}
-free(indexes);
-free(rgba);
-return;
- }
- else {
-/* Convert indexes to RGBA */
-if (transferOps & IMAGE_SHIFT_OFFSET_BIT) {
-   _mesa_shift_and_offset_ci(ctx, n, indexes);
-}
-_mesa_map_ci_to_rgba(ctx, n, indexes, rgba);
- }
+/* Convert indexes to RGBA */
+if (transferOps & IMAGE_SHIFT_OFFSET_BIT) {
+   _mesa_shift_and_offset_ci(ctx, n, indexes);
+}
+_mesa_map_ci_to_rgba(ctx, n, indexes, rgba);
 
  /* Don't do RGBA scale/bias or RGBA->RGBA mapping if starting
   * with color indexes.
@@ -3773,8 +3759,7 @@ _mesa_unpack_color_span_float( struct gl_context *ctx,
   dstFormat == GL_RED ||
   dstFormat == GL_RG ||
   dstFormat == GL_RGB ||
-  dstFormat == GL_RGBA ||
-  dstFormat == GL_COLOR_INDEX);
+  dstFormat == GL_RGBA);
 
ASSERT(srcFormat == GL_RED ||
   srcFormat == GL_GREEN ||
@@ -3855,24 +3840,11 @@ _mesa_unpack_color_span_float( struct gl_context *ctx,
  extract_uint_indexes(n, indexes, srcFormat, srcType, source,
   srcPacking);
 
- if (dstFormat == GL_COLOR_INDEX) {
-GLuint i;
-_mesa_apply_ci_transfer_ops(ctx, transferOps, n, indexes);
-/* convert to GLchan and return */
-for (i = 0; i < n; i++) {
-   dest[i] = (GLchan) (indexes[i] & 0xff);
-}
-free(indexes);
-free(rgba);
-return;
- }
- else {
-/* Convert indexes to RGBA */
-if (transferOps & IMAGE_SHIFT_OFFSET_BIT) {
-   _mesa_shift_and_offset_ci(ctx, n, indexes);
-}
-_mesa_map_ci_to_rgba(ctx, n, indexes, rgba);
- }
+/* Convert indexes to RGBA */
+if (transferOps & IMAGE_SHIFT_OFFSET_BIT) {
+   _mesa_shift_and_offset_ci(ctx, n, indexes);
+}
+_mesa_map_ci_to_rgba(ctx, n, indexes, rgba);
 
  /* Don't do RGBA scale/bias or RGBA->RGBA mapping if starting
   * with color indexes.

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): swrast: Use GL_STENCIL_INDEX for address calculations

2011-09-06 Thread Ian Romanick
Module: Mesa
Branch: master
Commit: d7cb905a5a6e3ad7af1518d8e74620de729a2477
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=d7cb905a5a6e3ad7af1518d8e74620de729a2477

Author: Ian Romanick 
Date:   Mon Aug 29 14:06:00 2011 -0700

swrast: Use GL_STENCIL_INDEX for address calculations

GL_COLOR_INDEX produced the same result (because GL_BITMAP is always
used for stencil glDrawPixels), but it was confusing to read.  I spent
about 15 minutes wondering, "WTF?"

Reviewed-by: Brian Paul 
Reviewed-by: Kenneth Graunke 

---

 src/mesa/swrast/s_drawpix.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mesa/swrast/s_drawpix.c b/src/mesa/swrast/s_drawpix.c
index 11c6345..63bfa79 100644
--- a/src/mesa/swrast/s_drawpix.c
+++ b/src/mesa/swrast/s_drawpix.c
@@ -335,7 +335,7 @@ draw_stencil_pixels( struct gl_context *ctx, GLint x, GLint 
y,
  ? GL_UNSIGNED_BYTE : GL_UNSIGNED_SHORT;
  const GLvoid *source = _mesa_image_address2d(unpack, pixels,
   width, height,
-  GL_COLOR_INDEX, type,
+  GL_STENCIL_INDEX, type,
   row, skipPixels);
  _mesa_unpack_stencil_span(ctx, spanWidth, destType, values,
type, source, unpack,

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): mesa: Remove GL_COLOR_INDEX from base format assertions

2011-09-06 Thread Ian Romanick
Module: Mesa
Branch: master
Commit: 559241d48c01ad36e1ea18e6c44aa5bc587d3002
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=559241d48c01ad36e1ea18e6c44aa5bc587d3002

Author: Ian Romanick 
Date:   Mon Aug 29 13:34:52 2011 -0700

mesa: Remove GL_COLOR_INDEX from base format assertions

_mesa_make_temp_float_image can't work on color-index textures, but
there is no such thing as a color-index texture anymore.

Reviewed-by: Brian Paul 
Reviewed-by: Kenneth Graunke 

---

 src/mesa/main/texstore.c |2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c
index e9915a7..2cdc8ed 100644
--- a/src/mesa/main/texstore.c
+++ b/src/mesa/main/texstore.c
@@ -340,7 +340,6 @@ _mesa_make_temp_float_image(struct gl_context *ctx, GLuint 
dims,
   logicalBaseFormat == GL_LUMINANCE ||
   logicalBaseFormat == GL_ALPHA ||
   logicalBaseFormat == GL_INTENSITY ||
-  logicalBaseFormat == GL_COLOR_INDEX ||
   logicalBaseFormat == GL_DEPTH_COMPONENT);
 
ASSERT(textureBaseFormat == GL_RGBA ||
@@ -351,7 +350,6 @@ _mesa_make_temp_float_image(struct gl_context *ctx, GLuint 
dims,
   textureBaseFormat == GL_LUMINANCE ||
   textureBaseFormat == GL_ALPHA ||
   textureBaseFormat == GL_INTENSITY ||
-  textureBaseFormat == GL_COLOR_INDEX ||
   textureBaseFormat == GL_DEPTH_COMPONENT);
 
tempImage = (GLfloat *) malloc(srcWidth * srcHeight * srcDepth

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): mesa: Remove GL_COLOR_INDEX from _mesa_{dest, source}_buffer_exists

2011-09-06 Thread Ian Romanick
Module: Mesa
Branch: master
Commit: e174b5d4835c99d06fbffbacabe4ee1f467a09e0
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=e174b5d4835c99d06fbffbacabe4ee1f467a09e0

Author: Ian Romanick 
Date:   Mon Aug 29 13:59:49 2011 -0700

mesa: Remove GL_COLOR_INDEX from _mesa_{dest,source}_buffer_exists

Mesa hasn't supported color-index rendering for a long time.

Reviewed-by: Brian Paul 
Reviewed-by: Kenneth Graunke 

---

 src/mesa/main/framebuffer.c |2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/src/mesa/main/framebuffer.c b/src/mesa/main/framebuffer.c
index 23fa1b2..42da176 100644
--- a/src/mesa/main/framebuffer.c
+++ b/src/mesa/main/framebuffer.c
@@ -888,7 +888,6 @@ _mesa_source_buffer_exists(struct gl_context *ctx, GLenum 
format)
case GL_RGBA:
case GL_BGRA:
case GL_ABGR_EXT:
-   case GL_COLOR_INDEX:
case GL_RED_INTEGER_EXT:
case GL_GREEN_INTEGER_EXT:
case GL_BLUE_INTEGER_EXT:
@@ -976,7 +975,6 @@ _mesa_dest_buffer_exists(struct gl_context *ctx, GLenum 
format)
case GL_RGBA:
case GL_BGRA:
case GL_ABGR_EXT:
-   case GL_COLOR_INDEX:
case GL_RED_INTEGER_EXT:
case GL_GREEN_INTEGER_EXT:
case GL_BLUE_INTEGER_EXT:

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): swrast: Remove GL_COLOR_INDEX from assertions

2011-09-06 Thread Ian Romanick
Module: Mesa
Branch: master
Commit: ede7d9fff504db3a4790b0e55d247f85ef22d045
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=ede7d9fff504db3a4790b0e55d247f85ef22d045

Author: Ian Romanick 
Date:   Mon Aug 29 13:30:46 2011 -0700

swrast: Remove GL_COLOR_INDEX from assertions

These sampling functions don't work on color-index textures, but there
is no such thing as a color-index texture anymore.

Reviewed-by: Brian Paul 
Reviewed-by: Kenneth Graunke 

---

 src/mesa/swrast/s_texfilter.c |4 
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/src/mesa/swrast/s_texfilter.c b/src/mesa/swrast/s_texfilter.c
index e17a7aa..ad31e37 100644
--- a/src/mesa/swrast/s_texfilter.c
+++ b/src/mesa/swrast/s_texfilter.c
@@ -1168,7 +1168,6 @@ sample_2d_linear_repeat(struct gl_context *ctx,
ASSERT(tObj->Sampler.WrapS == GL_REPEAT);
ASSERT(tObj->Sampler.WrapT == GL_REPEAT);
ASSERT(img->Border == 0);
-   ASSERT(img->_BaseFormat != GL_COLOR_INDEX);
ASSERT(img->_IsPowerOfTwo);
 
linear_repeat_texel_location(width,  texcoord[0], &i0, &i1, &wi);
@@ -1431,7 +1430,6 @@ sample_lambda_2d(struct gl_context *ctx,
const GLboolean repeatNoBorderPOT = (tObj->Sampler.WrapS == GL_REPEAT)
   && (tObj->Sampler.WrapT == GL_REPEAT)
   && (tImg->Border == 0 && (tImg->Width == tImg->RowStride))
-  && (tImg->_BaseFormat != GL_COLOR_INDEX)
   && tImg->_IsPowerOfTwo;
 
ASSERT(lambda != NULL);
@@ -2559,7 +2557,6 @@ sample_nearest_rect(struct gl_context *ctx,
ASSERT(tObj->Sampler.WrapT == GL_CLAMP ||
   tObj->Sampler.WrapT == GL_CLAMP_TO_EDGE ||
   tObj->Sampler.WrapT == GL_CLAMP_TO_BORDER);
-   ASSERT(img->_BaseFormat != GL_COLOR_INDEX);
 
for (i = 0; i < n; i++) {
   GLint row, col;
@@ -2593,7 +2590,6 @@ sample_linear_rect(struct gl_context *ctx,
ASSERT(tObj->Sampler.WrapT == GL_CLAMP ||
   tObj->Sampler.WrapT == GL_CLAMP_TO_EDGE ||
   tObj->Sampler.WrapT == GL_CLAMP_TO_BORDER);
-   ASSERT(img->_BaseFormat != GL_COLOR_INDEX);
 
for (i = 0; i < n; i++) {
   GLint i0, j0, i1, j1;

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): mesa: Remove unused struct gl_color_table

2011-09-06 Thread Ian Romanick
Module: Mesa
Branch: master
Commit: 960f37a57a7fcbac213c0b4fb0daf2285a64bf97
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=960f37a57a7fcbac213c0b4fb0daf2285a64bf97

Author: Ian Romanick 
Date:   Mon Aug 29 11:39:20 2011 -0700

mesa: Remove unused struct gl_color_table

Reviewed-by: Brian Paul 
Reviewed-by: Kenneth Graunke 

---

 src/mesa/main/colortab.h |1 -
 src/mesa/main/mtypes.h   |   19 ---
 2 files changed, 0 insertions(+), 20 deletions(-)

diff --git a/src/mesa/main/colortab.h b/src/mesa/main/colortab.h
index 3bc2066..b0d2b5d 100644
--- a/src/mesa/main/colortab.h
+++ b/src/mesa/main/colortab.h
@@ -32,7 +32,6 @@
 #include "mfeatures.h"
 
 struct _glapi_table;
-struct gl_color_table;
 
 #if FEATURE_colortable
 
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index b7d4ce1..129403c 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -565,25 +565,6 @@ struct gl_config
 
 
 /**
- * Data structure for color tables
- */
-struct gl_color_table
-{
-   GLenum InternalFormat;  /**< The user-specified format */
-   GLenum _BaseFormat; /**< GL_ALPHA, GL_RGBA, GL_RGB, etc */
-   GLuint Size;/**< number of entries in table */
-   GLfloat *TableF;/**< Color table, floating point values */
-   GLubyte *TableUB;   /**< Color table, ubyte values */
-   GLubyte RedSize;
-   GLubyte GreenSize;
-   GLubyte BlueSize;
-   GLubyte AlphaSize;
-   GLubyte LuminanceSize;
-   GLubyte IntensitySize;
-};
-
-
-/**
  * \name Bit flags used for updating material values.
  */
 /*@{*/

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): mesa: Remove unused functions _mesa_lookup_rgba_{float, ubyte}

2011-09-06 Thread Ian Romanick
Module: Mesa
Branch: master
Commit: 81a6cf9ddf5ab7e1c35cf99c28cc7fad808230ef
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=81a6cf9ddf5ab7e1c35cf99c28cc7fad808230ef

Author: Ian Romanick 
Date:   Mon Aug 29 11:38:55 2011 -0700

mesa: Remove unused functions _mesa_lookup_rgba_{float,ubyte}

Reviewed-by: Brian Paul 
Reviewed-by: Kenneth Graunke 

---

 src/mesa/main/pixeltransfer.c |  261 -
 src/mesa/main/pixeltransfer.h |9 --
 2 files changed, 0 insertions(+), 270 deletions(-)

diff --git a/src/mesa/main/pixeltransfer.c b/src/mesa/main/pixeltransfer.c
index c183297..5e88143 100644
--- a/src/mesa/main/pixeltransfer.c
+++ b/src/mesa/main/pixeltransfer.c
@@ -100,267 +100,6 @@ _mesa_map_rgba( const struct gl_context *ctx, GLuint n, 
GLfloat rgba[][4] )
}
 }
 
-/**
- * Apply a color table lookup to an array of floating point RGBA colors.
- */
-void
-_mesa_lookup_rgba_float(const struct gl_color_table *table,
-GLuint n, GLfloat rgba[][4])
-{
-   const GLint max = table->Size - 1;
-   const GLfloat scale = (GLfloat) max;
-   const GLfloat *lut = table->TableF;
-   GLuint i;
-
-   if (!table->TableF || table->Size == 0)
-  return;
-
-   switch (table->_BaseFormat) {
-  case GL_INTENSITY:
- /* replace RGBA with I */
- for (i = 0; i < n; i++) {
-GLint j = IROUND(rgba[i][RCOMP] * scale);
-GLfloat c = lut[CLAMP(j, 0, max)];
-rgba[i][RCOMP] =
-rgba[i][GCOMP] =
-rgba[i][BCOMP] =
-rgba[i][ACOMP] = c;
- }
- break;
-  case GL_LUMINANCE:
- /* replace RGB with L */
- for (i = 0; i < n; i++) {
-GLint j = IROUND(rgba[i][RCOMP] * scale);
-GLfloat c = lut[CLAMP(j, 0, max)];
-rgba[i][RCOMP] =
-rgba[i][GCOMP] =
-rgba[i][BCOMP] = c;
- }
- break;
-  case GL_ALPHA:
- /* replace A with A */
- for (i = 0; i < n; i++) {
-GLint j = IROUND(rgba[i][ACOMP] * scale);
-rgba[i][ACOMP] = lut[CLAMP(j, 0, max)];
- }
- break;
-  case GL_LUMINANCE_ALPHA:
- /* replace RGBA with LLLA */
- for (i = 0; i < n; i++) {
-GLint jL = IROUND(rgba[i][RCOMP] * scale);
-GLint jA = IROUND(rgba[i][ACOMP] * scale);
-GLfloat luminance, alpha;
-jL = CLAMP(jL, 0, max);
-jA = CLAMP(jA, 0, max);
-luminance = lut[jL * 2 + 0];
-alpha = lut[jA * 2 + 1];
-rgba[i][RCOMP] =
-rgba[i][GCOMP] =
-rgba[i][BCOMP] = luminance;
-rgba[i][ACOMP] = alpha;;
- }
- break;
-  case GL_RED:
- /* replace RGB with RGB */
- for (i = 0; i < n; i++) {
-GLint jR = IROUND(rgba[i][RCOMP] * scale);
-jR = CLAMP(jR, 0, max);
-rgba[i][RCOMP] = lut[jR * 3 + 0];
- }
- break;
-  case GL_RG:
- /* replace RG with RG */
- for (i = 0; i < n; i++) {
-GLint jR = IROUND(rgba[i][RCOMP] * scale);
-GLint jG = IROUND(rgba[i][GCOMP] * scale);
-jR = CLAMP(jR, 0, max);
-jG = CLAMP(jG, 0, max);
-rgba[i][RCOMP] = lut[jR * 3 + 0];
-rgba[i][GCOMP] = lut[jG * 3 + 1];
- }
- break;
-  case GL_RGB:
- /* replace RGB with RGB */
- for (i = 0; i < n; i++) {
-GLint jR = IROUND(rgba[i][RCOMP] * scale);
-GLint jG = IROUND(rgba[i][GCOMP] * scale);
-GLint jB = IROUND(rgba[i][BCOMP] * scale);
-jR = CLAMP(jR, 0, max);
-jG = CLAMP(jG, 0, max);
-jB = CLAMP(jB, 0, max);
-rgba[i][RCOMP] = lut[jR * 3 + 0];
-rgba[i][GCOMP] = lut[jG * 3 + 1];
-rgba[i][BCOMP] = lut[jB * 3 + 2];
- }
- break;
-  case GL_RGBA:
- /* replace RGBA with RGBA */
- for (i = 0; i < n; i++) {
-GLint jR = IROUND(rgba[i][RCOMP] * scale);
-GLint jG = IROUND(rgba[i][GCOMP] * scale);
-GLint jB = IROUND(rgba[i][BCOMP] * scale);
-GLint jA = IROUND(rgba[i][ACOMP] * scale);
-jR = CLAMP(jR, 0, max);
-jG = CLAMP(jG, 0, max);
-jB = CLAMP(jB, 0, max);
-jA = CLAMP(jA, 0, max);
-rgba[i][RCOMP] = lut[jR * 4 + 0];
-rgba[i][GCOMP] = lut[jG * 4 + 1];
-rgba[i][BCOMP] = lut[jB * 4 + 2];
-rgba[i][ACOMP] = lut[jA * 4 + 3];
- }
- break;
-  default:
- _mesa_problem(NULL, "Bad format in _mesa_lookup_rgba_float");
- return;
-   }
-}
-
-
-
-/**
- * Apply a color table lookup to an array of ubyte/RGBA colors.
- */
-void
-_mesa_lookup_rgba_ubyte(const struct gl_color_table *table,
-GLuint n, GLubyte rgba[][4])
-{
-   const GLubyte *lut = table->TableUB;

Mesa (master): mesa: Remove all mention of GL_COLOR_INDEX*_EXT

2011-09-06 Thread Ian Romanick
Module: Mesa
Branch: master
Commit: 0b6dd750584c8e03aa14968d6efdf393e7c8c8f0
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=0b6dd750584c8e03aa14968d6efdf393e7c8c8f0

Author: Ian Romanick 
Date:   Mon Aug 29 09:49:04 2011 -0700

mesa: Remove all mention of GL_COLOR_INDEX*_EXT

These enums were only valid with the paletted texture extensions.
This allows a couple other trivial clean-ups.

Reviewed-by: Brian Paul 
Reviewed-by: Kenneth Graunke 

---

 src/mesa/main/image.c   |   27 ---
 src/mesa/main/image.h   |3 ---
 src/mesa/main/texgetimage.c |8 ++--
 3 files changed, 2 insertions(+), 36 deletions(-)

diff --git a/src/mesa/main/image.c b/src/mesa/main/image.c
index 37127dc..3e75e7c 100644
--- a/src/mesa/main/image.c
+++ b/src/mesa/main/image.c
@@ -249,12 +249,6 @@ _mesa_components_in_format( GLenum format )
 {
switch (format) {
   case GL_COLOR_INDEX:
-  case GL_COLOR_INDEX1_EXT:
-  case GL_COLOR_INDEX2_EXT:
-  case GL_COLOR_INDEX4_EXT:
-  case GL_COLOR_INDEX8_EXT:
-  case GL_COLOR_INDEX12_EXT:
-  case GL_COLOR_INDEX16_EXT:
   case GL_STENCIL_INDEX:
   case GL_DEPTH_COMPONENT:
   case GL_RED:
@@ -863,27 +857,6 @@ _mesa_is_color_format(GLenum format)
 
 
 /**
- * Test if the given image format is a color index format.
- */
-GLboolean
-_mesa_is_index_format(GLenum format)
-{
-   switch (format) {
-  case GL_COLOR_INDEX:
-  case GL_COLOR_INDEX1_EXT:
-  case GL_COLOR_INDEX2_EXT:
-  case GL_COLOR_INDEX4_EXT:
-  case GL_COLOR_INDEX8_EXT:
-  case GL_COLOR_INDEX12_EXT:
-  case GL_COLOR_INDEX16_EXT:
- return GL_TRUE;
-  default:
- return GL_FALSE;
-   }
-}
-
-
-/**
  * Test if the given image format is a depth component format.
  */
 GLboolean
diff --git a/src/mesa/main/image.h b/src/mesa/main/image.h
index 005fbcc..46adaec 100644
--- a/src/mesa/main/image.h
+++ b/src/mesa/main/image.h
@@ -61,9 +61,6 @@ extern GLboolean
 _mesa_is_color_format(GLenum format);
 
 extern GLboolean
-_mesa_is_index_format(GLenum format);
-
-extern GLboolean
 _mesa_is_depth_format(GLenum format);
 
 extern GLboolean
diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetimage.c
index a64e1a0..99ace91 100644
--- a/src/mesa/main/texgetimage.c
+++ b/src/mesa/main/texgetimage.c
@@ -515,16 +515,12 @@ getteximage_error_check(struct gl_context *ctx, GLenum 
target, GLint level,
}
 
if (_mesa_components_in_format(format) <= 0 ||
-   format == GL_STENCIL_INDEX) {
+   format == GL_STENCIL_INDEX ||
+   format == GL_COLOR_INDEX) {
   _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexImage(format)" );
   return GL_TRUE;
}
 
-   if (_mesa_is_index_format(format)) {
-  _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexImage(format)");
-  return GL_TRUE;
-   }
-
if (!ctx->Extensions.ARB_depth_texture && _mesa_is_depth_format(format)) {
   _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexImage(format)");
   return GL_TRUE;

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): mesa: Remove dd_function_table::CopyColorTable, :: CopyColorSubTable, and ::UpdateTexturePalette

2011-09-06 Thread Ian Romanick
Module: Mesa
Branch: master
Commit: eb805a518216ae61317e7eef78a0b2c692c10eae
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=eb805a518216ae61317e7eef78a0b2c692c10eae

Author: Ian Romanick 
Date:   Mon Aug 29 09:38:09 2011 -0700

mesa: Remove dd_function_table::CopyColorTable, ::CopyColorSubTable, and 
::UpdateTexturePalette

There's nothing left that can call any of these functions.  This also
removes the meta-ops code that implemented the first two.

Reviewed-by: Brian Paul 
Reviewed-by: Kenneth Graunke 

---

 src/mesa/drivers/common/driverfuncs.c |5 ---
 src/mesa/drivers/common/meta.c|   55 -
 src/mesa/drivers/common/meta.h|   20 
 src/mesa/main/dd.h|   23 --
 4 files changed, 0 insertions(+), 103 deletions(-)

diff --git a/src/mesa/drivers/common/driverfuncs.c 
b/src/mesa/drivers/common/driverfuncs.c
index 78caa05..6484d28 100644
--- a/src/mesa/drivers/common/driverfuncs.c
+++ b/src/mesa/drivers/common/driverfuncs.c
@@ -118,11 +118,6 @@ _mesa_init_driver_functions(struct dd_function_table 
*driver)
driver->UnmapTexture = NULL;
driver->TextureMemCpy = memcpy;
driver->IsTextureResident = NULL;
-   driver->UpdateTexturePalette = NULL;
-
-   /* imaging */
-   driver->CopyColorTable = _mesa_meta_CopyColorTable;
-   driver->CopyColorSubTable = _mesa_meta_CopyColorSubTable;
 
/* Vertex/fragment programs */
driver->BindProgram = NULL;
diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c
index 291d912..ad04d36 100644
--- a/src/mesa/drivers/common/meta.c
+++ b/src/mesa/drivers/common/meta.c
@@ -2939,58 +2939,3 @@ _mesa_meta_CopyTexSubImage3D(struct gl_context *ctx, 
GLenum target, GLint level,
copy_tex_sub_image(ctx, 3, target, level, xoffset, yoffset, zoffset,
   x, y, width, height);
 }
-
-
-void
-_mesa_meta_CopyColorTable(struct gl_context *ctx,
-  GLenum target, GLenum internalformat,
-  GLint x, GLint y, GLsizei width)
-{
-   GLfloat *buf;
-
-   buf = (GLfloat *) malloc(width * 4 * sizeof(GLfloat));
-   if (!buf) {
-  _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCopyColorTable");
-  return;
-   }
-
-   /*
-* Read image from framebuffer (disable pixel transfer ops)
-*/
-   _mesa_meta_begin(ctx, MESA_META_PIXEL_STORE | MESA_META_PIXEL_TRANSFER);
-   ctx->Driver.ReadPixels(ctx, x, y, width, 1,
-  GL_RGBA, GL_FLOAT, &ctx->Pack, buf);
-
-   _mesa_ColorTable(target, internalformat, width, GL_RGBA, GL_FLOAT, buf);
-
-   _mesa_meta_end(ctx);
-
-   free(buf);
-}
-
-
-void
-_mesa_meta_CopyColorSubTable(struct gl_context *ctx,GLenum target, GLsizei 
start,
- GLint x, GLint y, GLsizei width)
-{
-   GLfloat *buf;
-
-   buf = (GLfloat *) malloc(width * 4 * sizeof(GLfloat));
-   if (!buf) {
-  _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCopyColorSubTable");
-  return;
-   }
-
-   /*
-* Read image from framebuffer (disable pixel transfer ops)
-*/
-   _mesa_meta_begin(ctx, MESA_META_PIXEL_STORE | MESA_META_PIXEL_TRANSFER);
-   ctx->Driver.ReadPixels(ctx, x, y, width, 1,
-  GL_RGBA, GL_FLOAT, &ctx->Pack, buf);
-
-   _mesa_ColorSubTable(target, start, width, GL_RGBA, GL_FLOAT, buf);
-
-   _mesa_meta_end(ctx);
-
-   free(buf);
-}
diff --git a/src/mesa/drivers/common/meta.h b/src/mesa/drivers/common/meta.h
index ac20e37..9a92613 100644
--- a/src/mesa/drivers/common/meta.h
+++ b/src/mesa/drivers/common/meta.h
@@ -121,24 +121,4 @@ _mesa_meta_CopyTexSubImage3D(struct gl_context *ctx, 
GLenum target, GLint level,
  GLint x, GLint y,
  GLsizei width, GLsizei height);
 
-extern void
-_mesa_meta_CopyColorTable(struct gl_context *ctx,
-  GLenum target, GLenum internalformat,
-  GLint x, GLint y, GLsizei width);
-
-extern void
-_mesa_meta_CopyColorSubTable(struct gl_context *ctx,GLenum target, GLsizei 
start,
- GLint x, GLint y, GLsizei width);
-
-extern void
-_mesa_meta_CopyConvolutionFilter1D(struct gl_context *ctx, GLenum target,
-   GLenum internalFormat,
-   GLint x, GLint y, GLsizei width);
-
-extern void
-_mesa_meta_CopyConvolutionFilter2D(struct gl_context *ctx, GLenum target,
-   GLenum internalFormat, GLint x, GLint y,
-   GLsizei width, GLsizei height);
-
-
 #endif /* META_H */
diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h
index b9305ad..b77e4f0 100644
--- a/src/mesa/main/dd.h
+++ b/src/mesa/main/dd.h
@@ -523,29 +523,6 @@ struct dd_function_table {
 */
GLboolean (*IsTextureResident)( struct gl_context *ctx,
struct gl_texture_object *t );
-
-   /**
-* Called when the texture's color lookup table is changed.

Mesa (master): mesa: Remove API facing bits of EXT_paletted_texture and EXT_shared_texture_palette

2011-09-06 Thread Ian Romanick
Module: Mesa
Branch: master
Commit: eba527bf9ffc2fd67c44fb77104107556f509b49
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=eba527bf9ffc2fd67c44fb77104107556f509b49

Author: Ian Romanick 
Date:   Mon Aug 29 09:37:24 2011 -0700

mesa: Remove API facing bits of EXT_paletted_texture and 
EXT_shared_texture_palette

This was also discussed at XDS 2010.  However, actually making the
change was delayed because several drivers still exposed these
extensions to significant benefit (e.g., tdfx).  Now that those
drivers have been removed, this code can be removed as well.

v2: A lot of bits that were missed in the previous patch have been removed.

Reviewed-by: Brian Paul 
Reviewed-by: Kenneth Graunke 

---

 src/mesa/main/colortab.c|  689 +--
 src/mesa/main/colortab.h|7 -
 src/mesa/main/enable.c  |8 -
 src/mesa/main/extensions.c  |4 -
 src/mesa/main/formats.c |1 -
 src/mesa/main/get.c |1 -
 src/mesa/main/mtypes.h  |   18 +-
 src/mesa/main/texformat.c   |7 -
 src/mesa/main/texgetimage.c |   65 +
 src/mesa/main/teximage.c|   25 +--
 src/mesa/main/texobj.c  |3 -
 src/mesa/main/texparam.c|6 -
 src/mesa/main/texstate.c|   10 +-
 13 files changed, 27 insertions(+), 817 deletions(-)

diff --git a/src/mesa/main/colortab.c b/src/mesa/main/colortab.c
index ddb0f1f..f20dee6 100644
--- a/src/mesa/main/colortab.c
+++ b/src/mesa/main/colortab.c
@@ -41,361 +41,14 @@
 
 #if FEATURE_colortable
 
-
-/**
- * Given an internalFormat token passed to glColorTable,
- * return the corresponding base format.
- * Return -1 if invalid token.
- */
-static GLint
-base_colortab_format( GLenum format )
-{
-   switch (format) {
-  case GL_ALPHA:
-  case GL_ALPHA4:
-  case GL_ALPHA8:
-  case GL_ALPHA12:
-  case GL_ALPHA16:
- return GL_ALPHA;
-  case GL_LUMINANCE:
-  case GL_LUMINANCE4:
-  case GL_LUMINANCE8:
-  case GL_LUMINANCE12:
-  case GL_LUMINANCE16:
- return GL_LUMINANCE;
-  case GL_LUMINANCE_ALPHA:
-  case GL_LUMINANCE4_ALPHA4:
-  case GL_LUMINANCE6_ALPHA2:
-  case GL_LUMINANCE8_ALPHA8:
-  case GL_LUMINANCE12_ALPHA4:
-  case GL_LUMINANCE12_ALPHA12:
-  case GL_LUMINANCE16_ALPHA16:
- return GL_LUMINANCE_ALPHA;
-  case GL_INTENSITY:
-  case GL_INTENSITY4:
-  case GL_INTENSITY8:
-  case GL_INTENSITY12:
-  case GL_INTENSITY16:
- return GL_INTENSITY;
-  case GL_RGB:
-  case GL_R3_G3_B2:
-  case GL_RGB4:
-  case GL_RGB5:
-  case GL_RGB8:
-  case GL_RGB10:
-  case GL_RGB12:
-  case GL_RGB16:
- return GL_RGB;
-  case GL_RGBA:
-  case GL_RGBA2:
-  case GL_RGBA4:
-  case GL_RGB5_A1:
-  case GL_RGBA8:
-  case GL_RGB10_A2:
-  case GL_RGBA12:
-  case GL_RGBA16:
- return GL_RGBA;
-  default:
- return -1;  /* error */
-   }
-}
-
-
-
-/**
- * Examine table's format and set the component sizes accordingly.
- */
-static void
-set_component_sizes( struct gl_color_table *table )
-{
-   /* assuming the ubyte table */
-   const GLubyte sz = 8;
-
-   switch (table->_BaseFormat) {
-  case GL_ALPHA:
- table->RedSize = 0;
- table->GreenSize = 0;
- table->BlueSize = 0;
- table->AlphaSize = sz;
- table->IntensitySize = 0;
- table->LuminanceSize = 0;
- break;
-  case GL_LUMINANCE:
- table->RedSize = 0;
- table->GreenSize = 0;
- table->BlueSize = 0;
- table->AlphaSize = 0;
- table->IntensitySize = 0;
- table->LuminanceSize = sz;
- break;
-  case GL_LUMINANCE_ALPHA:
- table->RedSize = 0;
- table->GreenSize = 0;
- table->BlueSize = 0;
- table->AlphaSize = sz;
- table->IntensitySize = 0;
- table->LuminanceSize = sz;
- break;
-  case GL_INTENSITY:
- table->RedSize = 0;
- table->GreenSize = 0;
- table->BlueSize = 0;
- table->AlphaSize = 0;
- table->IntensitySize = sz;
- table->LuminanceSize = 0;
- break;
-  case GL_RGB:
- table->RedSize = sz;
- table->GreenSize = sz;
- table->BlueSize = sz;
- table->AlphaSize = 0;
- table->IntensitySize = 0;
- table->LuminanceSize = 0;
- break;
-  case GL_RGBA:
- table->RedSize = sz;
- table->GreenSize = sz;
- table->BlueSize = sz;
- table->AlphaSize = sz;
- table->IntensitySize = 0;
- table->LuminanceSize = 0;
- break;
-  default:
- _mesa_problem(NULL, "unexpected format in set_component_sizes");
-   }
-}
-
-
-
-/**
- * Update/replace all or part of a color table.  Helper function
- * used by _mesa_ColorTable() and _mesa_ColorSubTable().
- * The table->Table buffer should already be allocated.
- * \param start first entry to update
- * \par

Mesa (master): 38 new commits

2011-09-06 Thread Paul Berry
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=becd54eedb26ec9076e6f5f98f485861b3e13a90
Author: Paul Berry 
Date:   Sat Sep 3 08:42:28 2011 -0700

i965: Remove two_side_color from brw_compute_vue_map().

Since we now lay out the VUE the same way regardless of whether
two-sided color is enabled, brw_compute_vue_map() no longer needs to
know whether two-sided color is enabled.  This allows the two-sided
color flag to be removed from the clip, GS, and VS keys, so that fewer
GPU programs need to be recompiled when turning two-sided color on and
off.

Reviewed-by: Eric Anholt 

URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=f2b09257ba04a8f50c58e208ca8ab66cfa362298
Author: Paul Berry 
Date:   Sat Sep 3 08:23:27 2011 -0700

i965: For GEN6+, always make front/back colors adjacent in VUE.

When doing two-sided color on GEN6+, we use the SF unit's
INPUTATTR_FACING mode to cause front colors to be used on front-facing
triangles, and back colors to be used on back-facing triangles.  This
mode requires that the front and back colors be adjacent in the VUE.

Previously, we would only place front and back colors adjacent in the
VUE when two-sided color was enabled.  Now we place them adjacent in
the VUE whether two-sided color is enabled or not.  (We still only
swizzle the colors when two-sided color is enabled, so there should be
no user-visible change).

This simplifies the implementation of the VUE map and reduces the
amount of code that is dependent on two-sided color mode.

Reviewed-by: Eric Anholt 

URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=18dcda2dcff0ba49cf35656bb8936e3edd61c90d
Author: Paul Berry 
Date:   Tue Aug 30 10:54:14 2011 -0700

i965: GS: Use the VUE map to compute URB size.

The previous computation had two bugs: (a) it used a formula based on
Gen5 for Gen6 and Gen7 as well. (b) it failed to account for the fact
that PSIZ is stored in the VUE header.  Fortunately, both bugs caused
it to compute a URB size that was too large, which was benign.  This
patch computes the URB size directly from the VUE map, so it gets the
result correct in all circumstances.

Reviewed-by: Eric Anholt 

URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=78be5bcb222d379a07979de98ff5b9e3549de6a7
Author: Paul Berry 
Date:   Fri Aug 26 09:30:35 2011 -0700

i965: clip: Remove no-longer-needed variables.

The variables offset[], idx_to_attr[], nr_bytes, nr_attrs, and
header_regs were all serving purposes which are now served by the VUE
map.

Reviewed-by: Eric Anholt 

URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=4efb32c642507228d5bfebbd6d403dd9944f9b7c
Author: Paul Berry 
Date:   Fri Aug 26 12:17:56 2011 -0700

i965: clip: Remove assumption about VUE header from brw_clip_interp_vertex()

Previously, brw_clip_interp_vertex() iterated only through the
"non-header" elements of the VUE when performing interpolation
(because header elements don't need interpolation).  This code now
refers exclusively to the VUE map to figure out which elements need
interpolation, so that brw_clip_interp_vertex() doesn't need to know
the header size.

Reviewed-by: Eric Anholt 

URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=71cb82f63ab156599613f7555a62ad52d2e3dbd7
Author: Paul Berry 
Date:   Fri Aug 26 12:08:43 2011 -0700

i965: clip: Change computation of nr_regs to use VUE map.

Reviewed-by: Eric Anholt 

URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=2ef1fa6b3c8d52e059bf6ccf519c45604962b27c
Author: Paul Berry 
Date:   Wed Aug 31 15:34:01 2011 -0700

i965: clip: Convert computations to ..._to_offset() for clarity.

This patch replaces some ad-hoc computations using ATTR_SIZE and the
offset[] array to use the VUE map functions
brw_vert_result_to_offset() and brw_vue_slot_to_offset().

Reviewed-by: Eric Anholt 

URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=54a62f8806df29d79f1e630bae6d1f45fb15c69f
Author: Paul Berry 
Date:   Thu Aug 25 13:27:57 2011 -0700

i965: clip: Add a function to determine whether a vert_result is in use.

Previously we would examine the offset[] array (since an offset of 0
meant "not in use").  This paves the way for removing the offset[]
array.

Reviewed-by: Eric Anholt 

URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=620f06b12600d509406543738ed8bff27715df2c
Author: Paul Berry 
Date:   Thu Aug 25 11:14:47 2011 -0700

i965: clip: Rework brw_clip_interp_vertex() to use the VUE map.

Reviewed-by: Eric Anholt 

URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=c46be4273cf392a8ea53dc95881ea1e4452170b1
Author: Paul Berry 
Date:   Thu Aug 25 10:42:29 2011 -0700

i965: clip: Modify brw_clip_interp_vertex() to use the VUE map.

   

Demos (master): egl/opengl: fix build with cmake

2011-09-06 Thread Marcin Ślusarz
Module: Demos
Branch: master
Commit: e877df6a24b86a8effaedf8fa92390c437eb44f3
URL:
http://cgit.freedesktop.org/mesa/demos/commit/?id=e877df6a24b86a8effaedf8fa92390c437eb44f3

Author: Marcin Slusarz 
Date:   Tue Sep  6 20:20:17 2011 +0200

egl/opengl: fix build with cmake

---

 src/egl/opengl/CMakeLists.txt |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/egl/opengl/CMakeLists.txt b/src/egl/opengl/CMakeLists.txt
index ede9ec3..a8b9d02 100644
--- a/src/egl/opengl/CMakeLists.txt
+++ b/src/egl/opengl/CMakeLists.txt
@@ -1,5 +1,6 @@
 include_directories(${EGL_INCLUDE_DIR}
   ../eglut
+  ../../util
   )
 
 add_executable(eglinfo eglinfo.c)

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (map-texture-image-v5): mesa: pass linear-ized texture format to _mesa_unpack_rgba_row()

2011-09-06 Thread Brian Paul
Module: Mesa
Branch: map-texture-image-v5
Commit: 519acceab47574a4782878dd751e751da672a572
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=519acceab47574a4782878dd751e751da672a572

Author: Brian Paul 
Date:   Tue Sep  6 11:32:13 2011 -0600

mesa: pass linear-ized texture format to _mesa_unpack_rgba_row()

Fixes glean texture_srgb failure.

---

 src/mesa/main/texgetimage.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetimage.c
index 16316d6..b152cc3 100644
--- a/src/mesa/main/texgetimage.c
+++ b/src/mesa/main/texgetimage.c
@@ -318,7 +318,7 @@ get_tex_rgba(struct gl_context *ctx, GLuint dimensions,
(texImage->ImageOffsets[img] +
 texImage->RowStride * row) * texelSize;
 
-_mesa_unpack_rgba_row(texImage->TexFormat, width, src, rgba);
+_mesa_unpack_rgba_row(texFormat, width, src, rgba);
 
 if (texImage->_BaseFormat == GL_ALPHA) {
GLint col;

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): docs: more info about non-subscriber list postings

2011-09-06 Thread Brian Paul
Module: Mesa
Branch: master
Commit: afaf024f57bebc112599a4a4571776d94f3df289
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=afaf024f57bebc112599a4a4571776d94f3df289

Author: Brian Paul 
Date:   Tue Sep  6 09:19:36 2011 -0600

docs: more info about non-subscriber list postings

---

 docs/lists.html |   11 +++
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/docs/lists.html b/docs/lists.html
index 1487891..033b0b7 100644
--- a/docs/lists.html
+++ b/docs/lists.html
@@ -37,6 +37,13 @@ versions are sent to this list.  Very low traffic.
 
 
 
+NOTE: You must subscribe to these lists in order to post to them.
+If you try to post to a list and you're not a subscriber (or if you try to post
+from a different email address than you subscribed with) your posting will be
+held for an indefinite period or may be discarded entirely.
+
+
+
 Follow the links above for list archives.
 
 
@@ -55,10 +62,6 @@ kernels, see the
 DRI wiki.
 
 
-
-Notice: You must subscribe to these lists in order to post to them.
-
-
 
 
 

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit



Mesa (master): docs: update link, remove dead links

2011-09-06 Thread Brian Paul
Module: Mesa
Branch: master
Commit: 2efc093d2c55be85cf3821aa4aa491557da3b028
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=2efc093d2c55be85cf3821aa4aa491557da3b028

Author: Brian Paul 
Date:   Tue Sep  6 08:40:53 2011 -0600

docs: update link, remove dead links

---

 docs/games.html |3 +--
 docs/libraries.html |3 +--
 docs/modelers.html  |5 -
 docs/science.html   |7 ++-
 docs/utility.html   |3 ---
 5 files changed, 4 insertions(+), 17 deletions(-)

diff --git a/docs/games.html b/docs/games.html
index dcf5cf2..82e3d09 100644
--- a/docs/games.html
+++ b/docs/games.html
@@ -29,7 +29,6 @@
simulator
http://freetrek.linuxgames.com/"; 
target="_parent">Free Trek - Star
Trek battle simulator
-   http://mesa3d.sourceforge.net/notfound.html";>Gepetto - Dance 
Choreography
http://glchess.sourceforge.net/"; 
target="_parent">GLChess - chess game
http://heretic.linuxgames.com/"; 
target="_parent">GLHeretic - Heretic
for Linux
@@ -61,4 +60,4 @@
 
 
 
-
\ No newline at end of file
+
diff --git a/docs/libraries.html b/docs/libraries.html
index eaeb045..1c425cf 100644
--- a/docs/libraries.html
+++ b/docs/libraries.html
@@ -47,11 +47,10 @@ Open SG PLUS - a scene-graph library
 http://sgl.sourceforge.net/"; target="_parent">SGL - a 3D 
Scene Graph Library
 http://www.lal.in2p3.fr/SI/SoFree/"; target="_parent">SoFree - 
a free implementation of Open Inventor
 http://togl.sourceforge.net/"; target="_parent">Togl - Tcl/Tk 
widget for OpenGL
-http://mesa3d.sourceforge.net/notfound.html";>VLE - Virtual 
Reality Toolkit
 http://www.int.com/"; target="_parent">View3D Widget - 3-D GUI 
widget
 http://www.vtk.org/"; target="_parent">VTK - Visualization 
Toolkit
 http://home.earthlink.net/%7Erzeh/YAJOGLB/doc/YAJOGLB.html"; 
target="_parent">YAJOGL - Yet Another Java GL Binding.
 
 
 
-
\ No newline at end of file
+
diff --git a/docs/modelers.html b/docs/modelers.html
index aae9686..2e90a52 100644
--- a/docs/modelers.html
+++ b/docs/modelers.html
@@ -11,7 +11,6 @@
 
 http://www.aqsis.org/"; target="_parent">Aqsis - a 
RenderMan compatible renderer
http://www.ac3d.org/"; target="_parent">AC3D - 3-D 
modeler
-   http://mesa3d.sourceforge.net/notfound.html";>ARCAD - CAD program
http://www.mediascape.com/"; 
target="_parent">Artstream - provides
functionality like Corel Draw and Illustrator
http://www.blender.org/"; target="_parent">Blender 
- 3-D animation
@@ -27,7 +26,6 @@
exploration
http://innovation3d.sourceforge.net/"; 
target="_parent">Innovation3D
- 3D modeling program
-   http://mesa3d.sourceforge.net/notfound.html"; 
target="_parent">KWRL - VRML browser
http://www.openvrml.org/"; 
target="_parent">LibVRML97/Lookat
- VRML viewer
http://aig.cs.man.ac.uk/systems/Maverik/"; 
target="_parent">Maverik
@@ -40,7 +38,6 @@
3D - 3D modeler/animator
http://mindseye.sourceforge.net/"; 
target="_parent">Mindseye - Rendering/Modeling
Package
-   http://mesa3d.sourceforge.net/notfound.html";>Moonlight Atelier - 
modeling and rendering package
http://www.neuralvr.com/"; 
target="_parent">Pansophica - Virtual Reality web organizer
http://www.sim.no/reducer.html"; 
target="_parent">Rational Reducer
- polygon reduction tool
@@ -52,14 +49,12 @@
- inside-out sphere visualization
http://www.cs.kuleuven.ac.be/cwis/research/graphics/3DOM/"; 
target="_parent">3Dom
- 3-D modeler
-   http://mesa3d.sourceforge.net/notfound.html";>3D 
Studio file viewer - by David Farrell
http://www.microform.se/"; target="_parent">VARKON 
- product engineering,
design, modeling
http://www.sim.no/vrmlview.html"; 
target="_parent">VRMLview - VRML
model viewer
http://www.iicm.edu/vrwave/"; 
target="_parent">VRWave - a VRML 2.0
browser
-   http://mesa3d.sourceforge.net/notfound.html";>VRweb - VRML browser
http://www.csv.ica.uni-stuttgart.de/vrml/dune/"; 
target="_parent">white_dune
- graphical VRML97 Editor and animation tool
 
diff --git a/docs/science.html b/docs/science.html
index f55cf31..0b33843 100644
--- a/docs/science.html
+++ b/docs/science.html
@@ -10,7 +10,6 @@
 
 
http://www.softintegration.com/products/toolkit/opengl/"; 
target="_parent">Ch - OpenGL bindings for the Ch C/C++ interpreter
-   http://mesa3d.sourceforge.net/notfound.html";>CLEO3D - event displayer 
for the CLEOIII detector
http://www.bioz.unibas.ch/%7Exray/dino/"; 
target="_parent">DINO - Visualizing
Structural Biology
http://www-xdiv.lanl.gov/XCM/gmv/GMVHome.html"; 
target="_parent">General
@@ -34,7 +33,7 @@
- a real-time, interactive relativistic simulator
http://linkwinds.jpl.nasa.gov/"; 
target="_parent">LinkWinds - scientific
vis
-   http://mesa3d.sourceforge.net/notfound.html"; 
target="_parent">Math

Mesa (master): scons: Set -static-libstdc++ on mingw-w64

2011-09-06 Thread Jose Fonseca
Module: Mesa
Branch: master
Commit: 129ace49f457858bc7640b67cf5dd688aee50323
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=129ace49f457858bc7640b67cf5dd688aee50323

Author: José Fonseca 
Date:   Tue Sep  6 13:14:09 2011 +0100

scons: Set -static-libstdc++ on mingw-w64

To avoid depending on libstdc++-xxx.dll

---

 scons/gallium.py |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/scons/gallium.py b/scons/gallium.py
index 5103b92..dc77904 100755
--- a/scons/gallium.py
+++ b/scons/gallium.py
@@ -537,6 +537,8 @@ def generate(env):
 if env['platform'] == 'windows':
 # Avoid depending on gcc runtime DLLs
 linkflags += ['-static-libgcc']
+if env['machine'] == 'x86_64':
+linkflags += ['-static-libstdc++']
 # Handle the @xx symbol munging of DLL exports
 shlinkflags += ['-Wl,--enable-stdcall-fixup']
 #shlinkflags += ['-Wl,--kill-at']

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): scons: Move MinGW flags from crossmingw.py to gallium.py

2011-09-06 Thread Jose Fonseca
Module: Mesa
Branch: master
Commit: 0646246cae02220aebddd142670858f70e5a
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=0646246cae02220aebddd142670858f70e5a

Author: José Fonseca 
Date:   Tue Sep  6 13:13:32 2011 +0100

scons: Move MinGW flags from crossmingw.py to gallium.py

So that they are used by native MinGW compilers too.

---

 scons/crossmingw.py |8 
 scons/gallium.py|8 
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/scons/crossmingw.py b/scons/crossmingw.py
index 949fc4f..893002f 100644
--- a/scons/crossmingw.py
+++ b/scons/crossmingw.py
@@ -225,14 +225,6 @@ def generate(env):
 # default in recent gcc versions
 env.AppendUnique(CCFLAGS = ['-gstabs'])
 
-env.AppendUnique(CPPDEFINES = [('__MSVCRT_VERSION__', '0x0700')])
-#env.AppendUnique(LIBS = ['iberty'])
-env.AppendUnique(SHLINKFLAGS = ['-Wl,--enable-stdcall-fixup'])
-#env.AppendUnique(SHLINKFLAGS = ['-Wl,--kill-at'])
-
-# Avoid depending on gcc runtime DLLs
-env.AppendUnique(LINKFLAGS = ['-static-libgcc'])
-
 env.AddMethod(compile_without_gstabs, 'compile_without_gstabs')
 
 def exists(env):
diff --git a/scons/gallium.py b/scons/gallium.py
index 7135251..5103b92 100755
--- a/scons/gallium.py
+++ b/scons/gallium.py
@@ -279,6 +279,8 @@ def generate(env):
 ('_WIN32_WINNT', '0x0601'),
 ('WINVER', '0x0601'),
 ]
+if gcc:
+cppdefines += [('__MSVCRT_VERSION__', '0x0700')]
 if msvc and env['toolchain'] != 'winddk':
 cppdefines += [
 'VC_EXTRALEAN',
@@ -532,6 +534,12 @@ def generate(env):
 pass
 else:
 env['_LIBFLAGS'] = '-Wl,--start-group ' + env['_LIBFLAGS'] + ' 
-Wl,--end-group'
+if env['platform'] == 'windows':
+# Avoid depending on gcc runtime DLLs
+linkflags += ['-static-libgcc']
+# Handle the @xx symbol munging of DLL exports
+shlinkflags += ['-Wl,--enable-stdcall-fixup']
+#shlinkflags += ['-Wl,--kill-at']
 if msvc:
 if env['build'] == 'release':
 # enable Link-time Code Generation

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): r600g: add TXQ and TXF support

2011-09-06 Thread Dave Airlie
Module: Mesa
Branch: master
Commit: 1d52ddc3bba276451fdd690a5e9f430505278062
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=1d52ddc3bba276451fdd690a5e9f430505278062

Author: Dave Airlie 
Date:   Wed Aug 24 13:29:56 2011 +0100

r600g: add TXQ and TXF support

Signed-off-by: Dave Airlie 

---

 src/gallium/drivers/r600/r600_shader.c |   27 ---
 src/gallium/drivers/r600/r600d.h   |1 +
 2 files changed, 21 insertions(+), 7 deletions(-)

diff --git a/src/gallium/drivers/r600/r600_shader.c 
b/src/gallium/drivers/r600/r600_shader.c
index 3b7a949..9073cbf 100644
--- a/src/gallium/drivers/r600/r600_shader.c
+++ b/src/gallium/drivers/r600/r600_shader.c
@@ -1924,10 +1924,20 @@ static int tgsi_tex(struct r600_shader_ctx *ctx)
const boolean src_requires_loading = tgsi_tex_src_requires_loading(ctx, 
0);
boolean src_loaded = FALSE;
unsigned sampler_src_reg = 1;
+   u8 offset_x = 0, offset_y = 0, offset_z = 0;
 
src_gpr = tgsi_tex_get_src_gpr(ctx, 0);
 
-   if (inst->Instruction.Opcode == TGSI_OPCODE_TXD) {
+   if (inst->Instruction.Opcode == TGSI_OPCODE_TXF) {
+   /* get offset values */
+   if (inst->Texture.NumOffsets) {
+   assert(inst->Texture.NumOffsets == 1);
+
+   offset_x = ctx->literals[inst->TexOffsets[0].Index + 
inst->TexOffsets[0].SwizzleX] << 1;
+   offset_y = ctx->literals[inst->TexOffsets[0].Index + 
inst->TexOffsets[0].SwizzleY] << 1;
+   offset_z = ctx->literals[inst->TexOffsets[0].Index + 
inst->TexOffsets[0].SwizzleZ] << 1;
+   }
+   } else if (inst->Instruction.Opcode == TGSI_OPCODE_TXD) {
/* TGSI moves the sampler to src reg 3 for TXD */
sampler_src_reg = 3;
 
@@ -2219,6 +2229,9 @@ static int tgsi_tex(struct r600_shader_ctx *ctx)
tex.coord_type_w = 1;
}
 
+   tex.offset_x = offset_x;
+   tex.offset_y = offset_y;
+   tex.offset_z = offset_z;
if (inst->Texture.Texture == TGSI_TEXTURE_1D_ARRAY) {
tex.coord_type_z = 0;
tex.src_sel_z = tex.src_sel_y;
@@ -3424,8 +3437,8 @@ static struct r600_shader_tgsi_instruction 
r600_shader_tgsi_instruction[] = {
{TGSI_OPCODE_MOD,   0, V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_NOP, 
tgsi_unsupported},
{TGSI_OPCODE_XOR,   0, V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_XOR_INT, 
tgsi_op2},
{TGSI_OPCODE_SAD,   0, V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_NOP, 
tgsi_unsupported},
-   {TGSI_OPCODE_TXF,   0, V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_NOP, 
tgsi_unsupported},
-   {TGSI_OPCODE_TXQ,   0, V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_NOP, 
tgsi_unsupported},
+   {TGSI_OPCODE_TXF,   0, SQ_TEX_INST_LD, tgsi_tex},
+   {TGSI_OPCODE_TXQ,   0, SQ_TEX_INST_GET_TEXTURE_RESINFO, tgsi_tex},
{TGSI_OPCODE_CONT,  0, V_SQ_CF_WORD1_SQ_CF_INST_LOOP_CONTINUE, 
tgsi_loop_brk_cont},
{TGSI_OPCODE_EMIT,  0, V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_NOP, 
tgsi_unsupported},
{TGSI_OPCODE_ENDPRIM,   0, V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_NOP, 
tgsi_unsupported},
@@ -3594,8 +3607,8 @@ static struct r600_shader_tgsi_instruction 
eg_shader_tgsi_instruction[] = {
{TGSI_OPCODE_MOD,   0, EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_NOP, 
tgsi_unsupported},
{TGSI_OPCODE_XOR,   0, EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_XOR_INT, 
tgsi_op2},
{TGSI_OPCODE_SAD,   0, EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_NOP, 
tgsi_unsupported},
-   {TGSI_OPCODE_TXF,   0, EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_NOP, 
tgsi_unsupported},
-   {TGSI_OPCODE_TXQ,   0, EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_NOP, 
tgsi_unsupported},
+   {TGSI_OPCODE_TXF,   0, SQ_TEX_INST_LD, tgsi_tex},
+   {TGSI_OPCODE_TXQ,   0, SQ_TEX_INST_GET_TEXTURE_RESINFO, tgsi_tex},
{TGSI_OPCODE_CONT,  0, EG_V_SQ_CF_WORD1_SQ_CF_INST_LOOP_CONTINUE, 
tgsi_loop_brk_cont},
{TGSI_OPCODE_EMIT,  0, EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_NOP, 
tgsi_unsupported},
{TGSI_OPCODE_ENDPRIM,   0, EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_NOP, 
tgsi_unsupported},
@@ -3764,8 +3777,8 @@ static struct r600_shader_tgsi_instruction 
cm_shader_tgsi_instruction[] = {
{TGSI_OPCODE_MOD,   0, EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_NOP, 
tgsi_unsupported},
{TGSI_OPCODE_XOR,   0, EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_XOR_INT, 
tgsi_op2},
{TGSI_OPCODE_SAD,   0, EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_NOP, 
tgsi_unsupported},
-   {TGSI_OPCODE_TXF,   0, EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_NOP, 
tgsi_unsupported},
-   {TGSI_OPCODE_TXQ,   0, EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_NOP, 
tgsi_unsupported},
+   {TGSI_OPCODE_TXF,   0, SQ_TEX_INST_LD, tgsi_tex},
+   {TGSI_OPCODE_TXQ,   0, SQ_TEX_INST_GET_TEXTURE_RESINFO, tgsi_tex},
{TGSI_OPCODE_CONT,  0, EG_V_SQ_CF_WORD1_SQ_CF_INST_LOOP_CONTINUE, 
tgsi_loop_brk_cont},
{TGSI_OPCODE_EMIT, 

Mesa (master): r600g: add initial evergreen integer opcode support

2011-09-06 Thread Dave Airlie
Module: Mesa
Branch: master
Commit: cdeffbfddceaccaad5d78f5c95426f41dec74fe5
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=cdeffbfddceaccaad5d78f5c95426f41dec74fe5

Author: Dave Airlie 
Date:   Fri Aug  5 19:08:10 2011 +0100

r600g: add initial evergreen integer opcode support

This just adds the opcodes for evergreen, need to work on r600 and cayman
implementations.

don't advertise nativeintegers yet until we work out all the regressions.

Signed-off-by: Dave Airlie 

---

 src/gallium/drivers/r600/r600_asm.c|   25 +-
 src/gallium/drivers/r600/r600_shader.c |  166 ++-
 2 files changed, 162 insertions(+), 29 deletions(-)

diff --git a/src/gallium/drivers/r600/r600_asm.c 
b/src/gallium/drivers/r600/r600_asm.c
index 523c531..fc792f1 100644
--- a/src/gallium/drivers/r600/r600_asm.c
+++ b/src/gallium/drivers/r600/r600_asm.c
@@ -49,6 +49,7 @@ static inline unsigned int 
r600_bytecode_get_num_operands(struct r600_bytecode *
return 0;
case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_ADD:
case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_ADD_INT:
+   case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SUB_INT:
case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_KILLE:
case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_KILLGT:
case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_KILLGE:
@@ -68,6 +69,7 @@ static inline unsigned int 
r600_bytecode_get_num_operands(struct r600_bytecode *
case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_DOT4:
case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_DOT4_IEEE:
case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_CUBE:
+   case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_XOR_INT:
return 2;
 
case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MOV:
@@ -101,18 +103,34 @@ static inline unsigned int 
r600_bytecode_get_num_operands(struct r600_bytecode *
return 0;
case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_ADD:
case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_ADD_INT:
+   case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SUB_INT:
+   case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_AND_INT:
+   case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_OR_INT:
case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_KILLE:
case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_KILLGT:
case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_KILLGE:
case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_KILLNE:
case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MUL:
+   case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MULHI_INT:
+   case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MULLO_INT:
case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MULHI_UINT:
+   case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MULLO_UINT:
case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MAX:
case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MIN:
+   case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MAX_UINT:
+   case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MIN_UINT:
+   case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MAX_INT:
+   case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MIN_INT:
case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SETE:
+   case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SETE_INT:
case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SETNE:
+   case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SETNE_INT:
case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SETGT:
+   case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SETGT_INT:
+   case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SETGT_UINT:
case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SETGE:
+   case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SETGE_INT:
+   case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SETGE_UINT:
case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETE:
case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETGT:
case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETGE:
@@ -122,6 +140,7 @@ static inline unsigned int 
r600_bytecode_get_num_operands(struct r600_bytecode *
case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_CUBE:
case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INTERP_XY:
case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INTERP_ZW:
+   case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_XOR_INT:
return 2;
 
case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MOV:
@@ -142,6 +161,7 @@ static inline unsigned int 
r600_bytecode_get_num_operands(struct r600_bytecode *
case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SIN:
case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_COS:
case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RNDNE:
+   case EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_NOT_INT:
return 1;
default: R600_ERR(
"Need instruction operand number for 0x%x.\n", 
alu->in

Mesa (master): mesa/st: add support for 2101010 vertex format conversion.

2011-09-06 Thread Dave Airlie
Module: Mesa
Branch: master
Commit: f154ac9cc251c9c5f527a09819a7fb9c5595267f
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=f154ac9cc251c9c5f527a09819a7fb9c5595267f

Author: Dave Airlie 
Date:   Sun Feb 20 07:04:19 2011 +1000

mesa/st: add support for 2101010 vertex format conversion.

Signed-off-by: Dave Airlie 

---

 src/mesa/state_tracker/st_draw.c   |   35 +++-
 src/mesa/state_tracker/st_extensions.c |   27 
 2 files changed, 61 insertions(+), 1 deletions(-)

diff --git a/src/mesa/state_tracker/st_draw.c b/src/mesa/state_tracker/st_draw.c
index 5040c6f..39a947d 100644
--- a/src/mesa/state_tracker/st_draw.c
+++ b/src/mesa/state_tracker/st_draw.c
@@ -187,11 +187,44 @@ st_pipe_vertex_format(GLenum type, GLuint size, GLenum 
format,
   GLboolean normalized)
 {
assert((type >= GL_BYTE && type <= GL_DOUBLE) ||
-  type == GL_FIXED || type == GL_HALF_FLOAT);
+  type == GL_FIXED || type == GL_HALF_FLOAT ||
+  type == GL_INT_2_10_10_10_REV ||
+  type == GL_UNSIGNED_INT_2_10_10_10_REV);
assert(size >= 1);
assert(size <= 4);
assert(format == GL_RGBA || format == GL_BGRA);
 
+   if (type == GL_INT_2_10_10_10_REV ||
+   type == GL_UNSIGNED_INT_2_10_10_10_REV) {
+  assert(size == 4);
+
+  if (format == GL_BGRA) {
+ if (type == GL_INT_2_10_10_10_REV) {
+if (normalized)
+   return PIPE_FORMAT_B10G10R10A2_SNORM;
+else
+   return PIPE_FORMAT_B10G10R10A2_SSCALED;
+ } else {
+if (normalized)
+   return PIPE_FORMAT_B10G10R10A2_UNORM;
+else
+   return PIPE_FORMAT_B10G10R10A2_USCALED;
+ }
+  } else {
+ if (type == GL_INT_2_10_10_10_REV) {
+if (normalized)
+   return PIPE_FORMAT_R10G10B10A2_SNORM;
+else
+   return PIPE_FORMAT_R10G10B10A2_SSCALED;
+ } else {
+if (normalized)
+   return PIPE_FORMAT_R10G10B10A2_UNORM;
+else
+   return PIPE_FORMAT_R10G10B10A2_USCALED;
+ }
+  }
+   }
+
if (format == GL_BGRA) {
   /* this is an odd-ball case */
   assert(type == GL_UNSIGNED_BYTE);
diff --git a/src/mesa/state_tracker/st_extensions.c 
b/src/mesa/state_tracker/st_extensions.c
index 76e84eb..a41e9e8 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -535,6 +535,33 @@ void st_init_extensions(struct st_context *st)
   ctx->Extensions.ARB_ES2_compatibility = GL_TRUE;
}
 
+   if (screen->is_format_supported(screen, PIPE_FORMAT_R10G10B10A2_UNORM,
+   PIPE_BUFFER, 0,
+   PIPE_BIND_VERTEX_BUFFER) &&
+   screen->is_format_supported(screen, PIPE_FORMAT_B10G10R10A2_UNORM,
+   PIPE_BUFFER, 0,
+   PIPE_BIND_VERTEX_BUFFER) &&
+   screen->is_format_supported(screen, PIPE_FORMAT_R10G10B10A2_SNORM,
+   PIPE_BUFFER, 0,
+   PIPE_BIND_VERTEX_BUFFER) &&
+   screen->is_format_supported(screen, PIPE_FORMAT_B10G10R10A2_SNORM,
+   PIPE_BUFFER, 0,
+   PIPE_BIND_VERTEX_BUFFER) &&
+   screen->is_format_supported(screen, PIPE_FORMAT_R10G10B10A2_USCALED,
+   PIPE_BUFFER, 0,
+   PIPE_BIND_VERTEX_BUFFER) &&
+   screen->is_format_supported(screen, PIPE_FORMAT_B10G10R10A2_USCALED,
+   PIPE_BUFFER, 0,
+   PIPE_BIND_VERTEX_BUFFER) &&
+   screen->is_format_supported(screen, PIPE_FORMAT_R10G10B10A2_SSCALED,
+   PIPE_BUFFER, 0,
+   PIPE_BIND_VERTEX_BUFFER) &&
+   screen->is_format_supported(screen, PIPE_FORMAT_B10G10R10A2_SSCALED,
+   PIPE_BUFFER, 0,
+   PIPE_BIND_VERTEX_BUFFER)) {
+  ctx->Extensions.ARB_vertex_type_2_10_10_10_rev = GL_TRUE;
+   }
+
if (screen->get_shader_param(screen, PIPE_SHADER_GEOMETRY, 
PIPE_SHADER_CAP_MAX_INSTRUCTIONS) > 0) {
 #if 0 /* XXX re-enable when GLSL compiler again supports geometry shaders */
   ctx->Extensions.ARB_geometry_shader4 = GL_TRUE;

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): docs: update gl3.txt for ARB_vertex_type_2_10_10_10_rev

2011-09-06 Thread Dave Airlie
Module: Mesa
Branch: master
Commit: 2957e4466428e3b028e07a1b79ba51c68db17b8e
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=2957e4466428e3b028e07a1b79ba51c68db17b8e

Author: Dave Airlie 
Date:   Sun Sep  4 08:25:00 2011 +0100

docs: update gl3.txt for ARB_vertex_type_2_10_10_10_rev

---

 docs/GL3.txt |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/docs/GL3.txt b/docs/GL3.txt
index ff1f502..31add74 100644
--- a/docs/GL3.txt
+++ b/docs/GL3.txt
@@ -83,7 +83,7 @@ GL_ARB_texture_rgb10_a2ui not 
started
 GL_ARB_texture_swizzleDONE (same as EXT 
version)
 GL_ARB_timer_query~60% done (the EXT 
variant)
 GL_ARB_instanced_arrays   DONE (gallium)
-GL_ARB_vertex_type_2_10_10_10_rev not started
+GL_ARB_vertex_type_2_10_10_10_rev DONE (gallium)
 
 
 GL 4.0:

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): mesa/vbo: add ARB_vertex_type_2_10_10_10_rev APIs.

2011-09-06 Thread Dave Airlie
Module: Mesa
Branch: master
Commit: 51fcf080a342896ea0bc71dce01e948c810a8db9
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=51fcf080a342896ea0bc71dce01e948c810a8db9

Author: Dave Airlie 
Date:   Sun Sep  4 09:04:13 2011 +0100

mesa/vbo: add ARB_vertex_type_2_10_10_10_rev APIs.

This adds the vertex processing paths for the 2101010 types. It converts
the attributes to floats for all the immediate entry points, some entrypoints
are normalised and the attrib APIs take a normalized parameter.

There are four main paths,
ui10 -> float unnormalized
i10 -> float unnormalized
ui10 -> float normalized
i10 -> float normalized
along with the ui2/i2 equivs.

Signed-off-by: Dave Airlie 

---

 src/mesa/vbo/vbo_attrib_tmp.h |  401 -
 src/mesa/vbo/vbo_exec_api.c   |   45 +
 src/mesa/vbo/vbo_save_api.c   |   46 +
 3 files changed, 490 insertions(+), 2 deletions(-)

diff --git a/src/mesa/vbo/vbo_attrib_tmp.h b/src/mesa/vbo/vbo_attrib_tmp.h
index c793ce0..d6448df 100644
--- a/src/mesa/vbo/vbo_attrib_tmp.h
+++ b/src/mesa/vbo/vbo_attrib_tmp.h
@@ -1,7 +1,7 @@
 /**
 
 Copyright 2002 Tungsten Graphics Inc., Cedar Park, Texas.
-
+Copyright 2011 Dave Airlie (ARB_vertex_type_2_10_10_10_rev support)
 All Rights Reserved.
 
 Permission is hereby granted, free of charge, to any person obtaining a
@@ -59,7 +59,120 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 #define MAT_ATTR( A, N, V ) ATTR( A, N, (V)[0], (V)[1], (V)[2], (V)[3] )
 
-
+static inline float conv_ui10_to_norm_float(unsigned ui10)
+{
+   return (float)(ui10) / 1023.0;
+}
+
+static inline float conv_ui2_to_norm_float(unsigned ui2)
+{
+   return (float)(ui2) / 3.0;
+}
+
+#define ATTRUI10_1( A, UI ) ATTR( A, 1, (UI) & 0x3ff, 0, 0, 1 )
+#define ATTRUI10_2( A, UI ) ATTR( A, 2, (UI) & 0x3ff, ((UI) >> 10) & 0x3ff, 0, 
1 )
+#define ATTRUI10_3( A, UI ) ATTR( A, 3, (UI) & 0x3ff, ((UI) >> 10) & 0x3ff, 
((UI) >> 20) & 0x3ff, 1 )
+#define ATTRUI10_4( A, UI ) ATTR( A, 4, (UI) & 0x3ff, ((UI) >> 10) & 0x3ff, 
((UI) >> 20) & 0x3ff, ((UI) >> 30) & 0x3 )
+
+#define ATTRUI10N_1( A, UI ) ATTR( A, 1, conv_ui10_to_norm_float((UI) & 
0x3ff), 0, 0, 1 )
+#define ATTRUI10N_2( A, UI ) ATTR( A, 2, \
+  conv_ui10_to_norm_float((UI) & 0x3ff), \
+  conv_ui10_to_norm_float(((UI) >> 10) & 
0x3ff), 0, 1 )
+#define ATTRUI10N_3( A, UI ) ATTR( A, 3, \
+  conv_ui10_to_norm_float((UI) & 0x3ff), \
+  conv_ui10_to_norm_float(((UI) >> 10) & 
0x3ff), \
+  conv_ui10_to_norm_float(((UI) >> 20) & 
0x3ff), 1 )
+#define ATTRUI10N_4( A, UI ) ATTR( A, 4, \
+  conv_ui10_to_norm_float((UI) & 0x3ff), \
+  conv_ui10_to_norm_float(((UI) >> 10) & 
0x3ff), \
+  conv_ui10_to_norm_float(((UI) >> 20) & 
0x3ff), \
+  conv_ui2_to_norm_float(((UI) >> 30) & 0x3) )
+
+struct attr_bits_10 {signed int x:10;};
+struct attr_bits_2 {signed int x:2;};
+
+static inline float conv_i10_to_i(int i10)
+{
+   struct attr_bits_10 val;
+   val.x = i10;
+   return (float)val.x;
+}
+
+static inline float conv_i2_to_i(int i2)
+{
+   struct attr_bits_2 val;
+   val.x = i2;
+   return (float)val.x;
+}
+
+static inline float conv_i10_to_norm_float(int i10)
+{
+   struct attr_bits_10 val;
+   val.x = i10;
+   return (2.0F * (float)val.x + 1.0F) * (1.0F  / 511.0F);
+}
+
+static inline float conv_i2_to_norm_float(int i2)
+{
+   struct attr_bits_2 val;
+   val.x = i2;
+   return (float)val.x;
+}
+
+#define ATTRI10_1( A, I10 ) ATTR( A, 1, conv_i10_to_i((I10) & 0x3ff), 0, 0, 1 )
+#define ATTRI10_2( A, I10 ) ATTR( A, 2, \
+   conv_i10_to_i((I10) & 0x3ff),   \
+   conv_i10_to_i(((I10) >> 10) & 0x3ff), 0, 1 )
+#define ATTRI10_3( A, I10 ) ATTR( A, 3, \
+   conv_i10_to_i((I10) & 0x3ff),   \
+   conv_i10_to_i(((I10) >> 10) & 0x3ff), \
+   conv_i10_to_i(((I10) >> 20) & 0x3ff), 1 )
+#define ATTRI10_4( A, I10 ) ATTR( A, 4, \
+   conv_i10_to_i((I10) & 0x3ff),   \
+   conv_i10_to_i(((I10) >> 10) & 0x3ff), \
+   conv_i10_to_i(((I10) >> 20) & 0x3ff), \
+   conv_i2_to_i(((I10) >> 30) & 0x3))
+
+
+#define ATTRI10N_1( A, I10 ) ATTR( A, 1, conv_i10_to_norm_float((I10) & 
0x3ff), 0, 0, 1 )
+#define ATTRI10N_2( A, I10 ) ATTR( A, 2, \
+   conv_i10_to_norm_float((I10) & 0x3ff),  
\
+   conv_i10_to_norm_float(((I10) >> 10) & 0x3ff), 
0, 1 )
+#define ATTRI10N_3( A, I10 ) ATTR( A, 3, \
+   conv_i10_to_norm_float((I10) &

Mesa (master): mesa/varray: add interface support for ARB_vertex_type_2_10_10_10_rev (v2)

2011-09-06 Thread Dave Airlie
Module: Mesa
Branch: master
Commit: 6cd2d55a7bee289f20670cb97258d73911dac781
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=6cd2d55a7bee289f20670cb97258d73911dac781

Author: Dave Airlie 
Date:   Sat Aug 13 15:30:38 2011 +0100

mesa/varray: add interface support for ARB_vertex_type_2_10_10_10_rev (v2)

This just adds all the API check for vertex arrays using 2101010 types.

2101010 is also useable with GL_BGRA.

v2: fix whitespace.

Signed-off-by: Dave Airlie 
Reviewed-by: Eric Anholt 

---

 src/mesa/main/varray.c |   45 ++---
 1 files changed, 38 insertions(+), 7 deletions(-)

diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c
index 29a345f..9c9d0d6 100644
--- a/src/mesa/main/varray.c
+++ b/src/mesa/main/varray.c
@@ -59,6 +59,8 @@
 #define DOUBLE_BIT   0x200
 #define FIXED_ES_BIT 0x400
 #define FIXED_GL_BIT 0x800
+#define UNSIGNED_INT_2_10_10_10_REV_BIT 0x1000
+#define INT_2_10_10_10_REV_BIT 0x2000
 
 
 /** Convert GL datatype enum into a _BIT value seen above */
@@ -91,6 +93,10 @@ type_to_bit(const struct gl_context *ctx, GLenum type)
   return DOUBLE_BIT;
case GL_FIXED:
   return ctx->API == API_OPENGL ? FIXED_GL_BIT : FIXED_ES_BIT;
+   case GL_UNSIGNED_INT_2_10_10_10_REV:
+  return UNSIGNED_INT_2_10_10_10_REV_BIT;
+   case GL_INT_2_10_10_10_REV:
+  return INT_2_10_10_10_REV_BIT;
default:
   return 0;
}
@@ -135,6 +141,10 @@ update_array(struct gl_context *ctx,
if (!ctx->Extensions.ARB_ES2_compatibility) {
   legalTypesMask &= ~FIXED_GL_BIT;
}
+   if (!ctx->Extensions.ARB_vertex_type_2_10_10_10_rev) {
+  legalTypesMask &= ~(UNSIGNED_INT_2_10_10_10_REV_BIT |
+  INT_2_10_10_10_REV_BIT);
+   }
 
typeBit = type_to_bit(ctx, type);
if (typeBit == 0x0 || (typeBit & legalTypesMask) == 0x0) {
@@ -150,7 +160,10 @@ update_array(struct gl_context *ctx,
if (ctx->Extensions.EXT_vertex_array_bgra &&
sizeMax == BGRA_OR_4 &&
size == GL_BGRA) {
-  if (type != GL_UNSIGNED_BYTE) {
+  if (type != GL_UNSIGNED_BYTE &&
+ (ctx->Extensions.ARB_vertex_type_2_10_10_10_rev &&
+  (type != GL_UNSIGNED_INT_2_10_10_10_REV &&
+   type != GL_INT_2_10_10_10_REV))) {
  _mesa_error(ctx, GL_INVALID_VALUE, "%s(GL_BGRA/GLubyte)", func);
  return;
   }
@@ -162,6 +175,12 @@ update_array(struct gl_context *ctx,
   return;
}
 
+   if (ctx->Extensions.ARB_vertex_type_2_10_10_10_rev &&
+   (type == GL_UNSIGNED_INT_2_10_10_10_REV ||
+type == GL_INT_2_10_10_10_REV) && size != 4) {
+  _mesa_error(ctx, GL_INVALID_OPERATION, "%s(size=%d)", func, size);
+   }
+
ASSERT(size <= 4);
 
if (stride < 0) {
@@ -201,7 +220,9 @@ void GLAPIENTRY
 _mesa_VertexPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *ptr)
 {
GLbitfield legalTypes = (SHORT_BIT | INT_BIT | FLOAT_BIT |
-DOUBLE_BIT | HALF_BIT | FIXED_ES_BIT);
+DOUBLE_BIT | HALF_BIT | FIXED_ES_BIT |
+UNSIGNED_INT_2_10_10_10_REV_BIT |
+INT_2_10_10_10_REV_BIT);
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
 
@@ -220,7 +241,9 @@ _mesa_NormalPointer(GLenum type, GLsizei stride, const 
GLvoid *ptr )
 {
const GLbitfield legalTypes = (BYTE_BIT | SHORT_BIT | INT_BIT |
   HALF_BIT | FLOAT_BIT | DOUBLE_BIT |
-  FIXED_ES_BIT);
+  FIXED_ES_BIT |
+  UNSIGNED_INT_2_10_10_10_REV_BIT |
+  INT_2_10_10_10_REV_BIT);
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
 
@@ -238,7 +261,9 @@ _mesa_ColorPointer(GLint size, GLenum type, GLsizei stride, 
const GLvoid *ptr)
   SHORT_BIT | UNSIGNED_SHORT_BIT |
   INT_BIT | UNSIGNED_INT_BIT |
   HALF_BIT | FLOAT_BIT | DOUBLE_BIT |
-  FIXED_ES_BIT);
+  FIXED_ES_BIT |
+  UNSIGNED_INT_2_10_10_10_REV_BIT |
+  INT_2_10_10_10_REV_BIT);
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
 
@@ -285,7 +310,9 @@ _mesa_SecondaryColorPointerEXT(GLint size, GLenum type,
const GLbitfield legalTypes = (BYTE_BIT | UNSIGNED_BYTE_BIT |
   SHORT_BIT | UNSIGNED_SHORT_BIT |
   INT_BIT | UNSIGNED_INT_BIT |
-  HALF_BIT | FLOAT_BIT | DOUBLE_BIT);
+  HALF_BIT | FLOAT_BIT | DOUBLE_BIT |
+  UNSIGNED_INT_2_10_10_10_REV_BIT |
+  INT_2_10_10_10_REV_BIT);
GET_CURRENT_CONTEXT(ctx);
 

Mesa (master): mesa: add initial API changes for ARB_vertex_type_2_10_10_10_rev.

2011-09-06 Thread Dave Airlie
Module: Mesa
Branch: master
Commit: 667351bc5f07a149234e7f3a0b7c1139624d3de0
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=667351bc5f07a149234e7f3a0b7c1139624d3de0

Author: Dave Airlie 
Date:   Mon Nov 22 08:12:57 2010 +1000

mesa: add initial API changes for ARB_vertex_type_2_10_10_10_rev.

add new APIs to the internal mesa driver interface + set funcs in vtxfmt.c

Signed-off-by: Dave Airlie 
Reviewed-by: Eric Anholt 

---

 src/mesa/main/dd.h |   64 
 src/mesa/main/vtxfmt.c |   47 +++
 2 files changed, 111 insertions(+), 0 deletions(-)

diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h
index d918b1e..b9305ad 100644
--- a/src/mesa/main/dd.h
+++ b/src/mesa/main/dd.h
@@ -1112,6 +1112,70 @@ typedef struct {
void (GLAPIENTRYP VertexAttribI3uiv)( GLuint index, const GLuint *v);
void (GLAPIENTRYP VertexAttribI4uiv)( GLuint index, const GLuint *v);
 
+   /* GL_ARB_vertex_type_10_10_10_2_rev / GL3.3 */
+   void (GLAPIENTRYP VertexP2ui)( GLenum type, GLuint value );
+   void (GLAPIENTRYP VertexP2uiv)( GLenum type, const GLuint *value);
+
+   void (GLAPIENTRYP VertexP3ui)( GLenum type, GLuint value );
+   void (GLAPIENTRYP VertexP3uiv)( GLenum type, const GLuint *value);
+
+   void (GLAPIENTRYP VertexP4ui)( GLenum type, GLuint value );
+   void (GLAPIENTRYP VertexP4uiv)( GLenum type, const GLuint *value);
+
+   void (GLAPIENTRYP TexCoordP1ui)( GLenum type, GLuint coords );
+   void (GLAPIENTRYP TexCoordP1uiv)( GLenum type, const GLuint *coords );
+
+   void (GLAPIENTRYP TexCoordP2ui)( GLenum type, GLuint coords );
+   void (GLAPIENTRYP TexCoordP2uiv)( GLenum type, const GLuint *coords );
+
+   void (GLAPIENTRYP TexCoordP3ui)( GLenum type, GLuint coords );
+   void (GLAPIENTRYP TexCoordP3uiv)( GLenum type, const GLuint *coords );
+
+   void (GLAPIENTRYP TexCoordP4ui)( GLenum type, GLuint coords );
+   void (GLAPIENTRYP TexCoordP4uiv)( GLenum type, const GLuint *coords );
+
+   void (GLAPIENTRYP MultiTexCoordP1ui)( GLenum texture, GLenum type, GLuint 
coords );
+   void (GLAPIENTRYP MultiTexCoordP1uiv)( GLenum texture, GLenum type, const 
GLuint *coords );
+   void (GLAPIENTRYP MultiTexCoordP2ui)( GLenum texture, GLenum type, GLuint 
coords );
+   void (GLAPIENTRYP MultiTexCoordP2uiv)( GLenum texture, GLenum type, const 
GLuint *coords );
+   void (GLAPIENTRYP MultiTexCoordP3ui)( GLenum texture, GLenum type, GLuint 
coords );
+   void (GLAPIENTRYP MultiTexCoordP3uiv)( GLenum texture, GLenum type, const 
GLuint *coords );
+   void (GLAPIENTRYP MultiTexCoordP4ui)( GLenum texture, GLenum type, GLuint 
coords );
+   void (GLAPIENTRYP MultiTexCoordP4uiv)( GLenum texture, GLenum type, const 
GLuint *coords );
+
+   void (GLAPIENTRYP NormalP3ui)( GLenum type, GLuint coords );
+   void (GLAPIENTRYP NormalP3uiv)( GLenum type, const GLuint *coords );
+
+   void (GLAPIENTRYP ColorP3ui)( GLenum type, GLuint color );
+   void (GLAPIENTRYP ColorP3uiv)( GLenum type, const GLuint *color );
+
+   void (GLAPIENTRYP ColorP4ui)( GLenum type, GLuint color );
+   void (GLAPIENTRYP ColorP4uiv)( GLenum type, const GLuint *color );
+
+   void (GLAPIENTRYP SecondaryColorP3ui)( GLenum type, GLuint color );
+   void (GLAPIENTRYP SecondaryColorP3uiv)( GLenum type, const GLuint *color );
+
+   void (GLAPIENTRYP VertexAttribP1ui)( GLuint index, GLenum type,
+   GLboolean normalized, GLuint value);
+   void (GLAPIENTRYP VertexAttribP2ui)( GLuint index, GLenum type,
+   GLboolean normalized, GLuint value);
+   void (GLAPIENTRYP VertexAttribP3ui)( GLuint index, GLenum type,
+   GLboolean normalized, GLuint value);
+   void (GLAPIENTRYP VertexAttribP4ui)( GLuint index, GLenum type,
+   GLboolean normalized, GLuint value);
+   void (GLAPIENTRYP VertexAttribP1uiv)( GLuint index, GLenum type,
+   GLboolean normalized,
+const GLuint *value);
+   void (GLAPIENTRYP VertexAttribP2uiv)( GLuint index, GLenum type,
+   GLboolean normalized,
+const GLuint *value);
+   void (GLAPIENTRYP VertexAttribP3uiv)( GLuint index, GLenum type,
+   GLboolean normalized,
+const GLuint *value);
+   void (GLAPIENTRYP VertexAttribP4uiv)( GLuint index, GLenum type,
+GLboolean normalized,
+const GLuint *value);
+
/*@}*/
 
void (GLAPIENTRYP Rectf)( GLfloat, GLfloat, GLfloat, GLfloat );
diff --git a/src/mesa/main/vtxfmt.c b/src/mesa/main/vtxfmt.c
index d094147..03735d7 100644
--- a/src/mesa/main/vtxfmt.c
+++ b/src/mesa/main/vtxfmt.c
@@ -144,6 +144,53 @@ install_vtxfmt( struct _glapi_table *tab, const 
GLvertexformat *vfmt )
  

Mesa (master): glapi: regen API files for new extension

2011-09-06 Thread Dave Airlie
Module: Mesa
Branch: master
Commit: 2b3da6b01e5b1fe7b4dfad96370a3dc2d3c248ba
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=2b3da6b01e5b1fe7b4dfad96370a3dc2d3c248ba

Author: Dave Airlie 
Date:   Sun Sep  4 08:45:32 2011 +0100

glapi: regen API files for new extension

Signed-off-by: Dave Airlie 

---

 src/mapi/glapi/glapi_gentable.c |  266 ++
 src/mapi/glapi/glapi_mapi_tmp.h | 2022 +--
 src/mapi/glapi/glapi_sparc.S|  732 +++---
 src/mapi/glapi/glapi_x86-64.S   | 4338 ++---
 src/mapi/glapi/glapi_x86.S  | 1028 
 src/mapi/glapi/glapitable.h |  666 +++---
 src/mapi/glapi/glapitemp.h  |  494 +++-
 src/mapi/glapi/glprocs.h| 1570 ++--
 src/mesa/main/dispatch.h| 1792 +-
 src/mesa/main/enums.c   | 5235 ---
 src/mesa/main/remap_helper.h| 4301 +---
 11 files changed, 12893 insertions(+), 9551 deletions(-)

Diff:   
http://cgit.freedesktop.org/mesa/mesa/diff/?id=2b3da6b01e5b1fe7b4dfad96370a3dc2d3c248ba
___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): glapi: add ARB_vertex_type_2_10_10_10_rev entrypoints. (v2)

2011-09-06 Thread Dave Airlie
Module: Mesa
Branch: master
Commit: 3543160f56f1f966587e07b1620496c8fe5be325
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=3543160f56f1f966587e07b1620496c8fe5be325

Author: Dave Airlie 
Date:   Mon Nov 22 08:11:46 2010 +1000

glapi: add ARB_vertex_type_2_10_10_10_rev entrypoints. (v2)

These are the new API entrypoints for ARB_vertex_type_2_10_10_10_rev
extension, along with the new INT_2_10_10_10_REV enum.

v2: fixup crazy whitespace cut-n-paste mess

Signed-off-by: Dave Airlie 
Reviewed-by: Eric Anholt 

---

 .../glapi/gen/ARB_vertex_type_2_10_10_10_rev.xml   |  226 
 src/mapi/glapi/gen/Makefile|1 +
 src/mapi/glapi/gen/gl_API.xml  |2 +
 3 files changed, 229 insertions(+), 0 deletions(-)

diff --git a/src/mapi/glapi/gen/ARB_vertex_type_2_10_10_10_rev.xml 
b/src/mapi/glapi/gen/ARB_vertex_type_2_10_10_10_rev.xml
new file mode 100644
index 000..7d12d97
--- /dev/null
+++ b/src/mapi/glapi/gen/ARB_vertex_type_2_10_10_10_rev.xml
@@ -0,0 +1,226 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/mapi/glapi/gen/Makefile b/src/mapi/glapi/gen/Makefile
index c386b87..ec82d48 100644
--- a/src/mapi/glapi/gen/Makefile
+++ b/src/mapi/glapi/gen/Makefile
@@ -89,6 +89,7 @@ API_XML = \
ARB_texture_buffer_object.xml \
ARB_vertex_array_object.xml \
AMD_draw_buffers_blend.xml \
+   ARB_vertex_type_2_10_10_10_rev.xml \
APPLE_object_purgeable.xml \
APPLE_vertex_array_object.xml \
EXT_draw_buffers2.xml \
diff --git a/src/mapi/glapi/gen/gl_API.xml b/src/mapi/glapi/gen/gl_API.xml
index 7a7b1e9..bf811ce 100644
--- a/src/mapi/glapi/gen/gl_API.xml
+++ b/src/mapi/glapi/gen/gl_API.xml
@@ -12537,4 +12537,6 @@
 
 http://www.w3.org/2001/XInclude"/>
 
+http://www.w3.org/2001/XInclude"/>
+
 

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit