Re: [Mesa-dev] [PATCH 1/4] i965/fs: Improve live variables calculation performance.

2013-03-03 Thread Kenneth Graunke

On 02/19/2013 06:03 PM, Eric Anholt wrote:

We can execute way fewer instructions by doing our boolean manipulation
on an int of bits at a time, while also reducing our working set size.


I see...it lets you do the computation on whole words at a time rather 
than looping over (up to) 32 individual bools.  Yeah.  That would be 
much faster.



Reduces compile time of L4D2's slowest shader from 4s to 1.1s
(-72.4% +/- 0.2%, n=10)
---
  .../drivers/dri/i965/brw_fs_live_variables.cpp |   44 +++-
  src/mesa/drivers/dri/i965/brw_fs_live_variables.h  |   10 +++--
  2 files changed, 30 insertions(+), 24 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_fs_live_variables.cpp 
b/src/mesa/drivers/dri/i965/brw_fs_live_variables.cpp
index db8f397..e7de43e 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_live_variables.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_live_variables.cpp
@@ -40,7 +40,7 @@ using namespace brw;
   */

  /**
- * Sets up the use[] and def[] arrays.
+ * Sets up the use[] and def[] bitsets.
   *
   * The basic-block-level live variable analysis needs to know which
   * variables get used before they're completely defined, and which
@@ -67,8 +67,8 @@ fs_live_variables::setup_def_use()
if (inst-src[i].file == GRF) {
   int reg = inst-src[i].reg;

-  if (!bd[b].def[reg])
- bd[b].use[reg] = true;
+  if (!BITSET_TEST(bd[b].def, reg))
+ BITSET_SET(bd[b].use, reg);
}
 }

@@ -82,8 +82,8 @@ fs_live_variables::setup_def_use()
 !inst-force_uncompressed 
 !inst-force_sechalf) {
int reg = inst-dst.reg;
-   if (!bd[b].use[reg])
-  bd[b].def[reg] = true;
+if (!BITSET_TEST(bd[b].use, reg))
+   BITSET_SET(bd[b].def, reg);
 }

 ip++;
@@ -107,12 +107,12 @@ fs_live_variables::compute_live_variables()

for (int b = 0; b  cfg-num_blocks; b++) {
 /* Update livein */
-for (int i = 0; i  num_vars; i++) {
-   if (bd[b].use[i] || (bd[b].liveout[i]  !bd[b].def[i])) {
-  if (!bd[b].livein[i]) {
- bd[b].livein[i] = true;
- cont = true;
-  }
+for (int i = 0; i  bitset_words; i++) {
+BITSET_WORD new_livein = (bd[b].use[i] |
+  (bd[b].liveout[i]  ~bd[b].def[i]));
+   if (new_livein  ~bd[b].livein[i]) {
+   bd[b].livein[i] |= new_livein;
+   cont = true;
}
 }

@@ -121,9 +121,11 @@ fs_live_variables::compute_live_variables()
bblock_link *link = (bblock_link *)block_node;
bblock_t *block = link-block;

-   for (int i = 0; i  num_vars; i++) {
-  if (bd[block-block_num].livein[i]  !bd[b].liveout[i]) {
- bd[b].liveout[i] = true;
+   for (int i = 0; i  bitset_words; i++) {
+   BITSET_WORD new_liveout = (bd[block-block_num].livein[i] 
+  ~bd[b].liveout[i]);
+  if (new_liveout  ~bd[b].liveout[i]) {
+ bd[b].liveout[i] |= new_liveout;


This hunk doesn't quite seem right...new_liveout already has  
~bd[b].liveout[i]...so couldn't the if condition just be new_liveout? It 
seems equivalent.


Otherwise, this patch looks good and gets a:
Reviewed-by: Kenneth Graunke kenn...@whitecape.org


  cont = true;
   }
}
@@ -140,11 +142,13 @@ fs_live_variables::fs_live_variables(fs_visitor *v, cfg_t 
*cfg)
 num_vars = v-virtual_grf_count;
 bd = rzalloc_array(mem_ctx, struct block_data, cfg-num_blocks);

+   bitset_words = (ALIGN(v-virtual_grf_count, BITSET_WORDBITS) /
+   BITSET_WORDBITS);
 for (int i = 0; i  cfg-num_blocks; i++) {
-  bd[i].def = rzalloc_array(mem_ctx, bool, num_vars);
-  bd[i].use = rzalloc_array(mem_ctx, bool, num_vars);
-  bd[i].livein = rzalloc_array(mem_ctx, bool, num_vars);
-  bd[i].liveout = rzalloc_array(mem_ctx, bool, num_vars);
+  bd[i].def = rzalloc_array(mem_ctx, BITSET_WORD, bitset_words);
+  bd[i].use = rzalloc_array(mem_ctx, BITSET_WORD, bitset_words);
+  bd[i].livein = rzalloc_array(mem_ctx, BITSET_WORD, bitset_words);
+  bd[i].liveout = rzalloc_array(mem_ctx, BITSET_WORD, bitset_words);
 }

 setup_def_use();
@@ -208,12 +212,12 @@ fs_visitor::calculate_live_intervals()

 for (int b = 0; b  cfg.num_blocks; b++) {
for (int i = 0; i  num_vars; i++) {
-if (livevars.bd[b].livein[i]) {
+if (BITSET_TEST(livevars.bd[b].livein, i)) {
def[i] = MIN2(def[i], cfg.blocks[b]-start_ip);
use[i] = MAX2(use[i], cfg.blocks[b]-start_ip);
 }

-if (livevars.bd[b].liveout[i]) {
+if (BITSET_TEST(livevars.bd[b].liveout, i)) {
def[i] = MIN2(def[i], cfg.blocks[b]-end_ip);
use[i] = 

Re: [Mesa-dev] [PATCH] GLSL: fix too eager constant variable optimization

2013-03-03 Thread Aras Pranckevicius
 opt_constant_variable was marking a variable as constant as long as there was
 exactly one constant assignment to it, but did not take into account that 
 this
 assignment might be in a dynamic branch or a loop.
 Was happening on a fragment shader like this:

 uniform float mode;
 float func (float c) {
 if (mode == 2.0)
 return c; // was returning 0.1 after optimization!
 if (mode == 3.0)
 discard;
 if (mode == 10.0)
 c = 0.1;
 return c;
 }
 void main() {
 vec4 c = gl_FragCoord;
 c.x = func(c.x);
 gl_FragColor = c;
 }

 Now, looking further this optimization pass should also not mark variables as
 const if there was a dereference of them before that first assignment. I had
 code to do this (a hashtable that would track dereferences before assignment
 is done). But couldn't come up with a test case that would break the whole 
 set
 of optimizations that Mesa does (lower jumps, or inlining, ... were getting 
 in
 the way and hide the bug).

 I'm not sure I agree with this.  The real problem with the example code you 
 showed
 above is that there's an implicit write to the variable c at the top of the 
 function,
 so c is not in fact constant--it's written twice.  What we should really do 
 is modify
 the optimization pass so that it's aware of the implicit write that happens 
 in in
 and inout function args.

Attached version two of the patch which does what you suggest - any
ir_var_in, ir_var_const_in or ir_var_inout function args are being
marked as assigned to. Fixes the issue just as well as my initial
patch on several shaders that were problematic before.



--
Aras Pranckevičius
work: http://unity3d.com
home: http://aras-p.info


glsl-constant-variable-fix-v2.diff
Description: Binary data
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 4/4] mesa: Reduce memory usage for reg alloc with many graph nodes (part 2).

2013-03-03 Thread Kenneth Graunke

On 02/19/2013 06:03 PM, Eric Anholt wrote:

After the previous fix that almost removes an allocation of 4*n^2
bytes, we can use a bitset to reduce another allocation from n^2 bytes
to n^2/8 bytes.

Between the previous commit and this one, the peak heap size for an
oglconform ARB_fragment_program max instructions test on i965 goes from
4GB to 255MB.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55825
---
  src/mesa/program/register_allocate.c |   12 
  1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/mesa/program/register_allocate.c 
b/src/mesa/program/register_allocate.c
index 5862c78..a9064c3 100644
--- a/src/mesa/program/register_allocate.c
+++ b/src/mesa/program/register_allocate.c
@@ -75,6 +75,7 @@
  #include main/imports.h
  #include main/macros.h
  #include main/mtypes.h
+#include main/bitset.h
  #include register_allocate.h

  #define NO_REG ~0
@@ -118,7 +119,7 @@ struct ra_node {
  * List of which nodes this node interferes with.  This should be
  * symmetric with the other node.
  */
-   GLboolean *adjacency;
+   BITSET_WORD *adjacency;
 unsigned int *adjacency_list;
 unsigned int adjacency_list_size;
 unsigned int adjacency_count;
@@ -307,7 +308,7 @@ ra_set_finalize(struct ra_regs *regs, unsigned int 
**q_values)
  static void
  ra_add_node_adjacency(struct ra_graph *g, unsigned int n1, unsigned int n2)
  {
-   g-nodes[n1].adjacency[n2] = GL_TRUE;
+   BITSET_SET(g-nodes[n1].adjacency, n2);

 if (g-nodes[n1].adjacency_count =
 g-nodes[n1].adjacency_list_size) {
@@ -335,11 +336,14 @@ ra_alloc_interference_graph(struct ra_regs *regs, 
unsigned int count)
 g-stack = rzalloc_array(g, unsigned int, count);

 for (i = 0; i  count; i++) {
-  g-nodes[i].adjacency = rzalloc_array(g, GLboolean, count);
+  int bitset_count = ALIGN(count, BITSET_WORDBITS) / BITSET_WORDBITS;
+  g-nodes[i].adjacency = rzalloc_array(g, BITSET_WORD, bitset_count);
+
g-nodes[i].adjacency_list_size = 4;
g-nodes[i].adjacency_list =
   ralloc_array(g, unsigned int, g-nodes[i].adjacency_list_size);
g-nodes[i].adjacency_count = 0;
+
ra_add_node_adjacency(g, i, i);
g-nodes[i].reg = NO_REG;
 }
@@ -358,7 +362,7 @@ void
  ra_add_node_interference(struct ra_graph *g,
 unsigned int n1, unsigned int n2)
  {
-   if (!g-nodes[n1].adjacency[n2]) {
+   if (!BITSET_TEST(g-nodes[n1].adjacency, n2)) {
ra_add_node_adjacency(g, n1, n2);
ra_add_node_adjacency(g, n2, n1);
 }


We could also make a C++ bitset using operator[] to provide an identical 
interface that still saves the memory.


But this seems fine too.

For patches 2-4:
Reviewed-by: Kenneth Graunke kenn...@whitecape.org
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] r600g: status of my work on the shader optimization

2013-03-03 Thread Andy Furniss

Sebastien Caty wrote:

On March 3, 2013 12:14:54 AM Vadim Girlin wrote:

On 03/02/2013 10:06 AM, Sebastien Caty wrote:

On March 1, 2013 06:24:01 PM Matt Turner wrote:

On Fri, Mar 1, 2013 at 5:15 PM, Sebastien Caty sc...@dcinformatique.com


wrote:

Trying to dig more and found out which shader is causing trouble but I
haven't found out how to run a specific test with piglit. Documentation
isn't to friendly...Id appreciate some help with this.


If you click the test {pass,fail,crash} in the generated html summary
it will contain the command used to run the test.


Doh! Thanks that will do. All the piglit regression I had found so far
pass
when I run them alone, one by one.

Went back to Serious Sam 3 to isolate a shader that's causing problems.
Found one, shader 35. I get several errors like this :

error at : DOT4 __,t113@R14.x, t114F@R125.x

: expected operand value t113@R14.x, gpr contains R11.x.3||FP@R14.x

error at : DOT4 __,t85@R14.x, t86F@R124.x

: expected operand value t85@R14.x, gpr contains R11.x.3||FP@R14.x

error at : DOT4 __,t87@R13.y, t88F@R124.y

: expected operand value t87@R13.y, gpr contains R12.x.5||FP@R13.y


I've pushed the fix for this issue.


Confirmed and it works like a charm. No errors, no graphic annomalies and a
far better frame rate with Serious Sam 3. I'll try some more piglit run and
other games but so far so good on RV790 hardware.


Things also better for me with rv790 testing with nexuiz, xonotic and etqw.

The one exception is vdpau hardware mpeg2 decode using llvm, this still 
locks GPU, with R600_LLVM=0 it now renders correctly without issue.


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


[Mesa-dev] [PATCH 2/6] r600g: atomize vertex shader

2013-03-03 Thread Marek Olšák
---
 src/gallium/drivers/r600/evergreen_hw_context.c |   27 
 src/gallium/drivers/r600/evergreen_state.c  |  171 +++
 src/gallium/drivers/r600/r600_hw_context.c  |   17 +--
 src/gallium/drivers/r600/r600_pipe.h|   14 +-
 src/gallium/drivers/r600/r600_shader.c  |1 +
 src/gallium/drivers/r600/r600_shader.h  |1 +
 src/gallium/drivers/r600/r600_state.c   |  166 +++---
 src/gallium/drivers/r600/r600_state_common.c|   38 +++--
 8 files changed, 203 insertions(+), 232 deletions(-)

diff --git a/src/gallium/drivers/r600/evergreen_hw_context.c 
b/src/gallium/drivers/r600/evergreen_hw_context.c
index f81d7f3..730e51f 100644
--- a/src/gallium/drivers/r600/evergreen_hw_context.c
+++ b/src/gallium/drivers/r600/evergreen_hw_context.c
@@ -29,17 +29,6 @@
 #include util/u_math.h
 
 static const struct r600_reg evergreen_context_reg_list[] = {
-   {R_02861C_SPI_VS_OUT_ID_0, 0, 0},
-   {R_028620_SPI_VS_OUT_ID_1, 0, 0},
-   {R_028624_SPI_VS_OUT_ID_2, 0, 0},
-   {R_028628_SPI_VS_OUT_ID_3, 0, 0},
-   {R_02862C_SPI_VS_OUT_ID_4, 0, 0},
-   {R_028630_SPI_VS_OUT_ID_5, 0, 0},
-   {R_028634_SPI_VS_OUT_ID_6, 0, 0},
-   {R_028638_SPI_VS_OUT_ID_7, 0, 0},
-   {R_02863C_SPI_VS_OUT_ID_8, 0, 0},
-   {R_028640_SPI_VS_OUT_ID_9, 0, 0},
-   {GROUP_FORCE_NEW_BLOCK, 0, 0},
{R_028644_SPI_PS_INPUT_CNTL_0, 0, 0},
{R_028648_SPI_PS_INPUT_CNTL_1, 0, 0},
{R_02864C_SPI_PS_INPUT_CNTL_2, 0, 0},
@@ -73,7 +62,6 @@ static const struct r600_reg evergreen_context_reg_list[] = {
{R_0286BC_SPI_PS_INPUT_CNTL_30, 0, 0},
{R_0286C0_SPI_PS_INPUT_CNTL_31, 0, 0},
{GROUP_FORCE_NEW_BLOCK, 0, 0},
-   {R_0286C4_SPI_VS_OUT_CONFIG, 0, 0},
{R_0286CC_SPI_PS_IN_CONTROL_0, 0, 0},
{R_0286D0_SPI_PS_IN_CONTROL_1, 0, 0},
{R_0286D8_SPI_INPUT_Z, 0, 0},
@@ -82,21 +70,9 @@ static const struct r600_reg evergreen_context_reg_list[] = {
{R_028840_SQ_PGM_START_PS, REG_FLAG_NEED_BO, 0},
{R_028844_SQ_PGM_RESOURCES_PS, 0, 0},
{R_02884C_SQ_PGM_EXPORTS_PS, 0, 0},
-   {R_02885C_SQ_PGM_START_VS, REG_FLAG_NEED_BO, 0},
-   {R_028860_SQ_PGM_RESOURCES_VS, 0, 0},
 };
 
 static const struct r600_reg cayman_context_reg_list[] = {
-   {R_02861C_SPI_VS_OUT_ID_0, 0, 0},
-   {R_028620_SPI_VS_OUT_ID_1, 0, 0},
-   {R_028624_SPI_VS_OUT_ID_2, 0, 0},
-   {R_028628_SPI_VS_OUT_ID_3, 0, 0},
-   {R_02862C_SPI_VS_OUT_ID_4, 0, 0},
-   {R_028630_SPI_VS_OUT_ID_5, 0, 0},
-   {R_028634_SPI_VS_OUT_ID_6, 0, 0},
-   {R_028638_SPI_VS_OUT_ID_7, 0, 0},
-   {R_02863C_SPI_VS_OUT_ID_8, 0, 0},
-   {R_028640_SPI_VS_OUT_ID_9, 0, 0},
{R_028644_SPI_PS_INPUT_CNTL_0, 0, 0},
{R_028648_SPI_PS_INPUT_CNTL_1, 0, 0},
{R_02864C_SPI_PS_INPUT_CNTL_2, 0, 0},
@@ -129,7 +105,6 @@ static const struct r600_reg cayman_context_reg_list[] = {
{R_0286B8_SPI_PS_INPUT_CNTL_29, 0, 0},
{R_0286BC_SPI_PS_INPUT_CNTL_30, 0, 0},
{R_0286C0_SPI_PS_INPUT_CNTL_31, 0, 0},
-   {R_0286C4_SPI_VS_OUT_CONFIG, 0, 0},
{R_0286CC_SPI_PS_IN_CONTROL_0, 0, 0},
{R_0286D0_SPI_PS_IN_CONTROL_1, 0, 0},
{R_0286D8_SPI_INPUT_Z, 0, 0},
@@ -138,8 +113,6 @@ static const struct r600_reg cayman_context_reg_list[] = {
{R_028840_SQ_PGM_START_PS, REG_FLAG_NEED_BO, 0},
{R_028844_SQ_PGM_RESOURCES_PS, 0, 0},
{R_02884C_SQ_PGM_EXPORTS_PS, 0, 0},
-   {R_02885C_SQ_PGM_START_VS, REG_FLAG_NEED_BO, 0},
-   {R_028860_SQ_PGM_RESOURCES_VS, 0, 0},
 };
 
 int evergreen_context_init(struct r600_context *ctx)
diff --git a/src/gallium/drivers/r600/evergreen_state.c 
b/src/gallium/drivers/r600/evergreen_state.c
index 5c7cd40..c52e4c8 100644
--- a/src/gallium/drivers/r600/evergreen_state.c
+++ b/src/gallium/drivers/r600/evergreen_state.c
@@ -2595,75 +2595,6 @@ static void evergreen_emit_vertex_fetch_shader(struct 
r600_context *rctx, struct
r600_write_value(cs, r600_context_bo_reloc(rctx, rctx-rings.gfx, 
shader-buffer, RADEON_USAGE_READ));
 }
 
-void evergreen_init_state_functions(struct r600_context *rctx)
-{
-   unsigned id = 4;
-
-   /* !!!
-*  To avoid GPU lockup registers must be emited in a specific order
-* (no kidding ...). The order below is important and have been
-* partialy infered from analyzing fglrx command stream.
-*
-* Don't reorder atom without carefully checking the effect (GPU lockup
-* or piglit regression).
-* !!!
-*/
-
-   r600_init_atom(rctx, rctx-framebuffer.atom, id++, 
evergreen_emit_framebuffer_state, 0);
-   /* shader const */
-   r600_init_atom(rctx, rctx-constbuf_state[PIPE_SHADER_VERTEX].atom, 
id++, evergreen_emit_vs_constant_buffers, 0);
-   r600_init_atom(rctx, rctx-constbuf_state[PIPE_SHADER_GEOMETRY].atom, 
id++, evergreen_emit_gs_constant_buffers, 0);
-   r600_init_atom(rctx, 

[Mesa-dev] [PATCH 3/6] r600g: atomize pixel shader

2013-03-03 Thread Marek Olšák
---
 src/gallium/drivers/r600/evergreen_hw_context.c |   96 ---
 src/gallium/drivers/r600/evergreen_state.c  |   69 
 src/gallium/drivers/r600/evergreend.h   |1 +
 src/gallium/drivers/r600/r600_hw_context.c  |   50 +---
 src/gallium/drivers/r600/r600_pipe.h|9 ++-
 src/gallium/drivers/r600/r600_state.c   |   45 ++-
 src/gallium/drivers/r600/r600_state_common.c|   20 +++--
 7 files changed, 83 insertions(+), 207 deletions(-)

diff --git a/src/gallium/drivers/r600/evergreen_hw_context.c 
b/src/gallium/drivers/r600/evergreen_hw_context.c
index 730e51f..a3528fc 100644
--- a/src/gallium/drivers/r600/evergreen_hw_context.c
+++ b/src/gallium/drivers/r600/evergreen_hw_context.c
@@ -28,107 +28,11 @@
 #include util/u_memory.h
 #include util/u_math.h
 
-static const struct r600_reg evergreen_context_reg_list[] = {
-   {R_028644_SPI_PS_INPUT_CNTL_0, 0, 0},
-   {R_028648_SPI_PS_INPUT_CNTL_1, 0, 0},
-   {R_02864C_SPI_PS_INPUT_CNTL_2, 0, 0},
-   {R_028650_SPI_PS_INPUT_CNTL_3, 0, 0},
-   {R_028654_SPI_PS_INPUT_CNTL_4, 0, 0},
-   {R_028658_SPI_PS_INPUT_CNTL_5, 0, 0},
-   {R_02865C_SPI_PS_INPUT_CNTL_6, 0, 0},
-   {R_028660_SPI_PS_INPUT_CNTL_7, 0, 0},
-   {R_028664_SPI_PS_INPUT_CNTL_8, 0, 0},
-   {R_028668_SPI_PS_INPUT_CNTL_9, 0, 0},
-   {R_02866C_SPI_PS_INPUT_CNTL_10, 0, 0},
-   {R_028670_SPI_PS_INPUT_CNTL_11, 0, 0},
-   {R_028674_SPI_PS_INPUT_CNTL_12, 0, 0},
-   {R_028678_SPI_PS_INPUT_CNTL_13, 0, 0},
-   {R_02867C_SPI_PS_INPUT_CNTL_14, 0, 0},
-   {R_028680_SPI_PS_INPUT_CNTL_15, 0, 0},
-   {R_028684_SPI_PS_INPUT_CNTL_16, 0, 0},
-   {R_028688_SPI_PS_INPUT_CNTL_17, 0, 0},
-   {R_02868C_SPI_PS_INPUT_CNTL_18, 0, 0},
-   {R_028690_SPI_PS_INPUT_CNTL_19, 0, 0},
-   {R_028694_SPI_PS_INPUT_CNTL_20, 0, 0},
-   {R_028698_SPI_PS_INPUT_CNTL_21, 0, 0},
-   {R_02869C_SPI_PS_INPUT_CNTL_22, 0, 0},
-   {R_0286A0_SPI_PS_INPUT_CNTL_23, 0, 0},
-   {R_0286A4_SPI_PS_INPUT_CNTL_24, 0, 0},
-   {R_0286A8_SPI_PS_INPUT_CNTL_25, 0, 0},
-   {R_0286AC_SPI_PS_INPUT_CNTL_26, 0, 0},
-   {R_0286B0_SPI_PS_INPUT_CNTL_27, 0, 0},
-   {R_0286B4_SPI_PS_INPUT_CNTL_28, 0, 0},
-   {R_0286B8_SPI_PS_INPUT_CNTL_29, 0, 0},
-   {R_0286BC_SPI_PS_INPUT_CNTL_30, 0, 0},
-   {R_0286C0_SPI_PS_INPUT_CNTL_31, 0, 0},
-   {GROUP_FORCE_NEW_BLOCK, 0, 0},
-   {R_0286CC_SPI_PS_IN_CONTROL_0, 0, 0},
-   {R_0286D0_SPI_PS_IN_CONTROL_1, 0, 0},
-   {R_0286D8_SPI_INPUT_Z, 0, 0},
-   {R_0286E0_SPI_BARYC_CNTL, 0, 0},
-   {R_0286E4_SPI_PS_IN_CONTROL_2, 0, 0},
-   {R_028840_SQ_PGM_START_PS, REG_FLAG_NEED_BO, 0},
-   {R_028844_SQ_PGM_RESOURCES_PS, 0, 0},
-   {R_02884C_SQ_PGM_EXPORTS_PS, 0, 0},
-};
-
-static const struct r600_reg cayman_context_reg_list[] = {
-   {R_028644_SPI_PS_INPUT_CNTL_0, 0, 0},
-   {R_028648_SPI_PS_INPUT_CNTL_1, 0, 0},
-   {R_02864C_SPI_PS_INPUT_CNTL_2, 0, 0},
-   {R_028650_SPI_PS_INPUT_CNTL_3, 0, 0},
-   {R_028654_SPI_PS_INPUT_CNTL_4, 0, 0},
-   {R_028658_SPI_PS_INPUT_CNTL_5, 0, 0},
-   {R_02865C_SPI_PS_INPUT_CNTL_6, 0, 0},
-   {R_028660_SPI_PS_INPUT_CNTL_7, 0, 0},
-   {R_028664_SPI_PS_INPUT_CNTL_8, 0, 0},
-   {R_028668_SPI_PS_INPUT_CNTL_9, 0, 0},
-   {R_02866C_SPI_PS_INPUT_CNTL_10, 0, 0},
-   {R_028670_SPI_PS_INPUT_CNTL_11, 0, 0},
-   {R_028674_SPI_PS_INPUT_CNTL_12, 0, 0},
-   {R_028678_SPI_PS_INPUT_CNTL_13, 0, 0},
-   {R_02867C_SPI_PS_INPUT_CNTL_14, 0, 0},
-   {R_028680_SPI_PS_INPUT_CNTL_15, 0, 0},
-   {R_028684_SPI_PS_INPUT_CNTL_16, 0, 0},
-   {R_028688_SPI_PS_INPUT_CNTL_17, 0, 0},
-   {R_02868C_SPI_PS_INPUT_CNTL_18, 0, 0},
-   {R_028690_SPI_PS_INPUT_CNTL_19, 0, 0},
-   {R_028694_SPI_PS_INPUT_CNTL_20, 0, 0},
-   {R_028698_SPI_PS_INPUT_CNTL_21, 0, 0},
-   {R_02869C_SPI_PS_INPUT_CNTL_22, 0, 0},
-   {R_0286A0_SPI_PS_INPUT_CNTL_23, 0, 0},
-   {R_0286A4_SPI_PS_INPUT_CNTL_24, 0, 0},
-   {R_0286A8_SPI_PS_INPUT_CNTL_25, 0, 0},
-   {R_0286AC_SPI_PS_INPUT_CNTL_26, 0, 0},
-   {R_0286B0_SPI_PS_INPUT_CNTL_27, 0, 0},
-   {R_0286B4_SPI_PS_INPUT_CNTL_28, 0, 0},
-   {R_0286B8_SPI_PS_INPUT_CNTL_29, 0, 0},
-   {R_0286BC_SPI_PS_INPUT_CNTL_30, 0, 0},
-   {R_0286C0_SPI_PS_INPUT_CNTL_31, 0, 0},
-   {R_0286CC_SPI_PS_IN_CONTROL_0, 0, 0},
-   {R_0286D0_SPI_PS_IN_CONTROL_1, 0, 0},
-   {R_0286D8_SPI_INPUT_Z, 0, 0},
-   {R_0286E0_SPI_BARYC_CNTL, 0, 0},
-   {R_0286E4_SPI_PS_IN_CONTROL_2, 0, 0},
-   {R_028840_SQ_PGM_START_PS, REG_FLAG_NEED_BO, 0},
-   {R_028844_SQ_PGM_RESOURCES_PS, 0, 0},
-   {R_02884C_SQ_PGM_EXPORTS_PS, 0, 0},
-};
-
 int evergreen_context_init(struct r600_context *ctx)
 {
int r = 0;
 
/* add blocks */
-   if (ctx-family = CHIP_CAYMAN)
-   r = r600_context_add_block(ctx, cayman_context_reg_list,
-  

[Mesa-dev] [PATCH 4/6] r600g: remove deprecated state management code

2013-03-03 Thread Marek Olšák
It's nice to see so much code that did pretty much nothing go away.
---
 src/gallium/drivers/r600/evergreen_compute.c   |1 -
 .../drivers/r600/evergreen_compute_internal.h  |1 -
 src/gallium/drivers/r600/evergreen_hw_context.c|   16 -
 src/gallium/drivers/r600/r600.h|   79 
 src/gallium/drivers/r600/r600_hw_context.c |  377 
 src/gallium/drivers/r600/r600_hw_context_priv.h|   23 --
 src/gallium/drivers/r600/r600_pipe.c   |   16 +-
 src/gallium/drivers/r600/r600_pipe.h   |8 -
 src/gallium/drivers/r600/r600_shader.h |1 -
 src/gallium/drivers/r600/r600_state_common.c   |   40 ---
 10 files changed, 2 insertions(+), 560 deletions(-)

diff --git a/src/gallium/drivers/r600/evergreen_compute.c 
b/src/gallium/drivers/r600/evergreen_compute.c
index 796fcf1..f1be350 100644
--- a/src/gallium/drivers/r600/evergreen_compute.c
+++ b/src/gallium/drivers/r600/evergreen_compute.c
@@ -430,7 +430,6 @@ static void compute_emit_cs(struct r600_context *ctx, const 
uint *block_layout,
 
ctx-ws-cs_flush(ctx-rings.gfx.cs, flush_flags);
 
-   ctx-pm4_dirty_cdwords = 0;
ctx-flags = 0;
 
COMPUTE_DBG(ctx-screen, shader started\n);
diff --git a/src/gallium/drivers/r600/evergreen_compute_internal.h 
b/src/gallium/drivers/r600/evergreen_compute_internal.h
index 328ce26..b1a180f 100644
--- a/src/gallium/drivers/r600/evergreen_compute_internal.h
+++ b/src/gallium/drivers/r600/evergreen_compute_internal.h
@@ -58,7 +58,6 @@ struct evergreen_compute_resource {
 };
 
 struct compute_sampler_state {
-   struct r600_pipe_state base;
struct pipe_sampler_state state;
 };
 
diff --git a/src/gallium/drivers/r600/evergreen_hw_context.c 
b/src/gallium/drivers/r600/evergreen_hw_context.c
index a3528fc..88097d3 100644
--- a/src/gallium/drivers/r600/evergreen_hw_context.c
+++ b/src/gallium/drivers/r600/evergreen_hw_context.c
@@ -28,22 +28,6 @@
 #include util/u_memory.h
 #include util/u_math.h
 
-int evergreen_context_init(struct r600_context *ctx)
-{
-   int r = 0;
-
-   /* add blocks */
-   r = r600_setup_block_table(ctx);
-   if (r)
-   goto out_err;
-
-   ctx-max_db = 8;
-   return 0;
-out_err:
-   r600_context_fini(ctx);
-   return r;
-}
-
 void evergreen_flush_vgt_streamout(struct r600_context *ctx)
 {
struct radeon_winsys_cs *cs = ctx-rings.gfx.cs;
diff --git a/src/gallium/drivers/r600/r600.h b/src/gallium/drivers/r600/r600.h
index 15196f7..a71e152 100644
--- a/src/gallium/drivers/r600/r600.h
+++ b/src/gallium/drivers/r600/r600.h
@@ -63,63 +63,6 @@ struct r600_resource {
struct util_range   valid_buffer_range;
 };
 
-#define R600_BLOCK_MAX_BO  32
-#define R600_BLOCK_MAX_REG 128
-
-/* each range covers 9 bits of dword space = 512 dwords = 2k bytes */
-/* there is a block entry for each register so 512 blocks */
-/* we have no registers to read/write below 0x8000 (0x2000 in dw space) */
-/* we use some fake offsets at 0x4 to do evergreen sampler borders so take 
0x42000 as a max bound*/
-#define RANGE_OFFSET_START 0x8000
-#define HASH_SHIFT 9
-#define NUM_RANGES (0x42000 - RANGE_OFFSET_START) / (4  HASH_SHIFT) /* 128 
 9 = 64k */
-
-#define CTX_RANGE_ID(offset) offset - RANGE_OFFSET_START)  2)  
HASH_SHIFT)  255)
-#define CTX_BLOCK_ID(offset) (((offset - RANGE_OFFSET_START)  2)  ((1  
HASH_SHIFT) - 1))
-
-struct r600_pipe_reg {
-   uint32_tvalue;
-   struct r600_block   *block;
-   struct r600_resource*bo;
-   enum radeon_bo_usagebo_usage;
-   uint32_tid;
-};
-
-struct r600_pipe_state {
-   unsignedid;
-   unsignednregs;
-   struct r600_pipe_regregs[R600_BLOCK_MAX_REG];
-};
-
-#define R600_BLOCK_STATUS_ENABLED  (1  0)
-#define R600_BLOCK_STATUS_DIRTY(1  1)
-
-struct r600_block_reloc {
-   struct r600_resource*bo;
-   enum radeon_bo_usagebo_usage;
-   unsignedbo_pm4_index;
-};
-
-struct r600_block {
-   struct list_headlist;
-   struct list_headenable_list;
-   unsignedstatus;
-   unsignedflags;
-   unsignedstart_offset;
-   unsignedpm4_ndwords;
-   unsignednbo;
-   uint16_tnreg;
-   uint16_tnreg_dirty;
-   uint32_t*reg;
-   uint32_tpm4[R600_BLOCK_MAX_REG];
-   unsignedpm4_bo_index[R600_BLOCK_MAX_REG];
-   struct r600_block_reloc reloc[R600_BLOCK_MAX_BO];
-};
-
-struct r600_range {
-   struct r600_block   **blocks;
-};
-
 struct r600_query_buffer {
/* The buffer where query results are stored. */
struct 

[Mesa-dev] [PATCH 5/6] r600g: remove r600_hw_context_priv.h, move the stuff to r600_pipe.h

2013-03-03 Thread Marek Olšák
---
 src/gallium/drivers/r600/evergreen_compute.c   |1 -
 .../drivers/r600/evergreen_compute_internal.c  |1 -
 src/gallium/drivers/r600/evergreen_hw_context.c|2 +-
 src/gallium/drivers/r600/r600_hw_context.c |2 +-
 src/gallium/drivers/r600/r600_hw_context_priv.h|   42 
 src/gallium/drivers/r600/r600_pipe.h   |   11 +
 6 files changed, 13 insertions(+), 46 deletions(-)
 delete mode 100644 src/gallium/drivers/r600/r600_hw_context_priv.h

diff --git a/src/gallium/drivers/r600/evergreen_compute.c 
b/src/gallium/drivers/r600/evergreen_compute.c
index f1be350..785d5e7 100644
--- a/src/gallium/drivers/r600/evergreen_compute.c
+++ b/src/gallium/drivers/r600/evergreen_compute.c
@@ -45,7 +45,6 @@
 #include r600_pipe.h
 #include r600_formats.h
 #include evergreen_compute.h
-#include r600_hw_context_priv.h
 #include evergreen_compute_internal.h
 #include compute_memory_pool.h
 #ifdef HAVE_OPENCL
diff --git a/src/gallium/drivers/r600/evergreen_compute_internal.c 
b/src/gallium/drivers/r600/evergreen_compute_internal.c
index c671478..89f8380 100644
--- a/src/gallium/drivers/r600/evergreen_compute_internal.c
+++ b/src/gallium/drivers/r600/evergreen_compute_internal.c
@@ -44,7 +44,6 @@
 #include evergreend.h
 #include evergreen_compute.h
 #include evergreen_compute_internal.h
-#include r600_hw_context_priv.h
 
 int get_compute_resource_num(void)
 {
diff --git a/src/gallium/drivers/r600/evergreen_hw_context.c 
b/src/gallium/drivers/r600/evergreen_hw_context.c
index 88097d3..d980c18 100644
--- a/src/gallium/drivers/r600/evergreen_hw_context.c
+++ b/src/gallium/drivers/r600/evergreen_hw_context.c
@@ -23,7 +23,7 @@
  * Authors:
  *  Jerome Glisse
  */
-#include r600_hw_context_priv.h
+#include r600_pipe.h
 #include evergreend.h
 #include util/u_memory.h
 #include util/u_math.h
diff --git a/src/gallium/drivers/r600/r600_hw_context.c 
b/src/gallium/drivers/r600/r600_hw_context.c
index c03c3b3..b4fb3bf 100644
--- a/src/gallium/drivers/r600/r600_hw_context.c
+++ b/src/gallium/drivers/r600/r600_hw_context.c
@@ -23,7 +23,7 @@
  * Authors:
  *  Jerome Glisse
  */
-#include r600_hw_context_priv.h
+#include r600_pipe.h
 #include r600d.h
 #include util/u_memory.h
 #include errno.h
diff --git a/src/gallium/drivers/r600/r600_hw_context_priv.h 
b/src/gallium/drivers/r600/r600_hw_context_priv.h
deleted file mode 100644
index 49b7a26..000
--- a/src/gallium/drivers/r600/r600_hw_context_priv.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright 2010 Jerome Glisse gli...@freedesktop.org
- *
- * 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
- * on 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
- * THE AUTHOR(S) AND/OR THEIR 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.
- *
- * Authors:
- *  Jerome Glisse
- */
-#ifndef R600_PRIV_H
-#define R600_PRIV_H
-
-#include r600_pipe.h
-
-/* the number of CS dwords for flushing and drawing */
-#define R600_MAX_FLUSH_CS_DWORDS   16
-#define R600_MAX_DRAW_CS_DWORDS34
-#define R600_TRACE_CS_DWORDS   7
-
-/*
- * evergreen_hw_context.c
- */
-void evergreen_flush_vgt_streamout(struct r600_context *ctx);
-void evergreen_set_streamout_enable(struct r600_context *ctx, unsigned 
buffer_enable_bit);
-
-#endif
diff --git a/src/gallium/drivers/r600/r600_pipe.h 
b/src/gallium/drivers/r600/r600_pipe.h
index 9a3cb2c..dd92a01 100644
--- a/src/gallium/drivers/r600/r600_pipe.h
+++ b/src/gallium/drivers/r600/r600_pipe.h
@@ -38,6 +38,11 @@
 
 #define R600_TRACE_CS 0
 
+/* the number of CS dwords for flushing and drawing */
+#define R600_MAX_FLUSH_CS_DWORDS   16
+#define R600_MAX_DRAW_CS_DWORDS34
+#define R600_TRACE_CS_DWORDS   7
+
 #define R600_MAX_USER_CONST_BUFFERS 13
 #define R600_MAX_DRIVER_CONST_BUFFERS 3
 #define R600_MAX_CONST_BUFFERS (R600_MAX_USER_CONST_BUFFERS + 
R600_MAX_DRIVER_CONST_BUFFERS)
@@ -735,6 +740,12 @@ unsigned r600_get_swizzle_combined(const unsigned char 
*swizzle_format,
 void r600_emit_streamout_begin(struct r600_context *ctx, 

[Mesa-dev] [PATCH 6/6] r600g: remove r600.h, move the stuff elsewhere (mostly to r600_pipe.h)

2013-03-03 Thread Marek Olšák
---
 src/gallium/drivers/r600/compute_memory_pool.c |1 -
 src/gallium/drivers/r600/evergreen_compute.c   |1 -
 src/gallium/drivers/r600/evergreen_compute.h   |1 -
 .../drivers/r600/evergreen_compute_internal.c  |1 -
 src/gallium/drivers/r600/r600.h|  155 
 src/gallium/drivers/r600/r600_llvm.c   |1 -
 src/gallium/drivers/r600/r600_pipe.h   |  107 +-
 src/gallium/drivers/r600/r600_resource.h   |   26 +++-
 8 files changed, 126 insertions(+), 167 deletions(-)
 delete mode 100644 src/gallium/drivers/r600/r600.h

diff --git a/src/gallium/drivers/r600/compute_memory_pool.c 
b/src/gallium/drivers/r600/compute_memory_pool.c
index ee1954e..454af90 100644
--- a/src/gallium/drivers/r600/compute_memory_pool.c
+++ b/src/gallium/drivers/r600/compute_memory_pool.c
@@ -33,7 +33,6 @@
 #include util/u_memory.h
 #include util/u_inlines.h
 #include util/u_framebuffer.h
-#include r600.h
 #include r600_resource.h
 #include r600_shader.h
 #include r600_pipe.h
diff --git a/src/gallium/drivers/r600/evergreen_compute.c 
b/src/gallium/drivers/r600/evergreen_compute.c
index 785d5e7..80ce739 100644
--- a/src/gallium/drivers/r600/evergreen_compute.c
+++ b/src/gallium/drivers/r600/evergreen_compute.c
@@ -38,7 +38,6 @@
 #include util/u_inlines.h
 #include util/u_framebuffer.h
 #include pipebuffer/pb_buffer.h
-#include r600.h
 #include evergreend.h
 #include r600_resource.h
 #include r600_shader.h
diff --git a/src/gallium/drivers/r600/evergreen_compute.h 
b/src/gallium/drivers/r600/evergreen_compute.h
index 69e41cc..f593432 100644
--- a/src/gallium/drivers/r600/evergreen_compute.h
+++ b/src/gallium/drivers/r600/evergreen_compute.h
@@ -26,7 +26,6 @@
 
 #ifndef EVERGREEN_COMPUTE_H
 #define EVERGREEN_COMPUTE_H
-#include r600.h
 #include r600_pipe.h
 
 struct r600_atom;
diff --git a/src/gallium/drivers/r600/evergreen_compute_internal.c 
b/src/gallium/drivers/r600/evergreen_compute_internal.c
index 89f8380..66a5f39 100644
--- a/src/gallium/drivers/r600/evergreen_compute_internal.c
+++ b/src/gallium/drivers/r600/evergreen_compute_internal.c
@@ -36,7 +36,6 @@
 #include util/u_memory.h
 #include util/u_inlines.h
 #include util/u_framebuffer.h
-#include r600.h
 #include r600_resource.h
 #include r600_shader.h
 #include r600_pipe.h
diff --git a/src/gallium/drivers/r600/r600.h b/src/gallium/drivers/r600/r600.h
deleted file mode 100644
index a71e152..000
--- a/src/gallium/drivers/r600/r600.h
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- * Copyright 2010 Jerome Glisse gli...@freedesktop.org
- *
- * 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
- * on 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
- * THE AUTHOR(S) AND/OR THEIR 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.
- *
- * Authors:
- *  Jerome Glisse
- */
-#ifndef R600_H
-#define R600_H
-
-#include ../../winsys/radeon/drm/radeon_winsys.h
-#include util/u_double_list.h
-#include util/u_range.h
-#include util/u_transfer.h
-
-#define R600_ERR(fmt, args...) \
-   fprintf(stderr, EE %s:%d %s - fmt, __FILE__, __LINE__, __func__, 
##args)
-
-struct winsys_handle;
-
-struct r600_tiling_info {
-   unsigned num_channels;
-   unsigned num_banks;
-   unsigned group_bytes;
-};
-
-struct r600_resource {
-   struct u_resource   b;
-
-   /* Winsys objects. */
-   struct pb_buffer*buf;
-   struct radeon_winsys_cs_handle  *cs_buf;
-
-   /* Resource state. */
-   unsigneddomains;
-
-   /* The buffer range which is initialized (with a write transfer,
-* streamout, DMA, or as a random access target). The rest of
-* the buffer is considered invalid and can be mapped unsynchronized.
-*
-* This allows unsychronized mapping of a buffer range which hasn't
-* been used yet. It's for applications which forget to use
-* the unsynchronized map flag and expect the driver to figure it out.
- */
-   struct util_range  

[Mesa-dev] [PATCH] r600g: allocate FMASK right after the texture, so that it's aligned with it

2013-03-03 Thread Marek Olšák
This avoids the kernel CS checker errors with MSAA textures.
---
 src/gallium/drivers/r600/r600_texture.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/r600/r600_texture.c 
b/src/gallium/drivers/r600/r600_texture.c
index 484045e..4825592 100644
--- a/src/gallium/drivers/r600/r600_texture.c
+++ b/src/gallium/drivers/r600/r600_texture.c
@@ -435,8 +435,8 @@ r600_texture_create_object(struct pipe_screen *screen,
}
 
if (base-nr_samples  1  !rtex-is_depth  !buf) {
-   r600_texture_allocate_cmask(rscreen, rtex);
r600_texture_allocate_fmask(rscreen, rtex);
+   r600_texture_allocate_cmask(rscreen, rtex);
}
 
if (!rtex-is_depth  base-nr_samples  1 
-- 
1.7.10.4

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


[Mesa-dev] [Bug 44239] spring rts crashes with r300g

2013-03-03 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=44239

--- Comment #12 from Marek Olšák mar...@gmail.com ---
(In reply to comment #11)
 This can be easily reproduced using r300g, softpipe or llvmpipe with this
 webgl test:
 https://www.khronos.org/registry/webgl/sdk/tests/conformance/misc/type-
 conversion-test.html
 This was tested with firefox 18.0. To test with llvmpipe or softpipe you
 probably also need to set webgl.force-enabled=true in about:config, since it
 seems they are blacklisted.
 
 Backtrace:
 ../../src/mesa/state_tracker/st_cb_texture.c:271:guess_base_level_size:
 Assertion `width = 1' failed.
 
 Program received signal SIGTRAP, Trace/breakpoint trap.
 0x9b325885 in _debug_assert_fail (expr=0x9bd25ac7 width = 1, file=
 0x9bd25a98 ../../src/mesa/state_tracker/st_cb_texture.c, line=271, 
 function=0x9bd25ff2 guess_base_level_size) at util/u_debug.c:278
 278 os_abort();
 (gdb) bt full
 #0  0x9b325885 in _debug_assert_fail (expr=0x9bd25ac7 width = 1, file=
 0x9bd25a98 ../../src/mesa/state_tracker/st_cb_texture.c, line=271, 
 function=0x9bd25ff2 guess_base_level_size) at util/u_debug.c:278
 No locals.
 #1  0x9b1e4d94 in guess_base_level_size (target=3553, width=0, height=1,
 depth=
 1, level=0, width0=0xbfff91d0, height0=0xbfff91cc, depth0=0xbfff91c8)
 at ../../src/mesa/state_tracker/st_cb_texture.c:271
 __FUNCTION__ = guess_base_level_size
 #2  0x9b1e4fbd in guess_and_alloc_texture (st=0xa4dd1000, stObj=0x9db9a000, 
 stImage=0xa4b89dd0) at ../../src/mesa/state_tracker/st_cb_texture.c:353
 lastLevel = 0
 width = 0
 height = 2602451981
 depth = 3221197304
 bindings = 0
 ptWidth = 2619001788
 ptHeight = 3221197276
 ptDepth = 15981728
 ptLayers = 2152398528
 fmt = 2603772240
 __FUNCTION__ = guess_and_alloc_texture
 #3  0x9b1e5323 in st_AllocTextureImageBuffer (ctx=0xa7c3e000, texImage=
 0xa4b89dd0) at ../../src/mesa/state_tracker/st_cb_texture.c:459
 st = 0xa4dd1000
 stImage = 0xa4b89dd0
 stObj = 0x9db9a000
 level = 0
 width = 0
 height = 1
 depth = 1
 __FUNCTION__ = st_AllocTextureImageBuffer
 #4  0x9b15fbe8 in copyteximage (ctx=0xa7c3e000, dims=2, target=3553,
 level=0, 
 internalFormat=6408, x=0, y=0, width=0, height=1, border=0)
 at ../../src/mesa/main/teximage.c:3444
 dstX = 0
 dstY = 0
 srcX = 0
 srcY = 0
 dstZ = 0
 texObj = 0x9db9a000
 texImage = 0xa4b89dd0
 face = 0
 texFormat = MESA_FORMAT_RGBA_REV
 __FUNCTION__ = copyteximage
 __PRETTY_FUNCTION__ = copyteximage
 #5  0x9b15fe20 in _mesa_CopyTexImage2D (target=3553, level=0, internalFormat=
 6408, x=0, y=0, width=0, height=1, border=0)
 at ../../src/mesa/main/teximage.c:3485
 ctx = 0xa7c3e000
 #6  0x4c7a4f94 in ?? () from /usr/lib/xulrunner/libxul.so
 No symbol table info available.
 #7  0x4c7a6499 in ?? () from /usr/lib/xulrunner/libxul.so
 No symbol table info available.

This is a different issue and easily fixable. I'm afraid it won't help fix the
original bug.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [Bug 58210] vmwgfx freezes system when starting Xorg

2013-03-03 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=58210

José Fonseca jfons...@vmware.com changed:

   What|Removed |Added

 CC||bri...@vmware.com,
   ||jfons...@vmware.com,
   ||za...@vmware.com

--- Comment #2 from José Fonseca jfons...@vmware.com ---
(In reply to comment #1)
 Removing assert(svga_texture(texture)-key.cachable == 0); at
 svga_resource_texture.c:207 seems to fix this...

The assertion should only affect debug builds. Does Xorg only crash on debug
builds?

The fact the assertion fails means we're trying to share a resource which
wasn't created shareable by the state tracker...

We set svga_texture(texture)-key.cachable = 0 on the next line, so things
should still sort of work, bu I think this is the symptom of some other issue
with resource creation.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] mesa: check width and height in copyteximage

2013-03-03 Thread Marek Olšák
This WebGL test sets width and height to 0:
https://www.khronos.org/registry/webgl/sdk/tests/conformance/misc/type-conversion-test.html

It causes assertion failures in the state tracker.
---
 src/mesa/main/teximage.c |4 
 1 file changed, 4 insertions(+)

diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 0dcf88a..7ec5fdb 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -3453,6 +3453,10 @@ copyteximage(struct gl_context *ctx, GLuint dims,
   return;
}
 
+   if (!width || !height) {
+  return; /* undefined behavior? */
+   }
+
texObj = _mesa_get_current_tex_object(ctx, target);
assert(texObj);
 
-- 
1.7.10.4

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


Re: [Mesa-dev] [PATCH v2 2/5] dri: Add another duplicateImage to DRIimageExtension which allows you to create a sRGB view of a DRI image

2013-03-03 Thread Jakob Bornecrantz
On Sun, Mar 3, 2013 at 7:03 AM, John Kåre Alsaker
john.kare.alsa...@gmail.com wrote:
 duplicateImage will allow you to create a linear or sRGB view into a DRIimage 
 you have access to.
 This is useful because compositors may want a specific view which doesn't 
 correspond to the one used by applications.
 ---
  include/GL/internal/dri_interface.h | 21 -
  1 file changed, 20 insertions(+), 1 deletion(-)

 diff --git a/include/GL/internal/dri_interface.h 
 b/include/GL/internal/dri_interface.h
 index 42147e9..f4948a8 100644
 --- a/include/GL/internal/dri_interface.h
 +++ b/include/GL/internal/dri_interface.h
 @@ -938,7 +938,7 @@ struct __DRIdri2ExtensionRec {
   * extensions.
   */
  #define __DRI_IMAGE DRI_IMAGE
 -#define __DRI_IMAGE_VERSION 6
 +#define __DRI_IMAGE_VERSION 7

  /**
   * These formats correspond to the similarly named MESA_FORMAT_*
 @@ -1009,6 +1009,15 @@ struct __DRIdri2ExtensionRec {
  #define __DRI_IMAGE_COMPONENTS_Y_UV0x3004
  #define __DRI_IMAGE_COMPONENTS_Y_XUXV  0x3005

 +/**
 + * Flags for duplicateImage.
 + *
 + * \since 7
 + */
 +
 +#define __DRI_IMAGE_FLAG_SRGB_VIEW 0x0001
 +#define __DRI_IMAGE_FLAG_LINEAR_VIEW   0x0002
 +

These really should just be another set of formats, since that is
how they are handled gallium anyways.

Cheers, Jakob.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH v2 3/5] gallium: Implement DRIimageExtension.duplicateImage

2013-03-03 Thread Jakob Bornecrantz
On Sun, Mar 3, 2013 at 7:03 AM, John Kåre Alsaker
john.kare.alsa...@gmail.com wrote:
 ---
  src/gallium/include/state_tracker/st_api.h |  1 +
  src/gallium/state_trackers/dri/common/dri_screen.c |  1 +
  src/gallium/state_trackers/dri/common/dri_screen.h |  1 +
  src/gallium/state_trackers/dri/drm/dri2.c  | 39 
 +-
  src/mesa/state_tracker/st_manager.c|  4 +++
  5 files changed, 45 insertions(+), 1 deletion(-)

 diff --git a/src/gallium/include/state_tracker/st_api.h 
 b/src/gallium/include/state_tracker/st_api.h
 index 9f3d2a1..1e63ed3 100644
 --- a/src/gallium/include/state_tracker/st_api.h
 +++ b/src/gallium/include/state_tracker/st_api.h
 @@ -203,6 +203,7 @@ struct st_egl_image
  {
 /* this is owned by the caller */
 struct pipe_resource *texture;
 +   enum pipe_format format;

 unsigned level;
 unsigned layer;
 diff --git a/src/gallium/state_trackers/dri/common/dri_screen.c 
 b/src/gallium/state_trackers/dri/common/dri_screen.c
 index a908e28..92abaf9 100644
 --- a/src/gallium/state_trackers/dri/common/dri_screen.c
 +++ b/src/gallium/state_trackers/dri/common/dri_screen.c
 @@ -315,6 +315,7 @@ dri_get_egl_image(struct st_manager *smapi,

 stimg-texture = NULL;
 pipe_resource_reference(stimg-texture, img-texture);
 +   stimg-format = img-format;
 stimg-level = img-level;
 stimg-layer = img-layer;

 diff --git a/src/gallium/state_trackers/dri/common/dri_screen.h 
 b/src/gallium/state_trackers/dri/common/dri_screen.h
 index 181b22f..d37c393 100644
 --- a/src/gallium/state_trackers/dri/common/dri_screen.h
 +++ b/src/gallium/state_trackers/dri/common/dri_screen.h
 @@ -84,6 +84,7 @@ dri_screen(__DRIscreen * sPriv)

  struct __DRIimageRec {
 struct pipe_resource *texture;
 +   enum pipe_format format;
 unsigned level;
 unsigned layer;
 uint32_t dri_format;
 diff --git a/src/gallium/state_trackers/dri/drm/dri2.c 
 b/src/gallium/state_trackers/dri/drm/dri2.c
 index f8d311c..54339fe 100644
 --- a/src/gallium/state_trackers/dri/drm/dri2.c
 +++ b/src/gallium/state_trackers/dri/drm/dri2.c
 @@ -658,6 +658,7 @@ dri2_dup_image(__DRIimage *image, void *loaderPrivate)
 pipe_resource_reference(img-texture, image-texture);
 img-level = image-level;
 img-layer = image-layer;
 +   img-format = image-format;
 /* This should be 0 for sub images, but dup is also used for base images. 
 */
 img-dri_components = image-dri_components;
 img-loader_private = loaderPrivate;
 @@ -749,6 +750,40 @@ dri2_from_planar(__DRIimage *image, int plane, void 
 *loaderPrivate)
 return img;
  }

 +static __DRIimage *
 +dri2_duplicate_image(__DRIscreen *_screen, __DRIimage *image,
 + unsigned int flags, void *loaderPrivate)
 +{
 +   enum pipe_format format;
 +   struct dri_screen *screen = dri_screen(_screen);
 +   __DRIimage *img = NULL;
 +
 +   if((flags  __DRI_IMAGE_FLAG_SRGB_VIEW)  (flags  
 __DRI_IMAGE_FLAG_LINEAR_VIEW))
 +  return NULL;
 +
 +   if(flags  (__DRI_IMAGE_FLAG_SRGB_VIEW | __DRI_IMAGE_FLAG_LINEAR_VIEW)) {
 +  if(!image-texture)
 + return NULL;
 +
 +  if(flags  __DRI_IMAGE_FLAG_SRGB_VIEW)
 + format = util_format_srgb(image-texture-format);
 +  else
 + format = util_format_linear(image-texture-format);
 +
 +  if(!screen-base.screen-is_format_supported(screen-base.screen, 
 format, PIPE_TEXTURE_2D, 0, PIPE_BIND_SAMPLER_VIEW))
 + return NULL;
 +
 +  img = dri2_dup_image(image, loaderPrivate);
 +
 +  if (img)
 + img-format = format;
 +   } else if (flags == 0) {
 +  img = dri2_dup_image(image, loaderPrivate);
 +   }
 +
 +   return img;
 +}
 +
  static void
  dri2_destroy_image(__DRIimage *img)
  {
 @@ -757,7 +792,7 @@ dri2_destroy_image(__DRIimage *img)
  }

  static struct __DRIimageExtensionRec dri2ImageExtension = {
 -{ __DRI_IMAGE, 5 },
 +{ __DRI_IMAGE, 7 },
  dri2_create_image_from_name,
  dri2_create_image_from_renderbuffer,
  dri2_destroy_image,
 @@ -767,6 +802,8 @@ static struct __DRIimageExtensionRec dri2ImageExtension = 
 {
  dri2_validate_usage,
  dri2_from_names,
  dri2_from_planar,
 +NULL,
 +dri2_duplicate_image,
  };

  /*
 diff --git a/src/mesa/state_tracker/st_manager.c 
 b/src/mesa/state_tracker/st_manager.c
 index a3a6771..3659499 100644
 --- a/src/mesa/state_tracker/st_manager.c
 +++ b/src/mesa/state_tracker/st_manager.c
 @@ -810,6 +810,10 @@ st_manager_get_egl_image_surface(struct st_context *st, 
 void *eglimg)
return NULL;

 u_surface_default_template(surf_tmpl, stimg.texture);
 +
 +   if(stimg.format != PIPE_FORMAT_NONE)
 +  surf_tmpl.format = stimg.format;
 +

Have you tested if this actually works? I would guess it would
render in the right colorspace but for sampling the state tracker
might just drop the format on the floor.

Cheers, Jakob.
___
mesa-dev mailing list

[Mesa-dev] [PATCH] gallium/util: attempt to fix blitting multisample texture arrays

2013-03-03 Thread Marek Olšák
We don't have a test for this yet, but obviously the swizzle was wrong.
---
 src/gallium/auxiliary/util/u_blitter.c|2 +-
 src/gallium/auxiliary/util/u_simple_shaders.c |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/gallium/auxiliary/util/u_blitter.c 
b/src/gallium/auxiliary/util/u_blitter.c
index e37be4e..61a9ed4 100644
--- a/src/gallium/auxiliary/util/u_blitter.c
+++ b/src/gallium/auxiliary/util/u_blitter.c
@@ -703,7 +703,7 @@ static void blitter_set_texcoords(struct 
blitter_context_priv *ctx,
 
case PIPE_TEXTURE_2D:
   for (i = 0; i  4; i++) {
- ctx-vertices[i][1][2] = (float) sample; /*r*/
+ ctx-vertices[i][1][3] = (float) sample; /*r*/
   }
   break;
 
diff --git a/src/gallium/auxiliary/util/u_simple_shaders.c 
b/src/gallium/auxiliary/util/u_simple_shaders.c
index 7e36661..c53c2d0 100644
--- a/src/gallium/auxiliary/util/u_simple_shaders.c
+++ b/src/gallium/auxiliary/util/u_simple_shaders.c
@@ -400,7 +400,7 @@ util_make_fs_blit_msaa_gen(struct pipe_context *pipe,
  DCL TEMP[0]\n
 
  F2U TEMP[0], IN[0]\n
- TXF OUT[0]%s, TEMP[0].xyzz, SAMP[0], %s\n
+ TXF OUT[0]%s, TEMP[0], SAMP[0], %s\n
  END\n;
 
const char *type = tgsi_texture_names[tgsi_tex];
-- 
1.7.10.4

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


Re: [Mesa-dev] [PATCH] mesa: check width and height in copyteximage

2013-03-03 Thread Eric Anholt
Marek Olšák mar...@gmail.com writes:

 This WebGL test sets width and height to 0:
 https://www.khronos.org/registry/webgl/sdk/tests/conformance/misc/type-conversion-test.html

I don't see it being undefined, it just inherits behavior from teximage:

CopyTexImage2D... defines a two-dimensional texture array in exactly
the manner of TexImage2D, except that the image data are taken from the
framebuffer rather than from client memory.


pgpzUGCEGlkgK.pgp
Description: PGP signature
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 2/4] st/mesa: add support for get sample position

2013-03-03 Thread Dave Airlie
From: Dave Airlie airl...@redhat.com

This just calls into the gallium interface.

Signed-off-by: Dave Airlie airl...@redhat.com
---
 src/mesa/sources.mak|  1 +
 src/mesa/state_tracker/st_cb_msaa.c | 52 +
 src/mesa/state_tracker/st_cb_msaa.h | 39 
 src/mesa/state_tracker/st_context.c |  2 ++
 4 files changed, 94 insertions(+)
 create mode 100644 src/mesa/state_tracker/st_cb_msaa.c
 create mode 100644 src/mesa/state_tracker/st_cb_msaa.h

diff --git a/src/mesa/sources.mak b/src/mesa/sources.mak
index 178ceb2..7498d96 100644
--- a/src/mesa/sources.mak
+++ b/src/mesa/sources.mak
@@ -224,6 +224,7 @@ STATETRACKER_FILES = \
$(SRCDIR)state_tracker/st_cb_eglimage.c \
$(SRCDIR)state_tracker/st_cb_fbo.c \
$(SRCDIR)state_tracker/st_cb_feedback.c \
+   $(SRCDIR)state_tracker/st_cb_msaa.c \
$(SRCDIR)state_tracker/st_cb_program.c \
$(SRCDIR)state_tracker/st_cb_queryobj.c \
$(SRCDIR)state_tracker/st_cb_rasterpos.c \
diff --git a/src/mesa/state_tracker/st_cb_msaa.c 
b/src/mesa/state_tracker/st_cb_msaa.c
new file mode 100644
index 000..688d6a3
--- /dev/null
+++ b/src/mesa/state_tracker/st_cb_msaa.c
@@ -0,0 +1,52 @@
+/**
+ * 
+ * Copyright 2013 Red Hat
+ * 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 THE AUTHORS 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.
+ * 
+ **/
+
+#include main/mfeatures.h
+#include main/bufferobj.h
+#include main/imports.h
+
+#include state_tracker/st_cb_msaa.h
+#include state_tracker/st_context.h
+#include state_tracker/st_cb_fbo.h
+
+#include pipe/p_context.h
+static void st_GetSamplePosition(struct gl_context *ctx,
+ struct gl_framebuffer *fb,
+ GLuint index,
+ GLfloat *outValue)
+{
+   struct st_context *st = st_context(ctx);
+   struct st_renderbuffer *strb;
+
+   if (st-pipe-get_sample_position)
+  st-pipe-get_sample_position(st-pipe, fb-Visual.samples, index, 
outValue);
+}
+
+void st_init_msaa_functions(struct dd_function_table *functions)
+{
+   functions-GetSamplePosition = st_GetSamplePosition;
+}
diff --git a/src/mesa/state_tracker/st_cb_msaa.h 
b/src/mesa/state_tracker/st_cb_msaa.h
new file mode 100644
index 000..ba4c06f
--- /dev/null
+++ b/src/mesa/state_tracker/st_cb_msaa.h
@@ -0,0 +1,39 @@
+/**
+ * 
+ * Copyright 2013 Red Hat
+ * 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 THE AUTHORS 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.
+ * 
+ **/
+
+
+#ifndef ST_CB_MSAA_H
+#define ST_CB_MSAA_H
+
+#include 

[Mesa-dev] [PATCH 3/4] st/mesa: add support for ARB_texture_multisample

2013-03-03 Thread Dave Airlie
From: Dave Airlie airl...@redhat.com

This adds support to the mesa state tracker for ARB_texture_multisample.

hardware doesn't seem to use a different texture instructions, so
I don't think we need to create one for TGSI at this time.

Thanks to Marek for fixes to sample number picking.

Signed-off-by: Dave Airlie airl...@redhat.com
---
 src/mesa/state_tracker/st_atom_framebuffer.c |  1 +
 src/mesa/state_tracker/st_atom_msaa.c|  2 ++
 src/mesa/state_tracker/st_cb_bitmap.c|  4 +--
 src/mesa/state_tracker/st_cb_drawpixels.c|  2 +-
 src/mesa/state_tracker/st_cb_fbo.c   |  2 +-
 src/mesa/state_tracker/st_cb_texture.c   | 41 
 src/mesa/state_tracker/st_extensions.c   |  7 +
 src/mesa/state_tracker/st_gen_mipmap.c   |  1 +
 src/mesa/state_tracker/st_glsl_to_tgsi.cpp   | 17 ++--
 src/mesa/state_tracker/st_mesa_to_tgsi.c |  2 ++
 src/mesa/state_tracker/st_texture.c  |  8 +-
 src/mesa/state_tracker/st_texture.h  |  1 +
 12 files changed, 74 insertions(+), 14 deletions(-)

diff --git a/src/mesa/state_tracker/st_atom_framebuffer.c 
b/src/mesa/state_tracker/st_atom_framebuffer.c
index 3df8691..c752640 100644
--- a/src/mesa/state_tracker/st_atom_framebuffer.c
+++ b/src/mesa/state_tracker/st_atom_framebuffer.c
@@ -59,6 +59,7 @@ update_renderbuffer_surface(struct st_context *st,
enum pipe_format format = st-ctx-Color.sRGBEnabled ? resource-format : 
util_format_linear(resource-format);
 
if (!strb-surface ||
+   strb-surface-texture-nr_samples != strb-Base.NumSamples ||
strb-surface-format != format ||
strb-surface-texture != resource ||
strb-surface-width != rtt_width ||
diff --git a/src/mesa/state_tracker/st_atom_msaa.c 
b/src/mesa/state_tracker/st_atom_msaa.c
index 9baa4fc..b749a17 100644
--- a/src/mesa/state_tracker/st_atom_msaa.c
+++ b/src/mesa/state_tracker/st_atom_msaa.c
@@ -63,6 +63,8 @@ static void update_sample_mask( struct st_context *st )
 sample_mask = ~sample_mask;
   }
   /* TODO merge with app-supplied sample mask */
+  if (st-ctx-Multisample.SampleMask)
+ sample_mask = st-ctx-Multisample.SampleMaskValue;
}
 
/* mask off unused bits or don't care? */
diff --git a/src/mesa/state_tracker/st_cb_bitmap.c 
b/src/mesa/state_tracker/st_cb_bitmap.c
index 36fffe9..d7a95e2 100644
--- a/src/mesa/state_tracker/st_cb_bitmap.c
+++ b/src/mesa/state_tracker/st_cb_bitmap.c
@@ -299,7 +299,7 @@ make_bitmap_texture(struct gl_context *ctx, GLsizei width, 
GLsizei height,
 * Create texture to hold bitmap pattern.
 */
pt = st_texture_create(st, st-internal_target, st-bitmap.tex_format,
-  0, width, height, 1, 1,
+  0, width, height, 1, 1, 0,
   PIPE_BIND_SAMPLER_VIEW);
if (!pt) {
   _mesa_unmap_pbo_source(ctx, unpack);
@@ -568,7 +568,7 @@ reset_cache(struct st_context *st)
cache-texture = st_texture_create(st, PIPE_TEXTURE_2D,
   st-bitmap.tex_format, 0,
   BITMAP_CACHE_WIDTH, BITMAP_CACHE_HEIGHT,
-  1, 1,
+  1, 1, 0,
  PIPE_BIND_SAMPLER_VIEW);
 }
 
diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c 
b/src/mesa/state_tracker/st_cb_drawpixels.c
index e282bf9..e609eb5 100644
--- a/src/mesa/state_tracker/st_cb_drawpixels.c
+++ b/src/mesa/state_tracker/st_cb_drawpixels.c
@@ -463,7 +463,7 @@ alloc_texture(struct st_context *st, GLsizei width, GLsizei 
height,
struct pipe_resource *pt;
 
pt = st_texture_create(st, st-internal_target, texFormat, 0,
-  width, height, 1, 1, PIPE_BIND_SAMPLER_VIEW);
+  width, height, 1, 1, 0, PIPE_BIND_SAMPLER_VIEW);
 
return pt;
 }
diff --git a/src/mesa/state_tracker/st_cb_fbo.c 
b/src/mesa/state_tracker/st_cb_fbo.c
index 72bc960..cf3e27f 100644
--- a/src/mesa/state_tracker/st_cb_fbo.c
+++ b/src/mesa/state_tracker/st_cb_fbo.c
@@ -430,7 +430,7 @@ st_render_texture(struct gl_context *ctx,
strb-rtt_level = att-TextureLevel;
strb-rtt_face = att-CubeMapFace;
strb-rtt_slice = att-Zoffset;
-
+   rb-NumSamples = texImage-NumSamples;
rb-Width = texImage-Width2;
rb-Height = texImage-Height2;
rb-_BaseFormat = texImage-_BaseFormat;
diff --git a/src/mesa/state_tracker/st_cb_texture.c 
b/src/mesa/state_tracker/st_cb_texture.c
index c922a31..385bac6 100644
--- a/src/mesa/state_tracker/st_cb_texture.c
+++ b/src/mesa/state_tracker/st_cb_texture.c
@@ -78,6 +78,8 @@ gl_target_to_pipe(GLenum target)
case GL_TEXTURE_2D:
case GL_PROXY_TEXTURE_2D:
case GL_TEXTURE_EXTERNAL_OES:
+   case GL_TEXTURE_2D_MULTISAMPLE:
+   case GL_PROXY_TEXTURE_2D_MULTISAMPLE:
   return PIPE_TEXTURE_2D;
case GL_TEXTURE_RECTANGLE_NV:
case GL_PROXY_TEXTURE_RECTANGLE_NV:
@@ -99,6 +101,8 @@ 

[Mesa-dev] [PATCH 4/4] r600g: add support for remaining bits for multisample texture

2013-03-03 Thread Dave Airlie
From: Dave Airlie airl...@redhat.com

get sample position is most definitely wrong, need to find out what
sample positions the hardware uses.

Signed-off-by: Dave Airlie airl...@redhat.com
---
 src/gallium/drivers/r600/r600_shader.c   |  1 +
 src/gallium/drivers/r600/r600_state_common.c | 35 
 2 files changed, 36 insertions(+)

diff --git a/src/gallium/drivers/r600/r600_shader.c 
b/src/gallium/drivers/r600/r600_shader.c
index 8642463..5fd3f83 100644
--- a/src/gallium/drivers/r600/r600_shader.c
+++ b/src/gallium/drivers/r600/r600_shader.c
@@ -4705,6 +4705,7 @@ static int tgsi_tex(struct r600_shader_ctx *ctx)
tex.src_sel_z = tex.src_sel_y;
}
} else if (inst-Texture.Texture == TGSI_TEXTURE_2D_ARRAY ||
+  inst-Texture.Texture == TGSI_TEXTURE_2D_ARRAY_MSAA ||
   inst-Texture.Texture == TGSI_TEXTURE_SHADOW2D_ARRAY ||
   ((inst-Texture.Texture == TGSI_TEXTURE_CUBE_ARRAY ||
inst-Texture.Texture == TGSI_TEXTURE_SHADOWCUBE_ARRAY) 
diff --git a/src/gallium/drivers/r600/r600_state_common.c 
b/src/gallium/drivers/r600/r600_state_common.c
index 22ac846..8c8b665 100644
--- a/src/gallium/drivers/r600/r600_state_common.c
+++ b/src/gallium/drivers/r600/r600_state_common.c
@@ -1748,6 +1748,39 @@ bool sampler_state_needs_border_color(const struct 
pipe_sampler_state *state)
wrap_mode_uses_border_color(state-wrap_r, linear_filter));
 }
 
+static void r600_get_sample_position(struct pipe_context *ctx,
+int max_sample,
+unsigned sample_index,
+float *out_value)
+{
+   switch (max_sample) {
+   case 1:
+   default:
+   out_value[0] = out_value[1] = 0.5;
+   break;
+   case 4:
+   switch (sample_index) {
+   case 0:
+   out_value[0] = 0.25;
+   out_value[1] = 0.25;
+   break;
+   case 1:
+   out_value[0] = 0.25;
+   out_value[1] = 0.75;
+   break;
+   case 2:
+   out_value[0] = 0.75;
+   out_value[1] = 0.25;
+   break;
+   case 3:
+   out_value[0] = 0.75;
+   out_value[1] = 0.75;
+   break;
+   }
+   break;
+   }
+}
+
 /* keep this at the end of this file, please */
 void r600_init_common_state_functions(struct r600_context *rctx)
 {
@@ -1785,6 +1818,8 @@ void r600_init_common_state_functions(struct r600_context 
*rctx)
rctx-context.stream_output_target_destroy = r600_so_target_destroy;
rctx-context.set_stream_output_targets = r600_set_streamout_targets;
rctx-context.draw_vbo = r600_draw_vbo;
+
+   rctx-context.get_sample_position = r600_get_sample_position;
 }
 
 #if R600_TRACE_CS
-- 
1.8.1.2

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


[Mesa-dev] [Bug 61750] Undefined references linking libGLESv2 when configured with --disable-dri

2013-03-03 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=61750

--- Comment #2 from Wladimir laa...@gmail.com ---
I'm not sure. I was trying to compile mesa+gallium with as few dependencies as
possible (no X11, no external drivers, only soft pipe) and DRI was requesting
some Radeon library so I completely disabled it.

It was later told me that it is possible to build with DRI but without drivers.
This works fine, really, and I do not have any reason to still want it the
other way.

If the requested scenario is useless or unsupported, it would be nice if
configure gave a warning.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [Bug 61761] New: glPolygonOffsetEXT, OFFSET_BIAS incorrectly set to a huge number

2013-03-03 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=61761

  Priority: medium
Bug ID: 61761
  Assignee: mesa-dev@lists.freedesktop.org
   Summary: glPolygonOffsetEXT, OFFSET_BIAS incorrectly set to a
huge number
  Severity: normal
Classification: Unclassified
OS: Linux (All)
  Reporter: speed.the.b...@gmail.com
  Hardware: x86-64 (AMD64)
Status: NEW
   Version: unspecified
 Component: Mesa core
   Product: Mesa

Created attachment 75858
  -- https://bugs.freedesktop.org/attachment.cgi?id=75858action=edit
test program

When using glPolygonOffsetEXT(1.0, 2.0), GL_POLYGON_OFFSET_BIAS_EXT should be
set to 2.0. Instead, it is set to an enormously huge value (always the same
number, 3.35544e+07).

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [Bug 61761] glPolygonOffsetEXT, OFFSET_BIAS incorrectly set to a huge number

2013-03-03 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=61761

Blaž Hrastnik speed.the.b...@gmail.com changed:

   What|Removed |Added

 CC||speed.the.b...@gmail.com

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [Bug 61764] New: invalid enum in glEnable, glConvolutionFilter, glSeparableFilter, glColorTable

2013-03-03 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=61764

  Priority: medium
Bug ID: 61764
  Assignee: mesa-dev@lists.freedesktop.org
   Summary: invalid enum in glEnable, glConvolutionFilter,
glSeparableFilter, glColorTable
  Severity: normal
Classification: Unclassified
OS: All
  Reporter: speed.the.b...@gmail.com
  Hardware: x86-64 (AMD64)
Status: NEW
   Version: unspecified
 Component: Mesa core
   Product: Mesa

Created attachment 75861
  -- https://bugs.freedesktop.org/attachment.cgi?id=75861action=edit
test program

See the test program for more info. When using specific enumerables with these
commands, these commands return an error.

glEnable(GL_MINMAX)
glEnable(GL_MINMAX_EXT);
glEnable(GL_HISTOGRAM);

glConvolutionFilter1D(GL_CONVOLUTION_1D, GL_RGB8, 4, GL_RGB, GL_FLOAT, cf);
glSeparableFilter2D(GL_SEPARABLE_2D, GL_RGB8, 2, 2, GL_RGB, GL_FLOAT, sf_a,
sf_b);

glColorTable(GL_COLOR_TABLE, GL_RGB8, 4, GL_RGB, GL_FLOAT, ct);

I do not have the code yet to reproduce the last three, I need to convert it
from ruby.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [Bug 61764] invalid enum in glEnable, glConvolutionFilter, glSeparableFilter, glColorTable

2013-03-03 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=61764

Blaž Hrastnik speed.the.b...@gmail.com changed:

   What|Removed |Added

 CC||speed.the.b...@gmail.com

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [Bug 61764] invalid enum in glEnable, glConvolutionFilter, glSeparableFilter, glColorTable

2013-03-03 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=61764

Blaž Hrastnik speed.the.b...@gmail.com changed:

   What|Removed |Added

 OS|All |Linux (All)

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] glapi/gen: Remove duplicate PYTHON_FLAGS

2013-03-03 Thread Stefan Brüns
PYTHON_GEN calls python with PYTHON_FLAGS

Signed-off-by: Stefan Brüns stefan.bru...@rwth-aachen.de
---
 src/mapi/glapi/gen/Makefile.am |   14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/mapi/glapi/gen/Makefile.am b/src/mapi/glapi/gen/Makefile.am
index 4d51bbc..36e47e2 100644
--- a/src/mapi/glapi/gen/Makefile.am
+++ b/src/mapi/glapi/gen/Makefile.am
@@ -246,19 +246,19 @@ $(MESA_GLX_DIR)/indirect_size.c: glX_proto_size.py 
$(COMMON_GLX)
 ##
 
 $(XORG_GLX_DIR)/indirect_dispatch.c: glX_proto_recv.py $(COMMON_GLX)
-   $(PYTHON_GEN) $(PYTHON_FLAGS) $ -f $(srcdir)/gl_API.xml -m dispatch_c \
+   $(PYTHON_GEN) $ -f $(srcdir)/gl_API.xml -m dispatch_c \
| $(INDENT) $(XORG_INDENT_FLAGS)  $@
 
 $(XORG_GLX_DIR)/indirect_dispatch_swap.c: glX_proto_recv.py $(COMMON_GLX)
-   $(PYTHON_GEN) $(PYTHON_FLAGS) $ -f $(srcdir)/gl_API.xml -m dispatch_c -
s \
+   $(PYTHON_GEN) $ -f $(srcdir)/gl_API.xml -m dispatch_c -s \
| $(INDENT) $(XORG_INDENT_FLAGS)  $@
 
 $(XORG_GLX_DIR)/indirect_dispatch.h: glX_proto_recv.py gl_and_glX_API.xml 
$(COMMON_GLX)
-   $(PYTHON_GEN) $(PYTHON_FLAGS) $ -m dispatch_h -f 
$(srcdir)/gl_and_glX_API.xml -s \
+   $(PYTHON_GEN) $ -m dispatch_h -f $(srcdir)/gl_and_glX_API.xml -s \
| $(INDENT) $(XORG_INDENT_FLAGS)  $@
 
 $(XORG_GLX_DIR)/indirect_size_get.h: glX_proto_size.py $(COMMON_GLX)
-   $(PYTHON_GEN) $(PYTHON_FLAGS) $ -f $(srcdir)/gl_API.xml -m size_h \
+   $(PYTHON_GEN) $ -f $(srcdir)/gl_API.xml -m size_h \
--only-get -h '_INDIRECT_SIZE_GET_H_' \
  | $(INDENT) $(XORG_INDENT_FLAGS)  $@
 
@@ -267,14 +267,14 @@ $(XORG_GLX_DIR)/indirect_size_get.c: glX_proto_size.py 
$(COMMON_GLX)
  | $(INDENT) $(INDENT_FLAGS)  $@
 
 $(XORG_GLX_DIR)/indirect_reqsize.h: glX_proto_size.py $(COMMON_GLX)
-   $(PYTHON_GEN) $(PYTHON_FLAGS) $ -f $(srcdir)/gl_API.xml -m reqsize_h \
+   $(PYTHON_GEN) $ -f $(srcdir)/gl_API.xml -m reqsize_h \
--only-get -h '_INDIRECT_SIZE_GET_H_' \
  | $(INDENT) $(XORG_INDENT_FLAGS)  $@
 
 $(XORG_GLX_DIR)/indirect_reqsize.c: glX_proto_size.py $(COMMON_GLX)
-   $(PYTHON_GEN) $(PYTHON_FLAGS) $ -f $(srcdir)/gl_API.xml -m reqsize_c \
+   $(PYTHON_GEN) $ -f $(srcdir)/gl_API.xml -m reqsize_c \
   | $(INDENT) $(XORG_INDENT_FLAGS)  $@
 
 $(XORG_GLX_DIR)/indirect_table.c: glX_server_table.py gl_and_glX_API.xml 
$(COMMON_GLX)
-   $(PYTHON_GEN) $(PYTHON_FLAGS) $ -f $(srcdir)/gl_and_glX_API.xml \
+   $(PYTHON_GEN) $ -f $(srcdir)/gl_and_glX_API.xml \
| $(INDENT) $(XORG_INDENT_FLAGS)  $@
-- 
1.7.10.4

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


Re: [Mesa-dev] [PATCH v2 3/5] gallium: Implement DRIimageExtension.duplicateImage

2013-03-03 Thread John Kåre Alsaker
On Sun, Mar 3, 2013 at 4:52 PM, Jakob Bornecrantz wallbra...@gmail.com wrote:
 Have you tested if this actually works? I would guess it would
 render in the right colorspace but for sampling the state tracker
 might just drop the format on the floor.
It works for sampling, but I'm not sure what the current or desired
behavior for render targets should be.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH v2 2/5] dri: Add another duplicateImage to DRIimageExtension which allows you to create a sRGB view of a DRI image

2013-03-03 Thread John Kåre Alsaker
On Sun, Mar 3, 2013 at 4:43 PM, Jakob Bornecrantz wallbra...@gmail.com wrote:
 These really should just be another set of formats, since that is
 how they are handled gallium anyways.

I think I was going that route, but changed by mind for some reason.
Probably because I didn't want to add lots of sRGB formats and it
doesn't interact well with planar/fourcc formats.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 4/4] glapi/gen: remove some more unused code

2013-03-03 Thread Stefan Brüns
Signed-off-by: Stefan Brüns stefan.bru...@rwth-aachen.de
---
 src/mapi/glapi/gen/glX_server_table.py |   11 +--
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/src/mapi/glapi/gen/glX_server_table.py 
b/src/mapi/glapi/gen/glX_server_table.py
index 589c47c..7204045 100644
--- a/src/mapi/glapi/gen/glX_server_table.py
+++ b/src/mapi/glapi/gen/glX_server_table.py
@@ -144,15 +144,6 @@ class function_table:
 return
 
 
-def is_empty_leaf(self, base_opcode, M):
-for op in range(base_opcode, base_opcode + (1  M)):
-if self.functions.has_key(op):
-return 0
-break
-
-return 1
-
-
 def dump_tree(self, node, base_opcode, remaining_bits, base_entry, 
depth):
 M = node[0]
 children = node[1]
@@ -172,7 +163,7 @@ class function_table:
 child_base_opcode = base_opcode
 for child in children:
 if child[1] == []:
-if self.is_empty_leaf(child_base_opcode, child_M):
+if child[4] == 'E':
 print 'EMPTY_LEAF,'
 else:
 # Emit the index of the next dispatch
-- 
1.7.10.4

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


[Mesa-dev] [PATCH 2/4] glapi/gen: use new code for dispatch tree creation

2013-03-03 Thread Stefan Brüns
Signed-off-by: Stefan Brüns stefan.bru...@rwth-aachen.de
---
 src/mapi/glapi/gen/glX_server_table.py |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/mapi/glapi/gen/glX_server_table.py 
b/src/mapi/glapi/gen/glX_server_table.py
index 5b3ffdc..cc78c48 100644
--- a/src/mapi/glapi/gen/glX_server_table.py
+++ b/src/mapi/glapi/gen/glX_server_table.py
@@ -352,7 +352,9 @@ class function_table:
 # of a node are non-empty leaf nodes, the children are merged
 # to create a single leaf node that replaces the parent.
 
-tree = self.divide_group(0, 0)
+leaves = self.get_leaves()
+tree = self.combine_tree(leaves)
+self.pullup_nodes(tree)
 
 print 
'/*/'
 print '/* tree depth = %u */' % (tree[3])
-- 
1.7.10.4

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


[Mesa-dev] [PATCH 3/4] glapi/gen: remove old code for dispatch tree generation

2013-03-03 Thread Stefan Brüns
Signed-off-by: Stefan Brüns stefan.bru...@rwth-aachen.de
---
 src/mapi/glapi/gen/glX_server_table.py |   89 
+---
 1 file changed, 2 insertions(+), 87 deletions(-)

diff --git a/src/mapi/glapi/gen/glX_server_table.py 
b/src/mapi/glapi/gen/glX_server_table.py
index cc78c48..589c47c 100644
--- a/src/mapi/glapi/gen/glX_server_table.py
+++ b/src/mapi/glapi/gen/glX_server_table.py
@@ -38,17 +38,6 @@ def log2(value):
 return -1
 
 
-def round_down_to_power_of_two(n):
-Returns the nearest power-of-two less than or equal to n.
-
-for i in range(30, 0, -1):
-p = 1  i
-if p = n:
-return p
-
-return -1
-
-
 class function_table:
 def __init__(self, name, do_size_check):
 self.name_base = name
@@ -56,7 +45,6 @@ class function_table:
 
 
 self.max_bits = 1
-self.next_opcode_threshold = (1  self.max_bits)
 self.max_opcode = 0
 
 self.functions = {}
@@ -76,13 +64,9 @@ class function_table:
 if opcode  self.max_opcode:
 self.max_opcode = opcode
 
-if opcode  self.next_opcode_threshold:
-bits = log2(opcode)
-if (1  bits) = opcode:
-bits += 1
-
+if opcode  (1  self.max_bits):
+bits = log2(opcode+1)
 self.max_bits = bits
-self.next_opcode_threshold = 1  bits
 return
 
 
@@ -160,75 +144,6 @@ class function_table:
 return
 
 
-def divide_group(self, min_opcode, total):
-Divide the group starting min_opcode into subgroups.
-Returns a tuple containing the number of bits consumed by
-the node, the list of the children's tuple, and the number
-of entries in the final array used by this node and its
-children, and the depth of the subtree rooted at the node.
-
-remaining_bits = self.max_bits - total
-next_opcode = min_opcode + (1  remaining_bits)
-empty_children = 0
-
-for M in range(0, remaining_bits):
-op_count = 1  (remaining_bits - M);
-child_count = 1  M;
-
-empty_children = 0
-full_children = 0
-for i in range(min_opcode, next_opcode, op_count):
-used = 0
-empty = 0
-
-for j in range(i, i + op_count):
-if self.functions.has_key(j):
-used += 1;
-else:
-empty += 1;
-
-
-if empty == op_count:
-empty_children += 1
-
-if used == op_count:
-full_children += 1
-
-if (empty_children  0) or (full_children == child_count) or 
(op_count = self.min_op_count):
-break
-
-
-# If all the remaining bits are used by this node, as is the
-# case when M is 0 or remaining_bits, the node is a leaf.
-
-if (M == 0) or (M == remaining_bits):
-return [remaining_bits, [], 0, 0]
-else:
-children = []
-count = 1
-depth = 1
-all_children_are_nonempty_leaf_nodes = 1
-for i in range(min_opcode, next_opcode, op_count):
-n = self.divide_group(i, total + M)
-
-if not (n[1] == [] and not self.is_empty_leaf(i, n[0])):
-all_children_are_nonempty_leaf_nodes = 0
-
-children.append(n)
-count += n[2] + 1
-
-if n[3] = depth:
-depth = n[3] + 1
-
-# If all of the child nodes are non-empty leaf nodes, pull
-# them up and make this node a leaf.
-
-if all_children_are_nonempty_leaf_nodes:
-return [remaining_bits, [], 0, 0]
-else:
-return [M, children, count, depth]
-
-
 def is_empty_leaf(self, base_opcode, M):
 for op in range(base_opcode, base_opcode + (1  M)):
 if self.functions.has_key(op):
-- 
1.7.10.4

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


[Mesa-dev] [PATCH 1/4] glapi/gen: Create optimized glX opcode dispatch tree

2013-03-03 Thread Stefan Brüns
The current code omits some possibilities to optimize the tree, leading
to a large tree with way to many steps until the leave is reached.

The new code optimizes the tree based on a simple observation: as long
as at most half of the nodes at the current level are leaves, tree size
is reduced or kept when the children are pulled up one level.

Tree depth is halved on average (for some leaves, reduced from 9 to 3),
tree size is reduced slightly.

The algorithm works as follows:
1. create leaves, each containing min_op_count opcodes
2. create a binary tree
3. pullup children, as long as there are children and tree size is reduced
3.1. do the same for each non-leave child

The pullup algorithm has one tunable, pullup_bias. If set to 0, the
algorithm is followed stritly, if set to values larger 0, some more
children are pulled up, reducing depth in favor of slightly increased size.

Signed-off-by: Stefan Brüns stefan.bru...@rwth-aachen.de
---
 src/mapi/glapi/gen/glX_server_table.py |   76 

 1 file changed, 76 insertions(+)

diff --git a/src/mapi/glapi/gen/glX_server_table.py 
b/src/mapi/glapi/gen/glX_server_table.py
index 47aa111..5b3ffdc 100644
--- a/src/mapi/glapi/gen/glX_server_table.py
+++ b/src/mapi/glapi/gen/glX_server_table.py
@@ -65,6 +65,8 @@ class function_table:
 # Minimum number of opcodes in a leaf node.
 self.min_op_bits = 3
 self.min_op_count = (1  self.min_op_bits)
+
+self.pullup_bias = 1
 return
 
 
@@ -84,6 +86,80 @@ class function_table:
 return
 
 
+def get_leaves(self):
+leaves = []
+
+for i in range(0, (1self.max_bits), self.min_op_count):
+
+# M, [children], tree size, depth, type, first opcode
+leave = [ 0, [], 1, 0, 'E', i ]
+
+for j in range(i, i + self.min_op_count):
+if self.functions.has_key(j):
+leave[4] = 'L'
+break;
+
+leaves.append(leave)
+
+return leaves
+
+
+def combine_tree(self, nodes):
+newnodes = []
+
+for i in range(0, len(nodes)-1, 2):
+c1 = nodes[i]
+c2 = nodes[i+1]
+parent = [ 1, [c1, c2], c1[2]+c2[2]+1, 0, 'N', c1[5] ]
+if c1[4] == c2[4]:
+parent[4] = c1[4]
+
+newnodes.append(parent)
+
+if len(newnodes) = 2:
+return self.combine_tree(newnodes)
+
+return parent
+
+
+def pullup_nodes(self, node):
+
+children = node[1]
+
+# Count non-leaves. If at least half of the children
+# are non-leaves pulling up saves space. Add a small
+# bias to favor shallower trees
+count = sum( 1 for child in children if child[4] == 'N' )
+count += self.pullup_bias
+
+# conditionally replace the children of a node with its
+# grandchilren. Grandchildren exist if child size  1
+if count = len(children)/2 and children[0][2]  1:
+newnodes = []
+for child in children:
+newnodes.append(child[1][0])
+newnodes.append(child[1][1])
+
+node[0] += 1
+node[1] = newnodes
+node[2] = newnodes[0][2] * len(newnodes) + 1
+self.pullup_nodes(node)
+
+else:
+node[2] = 1
+for child in children:
+if child[4] == 'N':
+self.pullup_nodes(child)
+else:
+child[1] = []
+child[2] = 1
+
+node[3] = max( child[3] + 1, node[3] )
+node[2] += child[2]
+
+return
+
+
 def divide_group(self, min_opcode, total):
 Divide the group starting min_opcode into subgroups.
 Returns a tuple containing the number of bits consumed by
-- 
1.7.10.4

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


Re: [Mesa-dev] [RFC] GLX_MESA_query_renderer

2013-03-03 Thread Ian Romanick

On 03/02/2013 07:00 AM, Christoph Bumiller wrote:

On 02.03.2013 00:14, Ian Romanick wrote:

Since last September I've been gradually working on an extension to
let applications query information about the renderer before (and
after) creating a context.  I've talked it over with a few ISVs and
with various other folks.  I also gathered some input from folks at
FOSDEM after my talk there.  After going through several iterations of
review and modification, I think it's finally ready for wider input.

Some of the earliest feedback that I got was that many ISVs really
like the interface that fills this niche on Mac OS.  It's a pretty
nice API, and this API is modeled after it.  There are, however, some
differences.

I've pasted the spec below so that people can provide in-line
comments.  I've also pushed a branch with the spec and the initial
implementation.  There are a few things potentially provided by the
spec that are not included in the initial implementation.  I've
implemented a couple unit tests, and I have some piglit tests
in-progress.

http://cgit.freedesktop.org/~idr/mesa/log/?h=query-renderer

I'm mostly looking for input on the specification itself.  Once this
is good, I will also add EGL support.

...

 GLX renderer attribute number description
   of values
 ---   ---
 GLX_RENDERER_VENDOR_ID_MESA   1   PCI ID of the device vendor
 GLX_RENDERER_DEVICE_ID_MESA   1   PCI ID of the device


...


 5) How can applications tell the difference between different
hardware
 renderers for the same device?  For example, whether the renderer
is the
 open-source driver or the closed-source driver.

 RESOLVED.  Assuming this extension is ever implemented outside
Mesa,
 applications can query GLX_RENDERER_VENDOR_ID_MESA from
 glXQueryRendererStringMESA.  This will almost certainly return
 different strings for open-source and closed-source drivers.


Why would the PCI ID of the device vendor change with the driver ?


Hopefully the PCI ID wouldn't change, but the resolution of this issue 
only applies to the string version of the query.


GLX renderer attributedescription
-----
GLX_RENDERER_VENDOR_ID_MESA   Name of the renderer provider.  This may
  differ from the vendor name of the
  underlying hardware.
GLX_RENDERER_DEVICE_ID_MESA   Name of the renderer.  This may 
differ from
  the name of the underlying hardware 
(e.g.,

  for a software renderer).

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


Re: [Mesa-dev] [RFC] GLX_MESA_query_renderer

2013-03-03 Thread Ian Romanick

On 03/01/2013 09:30 PM, Nicholas Miell wrote:

On 03/01/2013 03:14 PM, Ian Romanick wrote:

New Procedures and Functions

 Bool glXQueryRendererIntegerMESA(Display *dpy, int screen,
  int renderer, int attribute,
  unsigned int *value);
 Bool glXQueryCurrentRendererIntegerMESA(int attribute, unsigned int
*value);


Should these have ARB_robustness-style buffer size parameters?


Hmm... many queries don't have size parameters, even with 
ARB_robustness, because the amount of data returned is always knowable 
in advance.  See issue #6 in that spec.  In the (as yet unposted) piglit 
tests, I have a couple tests that make sure the queries don't return too 
much data.


Adding a size parameter might make it more future proof, but I'm having 
trouble even imagining a query that would be appropriate for this 
extension and have a variable payload.  Either way, I can add it as an 
issue.


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


Re: [Mesa-dev] [RFC] GLX_MESA_query_renderer

2013-03-03 Thread Ian Romanick

On 03/01/2013 05:05 PM, Paul Berry wrote:

On 1 March 2013 15:14, Ian Romanick i...@freedesktop.org
mailto:i...@freedesktop.org wrote:

Since last September I've been gradually working on an extension to
let applications query information about the renderer before (and
after) creating a context.  I've talked it over with a few ISVs and
with various other folks.  I also gathered some input from folks at
FOSDEM after my talk there.  After going through several iterations
of review and modification, I think it's finally ready for wider input.

Some of the earliest feedback that I got was that many ISVs really
like the interface that fills this niche on Mac OS.  It's a pretty
nice API, and this API is modeled after it.  There are, however,
some differences.

I've pasted the spec below so that people can provide in-line
comments.  I've also pushed a branch with the spec and the initial
implementation.  There are a few things potentially provided by the
spec that are not included in the initial implementation.  I've
implemented a couple unit tests, and I have some piglit tests
in-progress.

http://cgit.freedesktop.org/~__idr/mesa/log/?h=query-renderer
http://cgit.freedesktop.org/~idr/mesa/log/?h=query-renderer

I'm mostly looking for input on the specification itself.  Once this
is good, I will also add EGL support.


Name

 MESA_query_renderer

Name Strings

 GLX_MESA_query_renderer

Contact

 Ian Romanick ian.d.roman...@intel.com
mailto:ian.d.roman...@intel.com

IP Status

 No known IP claims.

Status

 Incomplete.  DO NOT SHIP.

Version

 Version 5, 14-February-2013

Number

 TBD.

Dependencies

 GLX 1.4 is required.

 GLX_ARB_create_context and GLX_ARB_create_context_profile are
required.

 This extension interacts with
GLX_EXT_create_context_es2___profile and
 GLX_EXT_create_context_es___profile.

Overview

 In many situations, applications want to detect characteristics
of a
 rendering device before creating a context for that device.
Information
 gathered at this stage may guide choices the application makes
about
 color depth, number of samples per-pixel, texture quality, and
so on.
 In addition, versions of supported APIs and implementation API
 preference may also guide start-up decisions made by the
application.
 For example, one implementation may prefer vertex data be
supplied using
 methods only available in a compatibility profile, but another
 implementation may only support the desired version in a core
profile.

 There are also cases where more than one renderer may be
available per
 display.  For example, there is typically a hardware
implementation and
 a software based implementation.  There are cases where an
application
 may want to pick one over the other.  One such situation is
when the
 software implementation supports more features than the hardware
 implementation.  Another situation is when a particular version
of the
 hardware implementation is blacklisted due to known bugs.

 This extension provides a mechanism for the application to
query all of
 the available renderers for a particular display and screen.  In
 addition, this extension provides a mechanism for applications
to create
 contexts with respect to a specific renderer.

New Procedures and Functions

 Bool glXQueryRendererIntegerMESA(__Display *dpy, int screen,
  int renderer, int attribute,
  unsigned int *value);
 Bool glXQueryCurrentRendererInteger__MESA(int attribute,
unsigned int *value);

 const char *glXQueryRendererStringMESA(__Display *dpy, int screen,
int renderer, int
attribute);

 const char *__glXQueryCurrentRendererStringM__ESA(int attribute);

New Tokens

 Accepted as an attribute in glXQueryRendererIntegerMESA:

 GLX_RENDERER_VENDOR_ID_MESA  0x
 GLX_RENDERER_DEVICE_ID_MESA  0x
 GLX_RENDERER_VERSION_MESA0x
 GLX_RENDERER_ACCELERATED_MESA0x
 GLX_RENDERER_VIDEO_MEMORY_MESA   0x
 GLX_RENDERER_UNIFIED_MEMORY___ARCHITECTURE_MESA0x
 GLX_RENDERER_PREFERRED___PROFILE_MESA  0x
 GLX_RENDERER_OPENGL_CORE___PROFILE_VERSION_MESA0x
 GLX_RENDERER_OPENGL___COMPATIBILITY_PROFILE_VERSION___MESA
0x
 

[Mesa-dev] [Bug 61750] Undefined references linking libGLESv2 when configured with --disable-dri

2013-03-03 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=61750

--- Comment #3 from Jakob Bornecrantz ja...@vmware.com ---
Well currently libGL isn't built at all if you pass --disable-[glx|dri] so you
would not get anything working then if you did that.

Also considering GLES is available on more platforms then DRI (even linux
based) I can see the usefulness of a software rasterizer being buildable there.

Cheers, Jakob.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] multisample clears

2013-03-03 Thread Dave Airlie
I've been playing with softpipe msaa on and off, but I hit a problem
with the clears and am just wondering if the state tracker should be
doing something like this.

Or maybe only if any bound buffer has nr_samples  1, or fallback to
the non-quad draw method.

I can't see how else the driver could distinguish a multisample clear.

The other problem I have and not figuring out is if rendering to a
buffer with multisample off, then turning it on is meant to be
meaningful, if you have to clear
the buffer in between, then with this fixed it should be cool.

Dave.

From e1ee59d87ba42d8a58be640ee1fd2b952414f45e Mon Sep 17 00:00:00 2001
From: Dave Airlie airl...@redhat.com
Date: Mon, 4 Mar 2013 13:39:17 +1000
Subject: [PATCH] st/mesa: enable multisample in clear quad code

Not sure if this is correct at all
---
 src/mesa/state_tracker/st_cb_clear.c | 9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/mesa/state_tracker/st_cb_clear.c
b/src/mesa/state_tracker/st_cb_clear.c
index 4aa0bc1..649d7bd 100644
--- a/src/mesa/state_tracker/st_cb_clear.c
+++ b/src/mesa/state_tracker/st_cb_clear.c
@@ -282,7 +282,14 @@ clear_with_quad(struct gl_context *ctx,
cso_set_vertex_elements(st-cso_context, 2, st-velems_util_draw);
cso_set_stream_outputs(st-cso_context, 0, NULL, 0);
cso_set_sample_mask(st-cso_context, ~0);
-   cso_set_rasterizer(st-cso_context, st-clear.raster);
+
+   {
+  struct pipe_rasterizer_state rs = st-clear.raster;
+
+  if (st-ctx-Multisample.Enabled)
+ rs.multisample = 1;
+  cso_set_rasterizer(st-cso_context, rs);
+   }

/* viewport state: viewport matching window dims */
{
-- 
1.8.1.2
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 1/4] glapi/gen: Create optimized glX opcode dispatch tree

2013-03-03 Thread Matt Turner
Some spelling fixes:

On Sun, Mar 3, 2013 at 4:41 PM, Stefan Brüns
stefan.bru...@rwth-aachen.de wrote:
 The current code omits some possibilities to optimize the tree, leading
 to a large tree with way to many steps until the leave is reached.

Singular of leaves is leaf.

 The new code optimizes the tree based on a simple observation: as long
 as at most half of the nodes at the current level are leaves, tree size
 is reduced or kept when the children are pulled up one level.

 Tree depth is halved on average (for some leaves, reduced from 9 to 3),
 tree size is reduced slightly.

 The algorithm works as follows:
 1. create leaves, each containing min_op_count opcodes
 2. create a binary tree
 3. pullup children, as long as there are children and tree size is reduced
 3.1. do the same for each non-leave child

leaf

 The pullup algorithm has one tunable, pullup_bias. If set to 0, the
 algorithm is followed stritly, if set to values larger 0, some more

strictly

 children are pulled up, reducing depth in favor of slightly increased size.

 Signed-off-by: Stefan Brüns stefan.bru...@rwth-aachen.de
 ---
  src/mapi/glapi/gen/glX_server_table.py |   76
 
  1 file changed, 76 insertions(+)

 diff --git a/src/mapi/glapi/gen/glX_server_table.py
 b/src/mapi/glapi/gen/glX_server_table.py
 index 47aa111..5b3ffdc 100644
 --- a/src/mapi/glapi/gen/glX_server_table.py
 +++ b/src/mapi/glapi/gen/glX_server_table.py
 @@ -65,6 +65,8 @@ class function_table:
  # Minimum number of opcodes in a leaf node.
  self.min_op_bits = 3
  self.min_op_count = (1  self.min_op_bits)
 +
 +self.pullup_bias = 1
  return


 @@ -84,6 +86,80 @@ class function_table:
  return


 +def get_leaves(self):
 +leaves = []
 +
 +for i in range(0, (1self.max_bits), self.min_op_count):
 +
 +# M, [children], tree size, depth, type, first opcode
 +leave = [ 0, [], 1, 0, 'E', i ]

leaf

 +
 +for j in range(i, i + self.min_op_count):
 +if self.functions.has_key(j):
 +leave[4] = 'L'
 +break;
 +
 +leaves.append(leave)
 +
 +return leaves
 +
 +
 +def combine_tree(self, nodes):
 +newnodes = []
 +
 +for i in range(0, len(nodes)-1, 2):
 +c1 = nodes[i]
 +c2 = nodes[i+1]
 +parent = [ 1, [c1, c2], c1[2]+c2[2]+1, 0, 'N', c1[5] ]
 +if c1[4] == c2[4]:
 +parent[4] = c1[4]
 +
 +newnodes.append(parent)
 +
 +if len(newnodes) = 2:
 +return self.combine_tree(newnodes)
 +
 +return parent
 +
 +
 +def pullup_nodes(self, node):
 +
 +children = node[1]
 +
 +# Count non-leaves. If at least half of the children
 +# are non-leaves pulling up saves space. Add a small
 +# bias to favor shallower trees
 +count = sum( 1 for child in children if child[4] == 'N' )
 +count += self.pullup_bias
 +
 +# conditionally replace the children of a node with its
 +# grandchilren. Grandchildren exist if child size  1

grandchildren

 +if count = len(children)/2 and children[0][2]  1:
 +newnodes = []
 +for child in children:
 +newnodes.append(child[1][0])
 +newnodes.append(child[1][1])
 +
 +node[0] += 1
 +node[1] = newnodes
 +node[2] = newnodes[0][2] * len(newnodes) + 1
 +self.pullup_nodes(node)
 +
 +else:
 +node[2] = 1
 +for child in children:
 +if child[4] == 'N':
 +self.pullup_nodes(child)
 +else:
 +child[1] = []
 +child[2] = 1
 +
 +node[3] = max( child[3] + 1, node[3] )
 +node[2] += child[2]
 +
 +return
 +
 +
  def divide_group(self, min_opcode, total):
  Divide the group starting min_opcode into subgroups.
  Returns a tuple containing the number of bits consumed by
 --
 1.7.10.4
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] vdpau-softpipe build regression fix

2013-03-03 Thread Jakub Bogusz
Hello,

This patch fixes vdpau-softpipe build regression (wrong file used for
softpipe, resulting in undefined driver_descriptor symbol), introduced
with gallium automake support.


-- 
Jakub Boguszhttp://qboosh.pl/
--- Mesa-9.1/src/gallium/targets/vdpau-softpipe/Makefile.am.orig
2013-02-20 01:26:22.0 +0100
+++ Mesa-9.1/src/gallium/targets/vdpau-softpipe/Makefile.am 2013-02-28 
15:46:37.886610941 +0100
@@ -35,7 +35,7 @@
 vdpau_LTLIBRARIES = libvdpau_softpipe.la
 
 libvdpau_softpipe_la_SOURCES = \
-   $(top_srcdir)/src/gallium/auxiliary/vl/vl_winsys_dri.c
+   $(top_srcdir)/src/gallium/auxiliary/vl/vl_winsys_xsp.c
 
 libvdpau_softpipe_la_LDFLAGS = \
-module \
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] Problems with an intel integrated graphic card

2013-03-03 Thread Francesco Bonanno
Hi, I'm the user of this card: 00:02.0 VGA compatible controller [0300]: 
Intel Corporation Atom Processor D4xx/D5xx/N4xx/N5xx Integrated Graphics 
Controller [8086:a011] . I'm running ubuntu 13.04 dev branch, with Mesa 
9.0.2, the packaged version on the repo (OpenGL vendor string: Intel 
Open Source Technology Center OpenGL renderer string: Mesa DRI Intel(R) 
IGD x86/MMX/SSE2 OpenGL version string: 1.4 Mesa 9.0.2 OpenGL 
extensions:), after 3/4 hours form the login I've this error with compiz 
(and everything needs mesa): 
../../../../../src/mesa/swrast/s_renderbuffer.c:588: map_attachment: 
Assertion `srb-Map' failed. So, I've downloaded the git code onto my pc 
and I've compiled it. Same result (same output of before except : OpenGL 
version string: 2.1 Mesa 9.2-devel (git-0b6e72f) ). So I've tried with 
gallium driver too (i915 one) (OpenGL vendor string: VMware, Inc. OpenGL 
renderer string: Gallium 0.4 on i915 (chipset: Pineview M) OpenGL 
version string: 2.1 Mesa 9.2-devel (git-0b6e72f) OpenGL shading language 
version string: 1.20 OpenGL extensions:) and when I use for example:


spf@spf-laptop:~$ LIBGL_DEBUG=verbose glxgears
libGL: OpenDriver: trying /usr/local/lib/dri/i915_dri.so
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Warning in /home/spf/.drirc line 4, column 12: undefined option: 
force_s3tc_enable.
libGL: Warning in /home/spf/.drirc line 5, column 12: undefined option: 
no_rast.
libGL: Warning in /home/spf/.drirc line 6, column 12: undefined option: 
always_flush_cache.
libGL: Warning in /home/spf/.drirc line 7, column 12: undefined option: 
bo_reuse.
libGL: Warning in /home/spf/.drirc line 8, column 12: undefined option: 
disable_blend_func_extended.
libGL: Warning in /home/spf/.drirc line 9, column 12: undefined option: 
shader_precompile.
libGL: Warning in /home/spf/.drirc line 15, column 12: undefined option: 
hiz.
libGL: Warning in /home/spf/.drirc line 16, column 12: undefined option: 
always_flush_batch.
libGL: Warning in /home/spf/.drirc line 17, column 12: undefined option: 
texture_tiling.
libGL: Warning in /home/spf/.drirc line 19, column 12: undefined option: 
early_z.
libGL: Warning in /home/spf/.drirc line 20, column 12: undefined option: 
fragment_shader.
libGL: Warning in /home/spf/.drirc line 22, column 12: undefined option: 
stub_occlusion_query.

Running synchronized to the vertical refresh.  The framerate should be
approximately the same as the monitor refresh rate.
5698 frames in 5.0 seconds = 1139.489 FPS
6738 frames in 5.0 seconds = 1347.487 FPS
6337 frames in 5.0 seconds = 1267.353 FPS
XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server :0
  after 34 requests (34 known processed) with 0 events remaining.
spf@spf-laptop:~$ LIBGL_DEBUG=verbose glxgears
libGL: OpenDriver: trying /usr/local/lib/dri/i915_dri.so
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Warning in /home/spf/.drirc line 4, column 12: undefined option: 
force_s3tc_enable.
libGL: Warning in /home/spf/.drirc line 5, column 12: undefined option: 
no_rast.
libGL: Warning in /home/spf/.drirc line 6, column 12: undefined option: 
always_flush_cache.
libGL: Warning in /home/spf/.drirc line 7, column 12: undefined option: 
bo_reuse.
libGL: Warning in /home/spf/.drirc line 8, column 12: undefined option: 
disable_blend_func_extended.
libGL: Warning in /home/spf/.drirc line 9, column 12: undefined option: 
shader_precompile.
libGL: Warning in /home/spf/.drirc line 15, column 12: undefined option: 
hiz.
libGL: Warning in /home/spf/.drirc line 16, column 12: undefined option: 
always_flush_batch.
libGL: Warning in /home/spf/.drirc line 17, column 12: undefined option: 
texture_tiling.
libGL: Warning in /home/spf/.drirc line 19, column 12: undefined option: 
early_z.
libGL: Warning in /home/spf/.drirc line 20, column 12: undefined option: 
fragment_shader.
libGL: Warning in /home/spf/.drirc line 22, column 12: undefined option: 
stub_occlusion_query.

Running synchronized to the vertical refresh.  The framerate should be
approximately the same as the monitor refresh rate.
5756 frames in 5.0 seconds = 1151.160 FPS
6636 frames in 5.0 seconds = 1327.025 FPS
5823 frames in 5.0 seconds = 1164.519 FPS
^C
spf@spf-laptop:~$

But it opens only a black window without nothing.

The output with the packaged (repo) mesa:

spf@spf-laptop:~$ LIBGL_DEBUG=verbose glxgears
libGL: OpenDriver: trying /usr/lib/i386-linux-gnu/dri/tls/i915_dri.so
libGL: OpenDriver: trying /usr/lib/i386-linux-gnu/dri/i915_dri.so
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Warning in /home/spf/.drirc line 10, column 12: undefined option: 
fthrottle_mode.
libGL: Warning in /home/spf/.drirc line 

Re: [Mesa-dev] [PATCH] vdpau-softpipe build regression fix

2013-03-03 Thread Matt Turner
On Thu, Feb 28, 2013 at 7:40 AM, Jakub Bogusz qbo...@pld-linux.org wrote:
 Hello,

 This patch fixes vdpau-softpipe build regression (wrong file used for
 softpipe, resulting in undefined driver_descriptor symbol), introduced
 with gallium automake support.


 --
 Jakub Boguszhttp://qboosh.pl/

Oh! Nice find. I'll commit this. Thanks!
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev