[Mesa-dev] [PATCH] mesa: replace GLstencil with GLubyte

2011-11-12 Thread Brian Paul
--- src/mesa/main/mtypes.h| 12 -- src/mesa/main/pack.c | 23 +--- src/mesa/main/pack.h |4 +- src/mesa/main/pixeltransfer.c |4 +- src/mesa/main/pixeltransfer.h |2 +- src/mesa/state_tracker/st_c

[Mesa-dev] [PATCH 1/5] xlib: remove software alpha buffer support

2011-11-12 Thread Brian Paul
Seldom used and this won't work when we move to using Map/UnmapRenderbuffer everywhere. This will let us remove a bunch of core Mesa code too. --- src/mesa/drivers/x11/xm_api.c | 20 +--- src/mesa/drivers/x11/xm_line.c |2 -- src/mesa/drivers/x11/xm_tri.c |3 --- src/m

[Mesa-dev] [PATCH 2/5] xlib: use MESA_FORMAT_XRGB8888 for pixmap surfaces

2011-11-12 Thread Brian Paul
We no longer have software-allocated alpha buffers so we can forget about the alpha channel. --- src/mesa/drivers/x11/xm_buffer.c | 13 + 1 files changed, 1 insertions(+), 12 deletions(-) diff --git a/src/mesa/drivers/x11/xm_buffer.c b/src/mesa/drivers/x11/xm_buffer.c index ea87b6d.

[Mesa-dev] [PATCH 4/5] xlib: remove xm_image.[ch] files

2011-11-12 Thread Brian Paul
--- src/mesa/drivers/x11/Makefile |1 - src/mesa/drivers/x11/xm_image.c | 39 src/mesa/drivers/x11/xm_image.h | 77 --- 3 files changed, 0 insertions(+), 117 deletions(-) delete mode 100644 src/mesa/drivers/x11/xm_image.c delete

[Mesa-dev] [PATCH 5/5] mesa: remove support for software alpha buffers

2011-11-12 Thread Brian Paul
This was only used by the xlib driver to add an alpha channel to the front/window color buffer. This was no longer going to work well with the move to direct mapping of renderbuffers. --- src/mesa/main/renderbuffer.c | 367 -- src/mesa/main/renderbuffer.h

[Mesa-dev] [PATCH 1/7] st/mesa: check renderbuffer orientation in st_MapRenderbuffer()

2011-11-12 Thread Brian Paul
We'll soon be able to use these for a core Mesa implementation of glReadPixels. --- src/mesa/state_tracker/st_cb_fbo.c | 32 +++- 1 files changed, 27 insertions(+), 5 deletions(-) diff --git a/src/mesa/state_tracker/st_cb_fbo.c b/src/mesa/state_tracker/st_cb_fbo.c i

[Mesa-dev] [PATCH 2/7] mesa: move swrast ReadPixels code into core Mesa

2011-11-12 Thread Brian Paul
The swrast ReadPixels code has no dependencies on swrast since moving to Map/UnmapRenderbuffer(). We'll be able to remove s_readpix.c and remove the state tracker's glReadPixels code next. --- src/mesa/main/readpix.c | 484 +++ src/mesa/main/readpix.h

[Mesa-dev] [PATCH 3/7] mesa: use _mesa_readpixels() as default driver hook

2011-11-12 Thread Brian Paul
--- src/mesa/drivers/common/driverfuncs.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/src/mesa/drivers/common/driverfuncs.c b/src/mesa/drivers/common/driverfuncs.c index 27ea559..5e25d7f 100644 --- a/src/mesa/drivers/common/driverfuncs.c +++ b/src/mesa/drivers/commo

[Mesa-dev] [PATCH 4/7] mesa: remove _swrast_ReadPixels()

2011-11-12 Thread Brian Paul
We use the code in main/readpix.c now. --- src/mesa/SConscript |1 - src/mesa/sources.mak|1 - src/mesa/swrast/s_depth.c |3 +- src/mesa/swrast/s_readpix.c | 522 --- src/mesa/swrast/swrast.h|7 - 5 files changed, 1 ins

[Mesa-dev] [PATCH 5/7] st/mesa: remove dependencies on code in st_cb_readpixels.c

2011-11-12 Thread Brian Paul
st_cb_readpixels.c is going away next. --- src/mesa/state_tracker/st_cb_drawpixels.c | 21 ++--- src/mesa/state_tracker/st_cb_readpixels.c |2 +- src/mesa/state_tracker/st_cb_readpixels.h |3 --- 3 files changed, 19 insertions(+), 7 deletions(-) diff --git a/src/mesa/sta

[Mesa-dev] [PATCH 6/7] st/mesa: switch to using _mesa_readpixels()

2011-11-12 Thread Brian Paul
--- src/mesa/state_tracker/st_cb_drawpixels.c |1 - src/mesa/state_tracker/st_context.c |5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c index 95805fd..a5ed472 100644 --- a/

[Mesa-dev] [PATCH 7/7] st/mesa: remove st_cb_readpixels.[ch]

2011-11-12 Thread Brian Paul
We now use the core Mesa code for glReadPixels. --- src/mesa/SConscript |1 - src/mesa/sources.mak |1 - src/mesa/state_tracker/st_cb_readpixels.c | 678 - src/mesa/state_tracker/st_cb_readpixels.h | 49 -- 4 files c

[Mesa-dev] [PATCH 1/2] st/mesa: allow creating buffers of size = 0

2011-11-12 Thread Brian Paul
Calling glBufferData(size=0) is legal. Instead of no-oping it, go ahead and create a gallium buffer of size zero. This lets us avoid a bunch of NULL pointer checking elsewhere. In the case of a zero-sized VBO, the bounds checking we do later will prevent invalid memory accesses. --- src/mesa/st

[Mesa-dev] [PATCH 2/2] util/draw: replace assertions with conditionals in util_draw_max_index()

2011-11-12 Thread Brian Paul
Don't assert/die if a VBO is too small. Return zero instead. Note that util_draw_max_index() now returns max_index+1 instead of max_index. This lets us return zero to indicate that one of the VBOs is too small to draw anything. Fixes a failure with the new piglit vbo-too-small test. --- src/ga

[Mesa-dev] [PATCH] swrast: fix glReadPixels from texture attachment

2011-11-12 Thread Brian Paul
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=42635 --- src/mesa/swrast/s_texrender.c | 13 + 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/src/mesa/swrast/s_texrender.c b/src/mesa/swrast/s_texrender.c index 83e7a6a..3734ce6 100644 --- a/src/mesa/swrast/s_texre

[Mesa-dev] [PATCH 1/4] mesa: consolidate cases in _mesa_components_in_format()

2011-11-12 Thread Brian Paul
and _mesa_sizeof_packed_type() --- src/mesa/main/image.c | 40 +++- 1 files changed, 11 insertions(+), 29 deletions(-) diff --git a/src/mesa/main/image.c b/src/mesa/main/image.c index 7d95dd6..ff536da 100644 --- a/src/mesa/main/image.c +++ b/src/mesa/main/ima

[Mesa-dev] [PATCH 2/4] mesa: remove unused macros in macros.h

2011-11-12 Thread Brian Paul
--- src/mesa/main/macros.h | 26 -- 1 files changed, 0 insertions(+), 26 deletions(-) diff --git a/src/mesa/main/macros.h b/src/mesa/main/macros.h index 2a849e3..d90905f 100644 --- a/src/mesa/main/macros.h +++ b/src/mesa/main/macros.h @@ -588,19 +588,6 @@ do {

[Mesa-dev] [PATCH 3/4] mesa: move CEILING() macro into macros.h

2011-11-12 Thread Brian Paul
--- src/mesa/main/image.c |3 --- src/mesa/main/macros.h |4 src/mesa/main/pack.c |5 + 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/mesa/main/image.c b/src/mesa/main/image.c index ff536da..cd333ab 100644 --- a/src/mesa/main/image.c +++ b/src/mesa/main

[Mesa-dev] [PATCH 4/4] mesa: new BYTE/SHORT_TO_FLOATZ() macros

2011-11-12 Thread Brian Paul
Rather than redefining the BYTE/SHORT_TO_FLOAT macros, just define new ones with different names. These macros preserve zero when converting. --- src/mesa/main/image.c | 16 src/mesa/main/macros.h |7 +++ src/mesa/main/pack.c | 36 ++

Re: [Mesa-dev] [PATCH 2/2] [RFC] Linker: handle built-in uniform variables like normal uniform variables

2011-11-12 Thread Ian Romanick
On 11/09/2011 01:10 AM, Yuanhan Liu wrote: The original comments just tell me that I'm doing wrong. Here I sent a patch for comments and explanation, and I may then try to write the code to process those built-in uniform variables. My questions is why we can't handle those built-in uniform varia

[Mesa-dev] [PATCH 01/13] mesa : move bindbuffer{base,range} from transformfeedback.c BindBuffer* functions are part of tfb extension. They are however used by others extensions such as uniform buffer

2011-11-12 Thread vlj
--- src/mesa/main/api_exec.c |2 + src/mesa/main/bufferobj.c | 48 + src/mesa/main/bufferobj.h | 12 + src/mesa/main/transformfeedback.c | 22 src/mesa/main/transformfeedback.h |8 +++--- 5 files ch

[Mesa-dev] [PATCH 02/13] gallium: rework some utilities functions to support 2d indexing

2011-11-12 Thread vlj
This patch adds a 2d ureg_src constructor, and add a field in st_src_reg inside glsl_to_tgsi that hold potential 2d index. 2d indexing is required at least for uniform buffer object support --- src/gallium/auxiliary/tgsi/tgsi_ureg.h | 12 src/mesa/state_tracker/st_gl

[Mesa-dev] [PATCH 03/13] gallium: fix function description

2011-11-12 Thread vlj
ureg_DECL_constant2D does not return anything. --- src/gallium/auxiliary/tgsi/tgsi_ureg.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/auxiliary/tgsi/tgsi_ureg.c b/src/gallium/auxiliary/tgsi/tgsi_ureg.c index cada435..5d8dbba 100644 --- a/src/gallium/

Re: [Mesa-dev] [PATCH 01/13] mesa : move bindbuffer{base, range} from transformfeedback.c BindBuffer* functions are part of tfb extension. They are however used by others extensions such as uniform bu

2011-11-12 Thread Marek Olšák
Hi vlj, just one remark unrelated to the patch. The commit messages should start with a 76-characters-long summary, followed by an empty line, and then followed by a more thorough explanation if needed. Marek On Sat, Nov 12, 2011 at 10:11 PM, vlj wrote: > --- >  src/mesa/main/api_exec.c      

Re: [Mesa-dev] [PATCH 01/13] mesa : move bindbuffer{base, range} from transformfeedback.c BindBuffer* functions are part of tfb extension. They are however used by others extensions such as uniform bu

2011-11-12 Thread vincent
Sorry for this misformating, and thank for the tips :) Vincent Le samedi 12 novembre 2011 à 23:18 +0100, Marek Olšák a écrit : > Hi vlj, > > just one remark unrelated to the patch. > > The commit messages should start with a 76-characters-long summary, > followed by an empty line, and then foll

[Mesa-dev] [PATCH] mesa-demos: Add blinking-teapot demo.

2011-11-12 Thread vlj
blinking-teapot is an UBO demo. --- src/glsl/CMakeLists.txt|1 + src/glsl/Makefile.am |2 + src/glsl/blinking-teapot.c | 233 src/glsl/shader.frag | 31 ++ src/glsl/shader.vert | 16 +++ 5 files changed, 283 ins

[Mesa-dev] [PATCH] r600g: lazy load for AR register

2011-11-12 Thread Vadim Girlin
Emit MOVA* instruction only when AR is used. Signed-off-by: Vadim Girlin --- Tested on evergreen: no regressions, fixes some variable-indexing tests. src/gallium/drivers/r600/r600_asm.c| 39 ++ src/gallium/drivers/r600/r600_asm.h|2 + src/gallium/drivers/r600/r600