[Mesa-dev] [PATCH] mesa: Avoid C99 indexed initializers.

2012-10-10 Thread jfonseca
From: José Fonseca jfons...@vmware.com Not supported by MSVC. Just compiled tested. --- src/mesa/main/get_hash_generator.py | 31 ++- src/mesa/main/mtypes.h |3 +++ 2 files changed, 29 insertions(+), 5 deletions(-) diff --git

[Mesa-dev] [PATCH 1/2] draw,gallivm: Fix draw_get_shader_param.

2012-07-12 Thread jfonseca
From: José Fonseca jfons...@vmware.com - Use LLVM limits when LLVM is being used, instead of TGSI limits - Provide draw_get_shader_param_no_llvm for when llvm is never used (softpipe) - Eliminate several of the hacks around draw shader caps in several drivers Unfortunately the hack for

[Mesa-dev] [PATCH 2/2] mesa/st: Generates TGSI that always recognizes INSTANCEID/VERTEXID as integers.

2012-07-12 Thread jfonseca
From: José Fonseca jfons...@vmware.com Tested by running piglit draw-instanced, and by forcing llvmpipe advertise no native integer support, which now produces: VERT DCL IN[0] DCL SV[0], INSTANCEID DCL OUT[0], POSITION DCL OUT[1], COLOR DCL CONST[0..19] DCL TEMP[0], LOCAL DCL TEMP[1], LOCAL DCL

[Mesa-dev] [PATCH] llvmpipe: Fix alpha testing precision on rgba8 formats.

2012-05-22 Thread jfonseca
From: José Fonseca jfons...@vmware.com This is a long standing problem, that recently surfaced with the change to enable perspective correct color interpolation. A fix for all possible formats is left to the future. --- src/gallium/drivers/llvmpipe/lp_bld_alpha.c | 31

[Mesa-dev] [PATCH 2/2] gallium/tgsi: s/TGSI_BUFFER/TGSI_TEXTURE_BUFFER/

2012-05-11 Thread jfonseca
From: José Fonseca jfons...@vmware.com For consistency. --- src/gallium/auxiliary/tgsi/tgsi_build.c|4 ++-- .../drivers/nv50/codegen/nv50_ir_from_tgsi.cpp |3 +-- src/gallium/include/pipe/p_shader_tokens.h |2 +- 3 files changed, 4 insertions(+), 5

[Mesa-dev] [PATCH 1/2] gallium/tgsi: Redefine the TGSI_TEXTURE_UNKNOWN texture target.

2012-05-11 Thread jfonseca
From: José Fonseca jfons...@vmware.com Some code relies on the existing of an invalid texture target. It seems safer to bring it back than to deal with unintended consequences. This partially reverts commit a4ebb04214bab1cd9bd41967232ec89441e31744. --- src/gallium/auxiliary/tgsi/tgsi_build.c

[Mesa-dev] [PATCH] svga: Disable bogus assertions concerning min_index/max_index.

2012-03-09 Thread jfonseca
From: José Fonseca jfons...@vmware.com min_index/max_index are merely conservative guesses, so we can't make buffer overflow detection based on their values. --- src/gallium/drivers/svga/svga_draw.c | 15 +++ 1 files changed, 7 insertions(+), 8 deletions(-) diff --git

[Mesa-dev] [PATCH] gallivm: Fix TGSI_OPCODE_ARR's translation.

2012-02-20 Thread jfonseca
From: José Fonseca jfons...@vmware.com Like TGSI_OPCODE_ARL, destination should be an integer. This fixes invalid LLVM IR on an internal state tracker (currently Mesa never emits this opcode). In the future consider making ADDR register also a integer-as-float array, like all other register

[Mesa-dev] [PATCH] llvmpipe: Don't assume vector is 4 wide in lp_build_sin()/lp_build_cos()

2012-02-17 Thread jfonseca
From: José Fonseca jfons...@vmware.com --- src/gallium/auxiliary/gallivm/lp_bld_arit.c | 141 +++--- 1 files changed, 60 insertions(+), 81 deletions(-) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_arit.c b/src/gallium/auxiliary/gallivm/lp_bld_arit.c index

[Mesa-dev] [PATCH] mapi/glapi: Never use a generic no-op entry-point on Windows.

2012-02-02 Thread jfonseca
From: José Fonseca jfons...@vmware.com When GLAPIENTRY is __stdcall (ie Windows), the stack is popped by the callee making the number/type of arguments significant, therefore using a generic no-op causes stack corruption for many entry-points. --- src/mapi/glapi/glapi_nop.c |8 ++-- 1

[Mesa-dev] [PATCH] draw: Avoid NULL pointer dereference when binding NULL fragment shaders.

2012-02-02 Thread jfonseca
From: José Fonseca jfons...@vmware.com Now that the draw module avoids flushing, it may flush precisely when binding a NULL shader, so care must be taken when restoring the original fragment shader. --- src/gallium/auxiliary/draw/draw_pipe_aaline.c |2 +-

[Mesa-dev] [PATCH] draw: Ensure that prepare is always run after LLVM garbagge collection.

2012-01-27 Thread jfonseca
From: José Fonseca jfons...@vmware.com Should avoid dangling pointer derreference with glean --run results --overwrite --quick --tests texSwizzle --- src/gallium/auxiliary/draw/draw_llvm.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git

[Mesa-dev] [PATCH] mesa/st: Don't modify the context draw/read buffers.

2011-12-08 Thread jfonseca
From: José Fonseca jfons...@vmware.com It sets the wrong values (GL_XXX_LEFT instead of GL_XXX), and no other Mesa driver does this, given that Mesa sets the right draw/read buffers provided the Mesa visual has the doublebuffer flag filled correctly which is the case. ---

[Mesa-dev] [PATCH 1/2] gallium/auxiliary: Remove os_stream.

2011-11-29 Thread jfonseca
From: José Fonseca jose.r.fons...@gmail.com XP kernel mode was the only subsystem lacking stdio FILES. --- src/gallium/auxiliary/Makefile.sources |5 - src/gallium/auxiliary/os/os_stream.c| 58 - src/gallium/auxiliary/os/os_stream.h| 145

[Mesa-dev] [PATCH 2/2] Remove windows kernel support code.

2011-11-29 Thread jfonseca
From: José Fonseca jose.r.fons...@gmail.com Not actively used. --- common.py |2 +- scons/gallium.py| 128 + src/gallium/auxiliary/os/os_memory.h|4 -

[Mesa-dev] [PATCH] mesa/st: Be nice with the stack -- use malloc for large structures/arrays.

2011-11-04 Thread jfonseca
From: José Fonseca jfons...@vmware.com st_translate_program's data was taking 51K off the stack, causing stack overflow on Windows. --- src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 52 +-- 1 files changed, 40 insertions(+), 12 deletions(-) diff --git

[Mesa-dev] [PATCH] llvmpipe: Use -1 instead of ~0 for no slot.

2011-10-31 Thread jfonseca
From: José Fonseca jfons...@vmware.com As the value of unsigned ~0 depends on the bit-width. Fixes fdo 42411. --- src/gallium/drivers/llvmpipe/lp_state_derived.c | 12 ++-- src/gallium/drivers/llvmpipe/lp_state_setup.c | 16 +++-

[Mesa-dev] [PATCH] llvmpipe: Use -1 instead of ~0 for no slot.

2011-10-31 Thread jfonseca
From: José Fonseca jfons...@vmware.com As the value of unsigned ~0 depends on the bit-width. Fixes fdo 42411. --- src/gallium/drivers/llvmpipe/lp_state_derived.c | 12 ++-- src/gallium/drivers/llvmpipe/lp_state_setup.c | 16 +++-

[Mesa-dev] [PATCH] configure: Use -fno-builtin-memcmp.

2011-10-14 Thread jfonseca
From: José Fonseca jfons...@vmware.com Issue spotted by Adam Jackson ajax at redhat.com. http://lists.freedesktop.org/archives/mesa-dev/2011-June/009077.html --- configure.ac |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/configure.ac b/configure.ac index

[Mesa-dev] [PATCH] mesa/st: Avoid spurious transfers when creating fbo textures without image data.

2011-04-14 Thread jfonseca
From: José Fonseca jfons...@vmware.com We could actually try to do an early return both for gallium textures and malloc memory textures, but I'm not sure exactly which situations stImage-pt is NULL, and whether texImage-Data == NULL would be acceptible or not. ---

[Mesa-dev] [PATCH] draw: Prevent out-of-bounds vertex buffer access.

2011-03-31 Thread jfonseca
From: José Fonseca jfons...@vmware.com Based on some code and ideas from Keith Whitwell. --- src/gallium/auxiliary/Makefile |1 + src/gallium/auxiliary/SConscript |1 + src/gallium/auxiliary/draw/draw_private.h |8 ++

[Mesa-dev] [PATCH] draw-robustness: Test robustness for out-of-bounds vertex fetches.

2011-03-31 Thread jfonseca
From: José Fonseca jfons...@vmware.com Not added to the standard test lists given that ARB_vertex_buffer_object allows program termination out-of-bounds vertex buffer object fetches occur. --- tests/general/CMakeLists.gl.txt |1 + tests/general/draw-robustness.c | 201

<    1   2   3