[Mesa-dev] [PATCH] llvmpipe: We don't use the draw pipeline for offset_point/line.

2013-10-09 Thread jfonseca
From: José Fonseca Unless the polygon fill mode is different PIPE_POLYGON_MODE_FILL, so checking the the polygon mode is sufficient. Testing done: no regression in polygon-mode-offset --- src/gallium/drivers/llvmpipe/lp_state_rasterizer.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src

[Mesa-dev] [PATCH] util/u_format: take normalized flag in consideration in util_format_is_rgba8_variant

2013-11-04 Thread jfonseca
From: José Fonseca Just happened to notice it was missing while looking at it. --- src/gallium/auxiliary/util/u_format.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gallium/auxiliary/util/u_format.h b/src/gallium/auxiliary/util/u_format.h index dc777c3..31283e5 100644 --- a/src/ga

[Mesa-dev] [PATCH] glx: Fix scons build.

2013-11-08 Thread jfonseca
From: José Fonseca By disabling DRI3 support for the time being. I'll add DRI3 support to scons build when the DRI3 dependencies become more widely available (as now there is no convenient way of testing it except building dependencies from source). --- src/glx/SConscript | 6 ++ src/glx/gl

[Mesa-dev] [PATCH] gallivm: Compile flag to debug TGSI execution through printfs.

2013-11-13 Thread jfonseca
From: José Fonseca It is similar to tgsi_exec.c's DEBUG_EXECUTION compile flag. I had prototyped this for a while while debugging an issue, but finally cleaned this up and added a few more bells and whistles. Here is a sample output. CONST[0]: X: 0.006250 0.006250 0.006250 0.006250 Y: -0.0

[Mesa-dev] [PATCH] u_gen_mipmap: Use untampered cubemap texture coords when generating mipmaps.

2013-11-19 Thread jfonseca
From: José Fonseca It's not necessary to scale down cubemap texture coords when generating mipmaps: we are doing a 2x minification therefore it's guaranteed that the texture coords will always be at least 1 texel away of the edges. Scaling down can actually be harmful, as it may cause artefacts

[Mesa-dev] [PATCH] gallium: Make TGSI_SEMANTIC_FOG register four-component wide.

2013-11-20 Thread jfonseca
From: José Fonseca D3D9 Shader Model 2 restricted the fog register to one component, http://msdn.microsoft.com/en-us/library/windows/desktop/bb172945.aspx , but that restriction no longer exists in Shader Model 3, and several WHCK tests enforce that. So this change: - lifts the single-component

[Mesa-dev] [PATCH] tgsi_exec: Fix mask calculation for emit_kill_if.

2013-11-20 Thread jfonseca
From: José Fonseca Same as Si Chen's commit e7a5905d8a3960b0981750f8131e3af9acbfcdb8 for tgsi_exec module. Not actually tested, because softpipe is failing the test that caught this bug due to unrelated issues. --- src/gallium/auxiliary/tgsi/tgsi_exec.c | 3 +++ 1 file changed, 3 insertions(+)

[Mesa-dev] [PATCH] docs: Add a section with recommended reading for llvmpipe development.

2013-11-21 Thread jfonseca
From: José Fonseca Several links contributed by Keith Whitwell and Roland Scheidegger. --- docs/llvmpipe.html | 58 -- 1 file changed, 56 insertions(+), 2 deletions(-) diff --git a/docs/llvmpipe.html b/docs/llvmpipe.html index 80f8a01..d695907

[Mesa-dev] [PATCH 1/2] tgsi_ureg: Refactor the ureg_* inline so that all variables are pre-declared.

2013-11-21 Thread jfonseca
From: José Fonseca Mere syntactical change. --- src/gallium/auxiliary/tgsi/tgsi_ureg.h | 200 + 1 file changed, 104 insertions(+), 96 deletions(-) diff --git a/src/gallium/auxiliary/tgsi/tgsi_ureg.h b/src/gallium/auxiliary/tgsi/tgsi_ureg.h index e104cd9..cf0c75e

[Mesa-dev] [PATCH 2/2] tgsi: Prevent emission of instructions with empty writemask.

2013-11-21 Thread jfonseca
From: José Fonseca These degenerate instructions can often be emitted by state trackers when the semantics of instructions don't match precisely. --- src/gallium/auxiliary/tgsi/tgsi_ureg.c | 8 src/gallium/auxiliary/tgsi/tgsi_ureg.h | 22 ++ 2 files changed, 30 inse

[Mesa-dev] [PATCH] mesa/main: Prevent sefgault on glGetIntegerv(GL_ATOMIC_COUNTER_BUFFER_BINDING).

2014-06-06 Thread jfonseca
From: José Fonseca A recent ApiTrace change, that tries to dump more buffer state causes Mesa from my distro (10.1.4) to segfaults here. I haven't actually confirm this fixes it (I can't repro on master), but it seems a good idea to be defensive here anyway. Cc: "10.1 10.2" --- src/mesa/main/

[Mesa-dev] [PATCH] st/wgl: Clamp wglChoosePixelFormatARB's output nNumFormats to nMaxFormats.

2014-07-24 Thread jfonseca
From: José Fonseca While running https://github.com/nvMcJohn/apitest with apitrace I noticed that Mesa was producing bogus results: wglChoosePixelFormatARB(hdc, piAttribIList = {...}, pfAttribFList = &0, nMaxFormats = 1, piFormats = {19, 65576, 37, 198656, 131075, 0, 402653184, 0, 0, 0, 0,

[Mesa-dev] [PATCH] glsl/glcpp: Rename ERROR to ERROR_TOKEN.

2014-07-30 Thread jfonseca
From: José Fonseca To prevent collision with wingdi.h's ERROR define, using the same _TOKEN suffix already forsome other tokens due to similar reasons. PS: Name collisions will be rife with single capitalized words. And using _TOKEN suffix for only some of the tokens is not particularly consist

[Mesa-dev] [PATCH] gallium: Support PIPE_FORMAT_R10G10B10A2_UINT.

2013-08-21 Thread jfonseca
From: José Fonseca Same as PIPE_FORMAT_B10G10R10A2_UINT but without the swizzling. --- src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c | 1 + src/gallium/auxiliary/util/u_format.csv | 1 + src/gallium/include/pipe/p_format.h | 1 + 3 files changed, 3 insertions(+) diff

[Mesa-dev] [PATCH] llvmpipe: Remove the special path for TGSI_OPCODE_EXP.

2013-09-11 Thread jfonseca
From: José Fonseca It was wrong for EXP.y, as we clamped the source before computing the fractional part, and this opcode should be rarely used, so it's not worth the hassle. --- src/gallium/auxiliary/gallivm/lp_bld_arit.c| 80 -- src/gallium/auxiliary/gallivm/lp_bld_

[Mesa-dev] [PATCH 3/3] util/u_blit: Implement util_blit_pixels via pipe_context::blit.

2013-09-17 Thread jfonseca
From: José Fonseca This removes a lot of code, but not everything, as util_blit_pixels_tex is still useful when one needs to override pipe_sampler_view::swizzle_?. --- src/gallium/auxiliary/util/u_blit.c | 447 +++- 1 file changed, 37 insertions(+), 410 deletions(

[Mesa-dev] [PATCH 2/3] util/u_blit: Support blits from cubemaps.

2013-09-17 Thread jfonseca
From: José Fonseca By calling util_map_texcoords2d_onto_cubemap. A new parameter for util_blit_pixels_tex is necessary, as pipe_sampler_view::first_layer is always supposed to point to the first face when sampling from cubemaps. --- src/gallium/auxiliary/util/u_blit.c | 34 +

[Mesa-dev] [PATCH 1/3] vega: Use pipe_context::blit instead of util_blit_pixels_tex.

2013-09-17 Thread jfonseca
From: José Fonseca Only compile-tested but it seems straightforward. --- src/gallium/state_trackers/vega/vg_context.c | 44 src/gallium/state_trackers/vega/vg_context.h | 2 -- 2 files changed, 26 insertions(+), 20 deletions(-) diff --git a/src/gallium/state_tracke

[Mesa-dev] [PATCH] llvmpipe: Fix rendering to PIPE_FORMAT_R10G10B10A2_UNORM.

2013-09-20 Thread jfonseca
From: José Fonseca We must take rounding in consideration when re-scaling to narrow normalized channels, such as 2-bit normalized alpha. --- src/gallium/drivers/llvmpipe/lp_state_fs.c | 84 +++--- 1 file changed, 78 insertions(+), 6 deletions(-) diff --git a/src/gallium/

[Mesa-dev] [PATCH] llvmpipe: Fix rendering into PIPE_FORMAT_X8B8G8R8_UNORM.

2013-02-21 Thread jfonseca
From: José Fonseca Weird format, which Mesa state tracker recently started using. Fixes segfault in ./bin/texture-packed-formats -auto because swizzle[foo] was 0xff for padding channel (X). It still fails though. I believe the only reason this doesn't BGRX doesn't crash is that we have spec

[Mesa-dev] [PATCH] tgsi: Improve execution debugging.

2013-02-22 Thread jfonseca
From: José Fonseca - zero temps/outputs instead of copying (otherwise we won't be able to see the temps/outputs assignements for small shaders where nothing changes across big areas - also show the inputs (as it's often impossible to infer from the rest) --- src/gallium/auxiliary/tgsi/tgsi_

[Mesa-dev] [PATCH] util/dump: Use static assertion to detect string table size mismatches.

2013-02-23 Thread jfonseca
From: José Fonseca Suggested by Brian Paul. Could probably be extended to other enums. --- src/gallium/auxiliary/util/u_dump_defines.c | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/util/u_dump_defines.c b/src/gallium/auxiliary/u

[Mesa-dev] [PATCH] util/u_blitter: Set pipe_sampler_state::normalized_coords correctly.

2013-02-23 Thread jfonseca
From: José Fonseca We might want to revisit the normalized_coords semantics, but this is the current expected behavior. Fixes fdo bug 61091. --- src/gallium/auxiliary/util/u_blitter.c | 26 ++ 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/src/gallium/a

[Mesa-dev] [PATCH 1/3] scons: Allows choosing VS 10 or 11.

2013-03-12 Thread jfonseca
From: José Fonseca --- common.py |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common.py b/common.py index 6ff9608..1d618e6 100644 --- a/common.py +++ b/common.py @@ -100,4 +100,4 @@ def AddOptions(opts): opts.Add(BoolOption('quiet', 'DEPRECATED: profile build',

[Mesa-dev] [PATCH 2/3] One definition of C99 inline/__func__ to rule them all.

2013-03-12 Thread jfonseca
From: José Fonseca We were in four already... --- include/c99_compat.h | 105 + src/egl/main/eglcompiler.h| 44 ++ src/gallium/include/pipe/p_compiler.h | 74 ++- src/mapi/mapi/u_compiler.h

[Mesa-dev] [PATCH 3/3] Fix build with VS 2011.

2013-03-12 Thread jfonseca
From: José Fonseca --- include/c99_compat.h | 42 ++ 1 file changed, 42 insertions(+) diff --git a/include/c99_compat.h b/include/c99_compat.h index 39f958f..3a9f502 100644 --- a/include/c99_compat.h +++ b/include/c99_compat.h @@ -30,6 +30,37 @@ /*

[Mesa-dev] [PATCH] scons: Define _ALLOW_KEYWORD_MACROS on MSVC builds.

2013-03-14 Thread jfonseca
From: José Fonseca scons/llvm.py defines inline globally to workaround issues with LLVM C binding headers, so the only way to is to avoid aggravating xkeycheck.h errors is to set _ALLOW_KEYWORD_MACROS. This fixes MSVC 2012 build with LLVM. --- include/c99_compat.h |8 +++- scons/gallium

[Mesa-dev] [PATCH] scons: Warn when using MSVS versions prior to 2012.

2013-03-15 Thread jfonseca
From: José Fonseca --- scons/gallium.py |2 ++ 1 file changed, 2 insertions(+) diff --git a/scons/gallium.py b/scons/gallium.py index 4d3de82..b28be5d 100755 --- a/scons/gallium.py +++ b/scons/gallium.py @@ -402,6 +402,8 @@ def generate(env): '/Oi', # enable intrinsic functio

[Mesa-dev] [PATCH 1/2] gallium: Eliminate TGSI_OPCODE_IFC.

2013-04-14 Thread jfonseca
From: José Fonseca Never used or implemented. --- src/gallium/auxiliary/gallivm/lp_bld_tgsi_info.c |1 - src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c |1 - src/gallium/auxiliary/tgsi/tgsi_info.c |2 +- src/gallium/auxiliary/tgsi/tgsi_opcode_tmp.h |1 - src/galli

[Mesa-dev] [PATCH 2/2] gallium: Desambiguate TGSI_OPCODE_IF.

2013-04-14 Thread jfonseca
From: José Fonseca TGSI_OPCODE_IF condition had two possible interpretations: - src.x != 0.0f - Mesa statetracker when PIPE_SHADER_CAP_INTEGERS was false either for vertex and fragment shaders - gallivm/llvmpipe - postprocess - vl state tracker - vega state tracker - most old dr

[Mesa-dev] [PATCH] gallivm: JIT symbol resolution with linux perf.

2013-04-17 Thread jfonseca
From: José Fonseca Details on docs/llvmpipe.html --- bin/perf-annotate-jit | 240 configure.ac |7 - docs/llvmpipe.html | 40 ++-- src/gallium/auxiliary/gallivm/lp_bld_debug.cpp

[Mesa-dev] [PATCH 1/3] gallivm: Drop pos arg from lp_build_tgsi_soa.

2013-04-18 Thread jfonseca
From: José Fonseca Never used. --- src/gallium/auxiliary/draw/draw_llvm.c |2 -- src/gallium/auxiliary/gallivm/lp_bld_tgsi.h |2 -- src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c |2 -- src/gallium/drivers/llvmpipe/lp_state_fs.c |4 ++-- 4 files changed, 2 inse

[Mesa-dev] [PATCH 2/3] llvmpipe: Remove the static interpolation.

2013-04-18 Thread jfonseca
From: José Fonseca No longer used. If we ever want the old behavior we can run a loop unroller pass. --- src/gallium/drivers/llvmpipe/lp_bld_interp.c | 92 ++-- src/gallium/drivers/llvmpipe/lp_bld_interp.h | 14 -- src/gallium/drivers/llvmpipe/lp_state_fs.c | 297 +---

[Mesa-dev] [PATCH 3/3] llvmpipe: Support half integer pixel center fs coord.

2013-04-18 Thread jfonseca
From: José Fonseca Tested with graw/fs-fragcoord 2/3, and piglit glsl-arb-fragment-coord-conventions. --- src/gallium/drivers/llvmpipe/lp_bld_interp.c | 25 +++-- src/gallium/drivers/llvmpipe/lp_bld_interp.h |3 +++ src/gallium/drivers/llvmpipe/lp_screen.c |2 +-

[Mesa-dev] [PATCH] llvmpipe: Take in consideration all current constant buffers when mapping.

2013-04-18 Thread jfonseca
From: José Fonseca --- src/gallium/drivers/llvmpipe/lp_texture.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/llvmpipe/lp_texture.c b/src/gallium/drivers/llvmpipe/lp_texture.c index 99bd6d3..0804619 100644 --- a/src/gallium/drivers/llvmp

[Mesa-dev] [PATCH 2/2] trace: Dump PIPE_QUERY_* enums.

2013-11-27 Thread jfonseca
From: José Fonseca --- src/gallium/auxiliary/util/u_dump.h | 3 ++ src/gallium/auxiliary/util/u_dump_defines.c | 33 src/gallium/drivers/trace/tr_context.c | 3 +- src/gallium/drivers/trace/tr_dump_defines.h | 58 + src/gallium/drivers/

[Mesa-dev] [PATCH 1/2] trace: Dump query results faithfully.

2013-11-27 Thread jfonseca
From: José Fonseca --- src/gallium/drivers/trace/tr_context.c| 82 +-- src/gallium/drivers/trace/tr_dump_state.c | 64 src/gallium/drivers/trace/tr_dump_state.h | 2 + 3 files changed, 133 insertions(+), 15 deletions(-) diff --git a/src/

[Mesa-dev] [PATCH 1/2] demos/pixeltest: Remove Line struct.

2014-01-08 Thread jfonseca
From: José Fonseca Not really used/necessary. --- src/demos/pixeltest.c | 113 +++--- 1 file changed, 52 insertions(+), 61 deletions(-) diff --git a/src/demos/pixeltest.c b/src/demos/pixeltest.c index e9b95b8..0898290 100644 --- a/src/demos/pixeltest.

[Mesa-dev] [PATCH 2/2] demos/pixeltest: Adapt the example for points too.

2014-01-08 Thread jfonseca
From: José Fonseca This example is very useful to understand the rasterization of lines. And with this change, points too. Adding a key / command-line option to switch modes is left for a future opportunity though. --- src/demos/pixeltest.c | 109

[Mesa-dev] [PATCH] llvmpipe: Honour pipe_rasterizer::point_quad_rasterization.

2014-01-08 Thread jfonseca
From: José Fonseca Commit eda21d2a3010d9fc5a68b55a843c5e44b2abf8dd fixed the rasterization of points for Direct3D but ended up breaking the rasterization of OpenGL non-sprite points, in particular conform's pntrast.c test. The only way to get both working is to properly honour pipe_rasterizer::p

[Mesa-dev] [PATCH 7/7] c11: Make TIME_UTC a conditional macro.

2014-01-09 Thread jfonseca
From: José Fonseca Some system headers already define it, so this prevents conflict. --- include/c11/threads.h | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/c11/threads.h b/include/c11/threads.h index 678774c..4a4079d 100644 --- a/include/c11/threads.h +++ b/i

[Mesa-dev] [PATCH 2/7] c11: Import threads.h emulation library.

2014-01-09 Thread jfonseca
From: José Fonseca Implementation is based of https://gist.github.com/2223710 with the following modifications: - inline implementatation - retain XP compatability - add temporary hack for static mutex initializers (as they are not part of the stack but still widely used internally). --- inclu

[Mesa-dev] [PATCH 5/7] egl: Use C11 thread abstractions.

2014-01-09 Thread jfonseca
From: José Fonseca --- src/egl/main/eglmutex.h | 26 +++--- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/src/egl/main/eglmutex.h b/src/egl/main/eglmutex.h index 1349e9e..2ec965c 100644 --- a/src/egl/main/eglmutex.h +++ b/src/egl/main/eglmutex.h @@ -31,46 +31

[Mesa-dev] [PATCH 4/7] mapi: Use C11 thread abstractions.

2014-01-09 Thread jfonseca
From: José Fonseca --- src/mapi/u_thread.h | 165 +--- 1 file changed, 13 insertions(+), 152 deletions(-) diff --git a/src/mapi/u_thread.h b/src/mapi/u_thread.h index 31999c4..75fbec6 100644 --- a/src/mapi/u_thread.h +++ b/src/mapi/u_thread.h @@ -

[Mesa-dev] [PATCH 1/7] os: Remove pipe_static_condvar.

2014-01-09 Thread jfonseca
From: José Fonseca Never used. --- src/gallium/auxiliary/os/os_thread.h | 12 1 file changed, 12 deletions(-) diff --git a/src/gallium/auxiliary/os/os_thread.h b/src/gallium/auxiliary/os/os_thread.h index 4528abb..d16f36d 100644 --- a/src/gallium/auxiliary/os/os_thread.h +++ b/src

[Mesa-dev] [PATCH 6/7] rbug: Update for PIPE_THREAD_ROUTINE returning 0.

2014-01-09 Thread jfonseca
From: José Fonseca --- src/gallium/drivers/rbug/rbug_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/rbug/rbug_core.c b/src/gallium/drivers/rbug/rbug_core.c index 7cc9f79..c5b26b8 100644 --- a/src/gallium/drivers/rbug/rbug_core.c +++ b/src/gallium/

[Mesa-dev] [PATCH 3/7] gallium: Use C11 threads.h.

2014-01-09 Thread jfonseca
From: José Fonseca Note that PIPE_ROUTINE now returns an int. --- src/gallium/auxiliary/os/os_thread.h | 262 +++--- src/gallium/drivers/llvmpipe/lp_rast.c| 2 +- src/gallium/drivers/rbug/rbug_core.c | 2 +- src/gallium/tests/unit/pipe_ba

[Mesa-dev] [PATCH 1/2] trace: Re-license trace.xsl under MIT license.

2014-01-17 Thread jfonseca
From: José Fonseca I was the sole author, as Tungsten Graphics employee, which was since then acquired by VMware Inc. --- src/gallium/drivers/trace/trace.xsl | 36 ++-- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/src/gallium/drivers/trace/trace

[Mesa-dev] [PATCH] mesa/st: Fix pipe_framebuffer_state::height for PIPE_TEXTURE_1D_ARRAY.

2014-04-03 Thread jfonseca
From: José Fonseca This prevents buffer overflow w/ llvmpipe when running piglit bin/gl-3.2-layered-rendering-clear-color-all-types 1d_array single_level -fbo -auto --- src/mesa/state_tracker/st_atom_framebuffer.c | 19 +-- 1 file changed, 17 insertions(+), 2 deletions(-) di

[Mesa-dev] [PATCH 3/3] scons: Add an analyze option.

2014-04-14 Thread jfonseca
From: José Fonseca For Clang static code analyzer, the scan-build script will produce more comprehensive output. Nevertheless you can invoke it as CC=clang CXX=clang++ scons analyze=1 For MSVC this is the best way to use its static code analysis. Simply invoke as scons analyze=1 --- com

[Mesa-dev] [PATCH 1/3] scons: Enable building through Clang Static Analyzer.

2014-04-14 Thread jfonseca
From: José Fonseca By accurately detecting gcc/clang through --version option instead of executable name. Clang Static Analyzer reports many issues, most false positives, but it found at least one real and subtle use-after-free issue in st_texture_get_sampler_view(): http://people.freedeskto

[Mesa-dev] [PATCH 2/3] util/u_debug: Add noreturn attribute to _debug_assert_fail().

2014-04-14 Thread jfonseca
From: José Fonseca As recommended by http://clang-analyzer.llvm.org/annotations.html#attr_noreturn --- src/gallium/auxiliary/util/u_debug.h | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/util/u_debug.h b/src/gallium/auxiliary/util/u_debug.h index

[Mesa-dev] [PATCH 3/3] util: Add __declspec(noreturn) to _debug_assert_fail().

2014-04-16 Thread jfonseca
From: José Fonseca Mostly for consistency; as MSVC's static source code analysis doesn't seem to rely on assertions, but instead on different kind of source annotations( http://msdn.microsoft.com/en-us/library/hh916383.aspx ). --- src/gallium/auxiliary/util/u_debug.h | 3 +++ 1 file changed, 3 i

[Mesa-dev] [PATCH 2/3] auxiliary/os,auxiliary/util: Fix the `‘noreturn’ function does return` warning.

2014-04-16 Thread jfonseca
From: José Fonseca Now that _debug_assert_fail() has the noreturn attribute, it is better that execution truly never returns. Not just for sake of silencing the warning, but because the code at the return IP address may be invalid or lead to inconsistent results. This removes support for the GA

[Mesa-dev] [PATCH 1/3] scons: Enable building through Clang Static Analyzer.

2014-04-16 Thread jfonseca
From: José Fonseca Same intent as commit a45a50a4828e1357e9555474bc127c5585b3a420, but this the C compiler is detected via C-preprocessor macros, similar to how autotools do it, as that seems to be the most reliable method. --- scons/gallium.py | 38 +++--- 1 file

[Mesa-dev] [PATCH 1/2] util/u_debug: Pass correct size to strncat.

2014-04-23 Thread jfonseca
From: José Fonseca Courtesy of Clang static analyzer. --- src/gallium/auxiliary/util/u_debug.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gallium/auxiliary/util/u_debug.c b/src/gallium/auxiliary/util/u_debug.c index fe51717..dc840e8 100644 --- a/src/gallium/

[Mesa-dev] [PATCH 2/2] mesa/st: Fix pipe_framebuffer_state::height for PIPE_TEXTURE_1D_ARRAY.

2014-04-23 Thread jfonseca
From: José Fonseca This prevents buffer overflow w/ llvmpipe when running piglit bin/gl-3.2-layered-rendering-clear-color-all-types 1d_array single_level -fbo -auto v2: Compute the framebuffer size as the minimum size, as pointed out by Brian; compacted code; ran piglit quick test list (wi

[Mesa-dev] [PATCH 1/2] st/xlib: Honour request of 3.1 contexts through core profile where available.

2014-04-24 Thread jfonseca
From: José Fonseca The GLX_ARB_create_context_profile spec says: "If version 3.1 is requested, the context returned may implement any of the following versions: * Version 3.1. The GL_ARB_compatibility extension may or may not be implemented, as determined by the implementa

[Mesa-dev] [PATCH 2/2] llvmpipe: Advertise GLSL 3.30.

2014-04-24 Thread jfonseca
From: José Fonseca According to Roland all TGSI support is there in theory. In practice there are a few piglit failures and crashes, as this hadn't been tested before. --- src/gallium/drivers/llvmpipe/lp_screen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/dr

[Mesa-dev] [PATCH] st/xlib: Do minimal version checking in glXCreateContextAttribsARB.

2014-04-24 Thread jfonseca
From: José Fonseca The current version checking is wrongly refusing to create 3.3 contexts; unsupported version are checked elsewhere; and the DRI path doesn't do this sort of checking neither. This enables piglit glsl 3.30 tests to run without skipping. --- src/gallium/state_trackers/glx/xlib/

[Mesa-dev] [PATCH 3/9] st/vega: Prevent signed/unsigned comparisons.

2014-05-02 Thread jfonseca
From: José Fonseca --- src/gallium/state_trackers/vega/vg_translate.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/gallium/state_trackers/vega/vg_translate.c b/src/gallium/state_trackers/vega/vg_translate.c index 7b3df27..4aad899 100644 --- a/src/gallium/st

[Mesa-dev] [PATCH 2/9] scons: Adjust the warnings for VS.

2014-05-02 Thread jfonseca
From: José Fonseca Silence insignificant warnings so significant warnings have a chance to stand out. The only abundant warning that's not silenced here is "C4018: signed/unsigned mismatch", as it could hide security issues, so it's better to actually fix the code. --- scons/gallium.py | 4 +++-

[Mesa-dev] [PATCH 1/9] util/u_debug_flush: Use util_snprintf.

2014-05-02 Thread jfonseca
From: José Fonseca --- src/gallium/auxiliary/util/u_debug_flush.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gallium/auxiliary/util/u_debug_flush.c b/src/gallium/auxiliary/util/u_debug_flush.c index 9cf70db..fdb248c 100644 --- a/src/gallium/auxiliary/util/u_deb

[Mesa-dev] [PATCH 5/9] scons: Don't restrict MSVC_VERSION values.

2014-05-02 Thread jfonseca
From: José Fonseca Saves the trouble of continuously needing to update. --- common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common.py b/common.py index d6e6215..1d2d586 100644 --- a/common.py +++ b/common.py @@ -101,4 +101,4 @@ def AddOptions(opts): opts.Add

[Mesa-dev] [PATCH 7/9] egl: Don't attempt to redefine stdint.h types with VS 2013.

2014-05-02 Thread jfonseca
From: José Fonseca Just include stdint.h. --- src/egl/main/eglcompiler.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/egl/main/eglcompiler.h b/src/egl/main/eglcompiler.h index 53dab54..5ea83d6 100644 --- a/src/egl/main/eglcompiler.h +++ b/src/egl/main/eglcompiler.h @

[Mesa-dev] [PATCH 6/9] scons: Don't use bundled C99 headers for VS 2013.

2014-05-02 Thread jfonseca
From: José Fonseca Use the ones provided by the compiler instead. NOTE: External trees should be updated to not include '#include/c99' directory directly, but rather rely on scons/gallium.py to do the right thing. --- SConstruct | 6 -- scons/gallium.py | 6 ++ 2 files changed, 6

[Mesa-dev] [PATCH 9/9] util: Don't attempt to redefine INFINITY/NAN on VS 2013.

2014-05-02 Thread jfonseca
From: José Fonseca There are now provided by VS. --- src/gallium/auxiliary/util/u_math.h | 5 + 1 file changed, 5 insertions(+) diff --git a/src/gallium/auxiliary/util/u_math.h b/src/gallium/auxiliary/util/u_math.h index a60e183..2ade64a 100644 --- a/src/gallium/auxiliary/util/u_math.h +++

[Mesa-dev] [PATCH 4/9] draw: Prevent signed/unsigned comparisons.

2014-05-02 Thread jfonseca
From: José Fonseca --- src/gallium/auxiliary/draw/draw_pt_so_emit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/draw/draw_pt_so_emit.c b/src/gallium/auxiliary/draw/draw_pt_so_emit.c index bd49d0a..91e67c0 100644 --- a/src/gallium/auxiliary/draw/draw

[Mesa-dev] [PATCH 8/9] mesa: VS 2013 does not provide strcasecmp.

2014-05-02 Thread jfonseca
From: José Fonseca A define is necessary, like for earlier VS versions. --- src/mesa/main/imports.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mesa/main/imports.h b/src/mesa/main/imports.h index 17a9bd0..af780b2 100644 --- a/src/mesa/main/imports.h +++ b/src/mesa/

[Mesa-dev] [PATCH 1/2] st/wgl: Honour request of 3.1 contexts through core profile where available.

2014-05-07 Thread jfonseca
From: José Fonseca Port 5f493eed69f6fb11239c04119d602f1c23a68cbd from GLX. --- src/gallium/state_trackers/wgl/stw_context.c | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/gallium/state_trackers/wgl/stw_context.c b/src/gallium/state_trackers/wgl/stw_co

[Mesa-dev] [PATCH 2/2] st/wgl: Advertise WGL_ARB_create_context(_profile).

2014-05-07 Thread jfonseca
From: José Fonseca We added wglCreateContextAttribsARB but not the extension strings. This allows creation of GL 3.x contents. --- src/gallium/state_trackers/wgl/stw_ext_extensionsstring.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gallium/state_trackers/wgl/stw_ext_extensionsstr

[Mesa-dev] [PATCH] ralloc: Omit detailed license information about talloc.

2014-05-09 Thread jfonseca
From: José Fonseca That information misleads source code auditing tools to think that ralloc itself is released under LGPL v3. Instead, simply state talloc is not licensed under a permissive license. --- src/glsl/ralloc.h | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git

[Mesa-dev] [PATCH 04/12] gallivm: Stop using module providers.

2014-05-13 Thread jfonseca
From: José Fonseca Nowadays LLVMModuleProviderRef is just an alias for LLVMModuleRef, so its use just causes unnecessary confusion. --- src/gallium/auxiliary/gallivm/lp_bld_init.c | 33 ++--- src/gallium/auxiliary/gallivm/lp_bld_init.h | 1 - 2 files changed, 7 insertion

[Mesa-dev] [PATCH 10/12] llvmpipe: Delete unneeded LLVM stuff earlier.

2014-05-13 Thread jfonseca
From: José Fonseca Same as Frank's change to draw module but for llvmpipe module. --- src/gallium/drivers/llvmpipe/lp_state_fs.c| 13 ++--- src/gallium/drivers/llvmpipe/lp_state_setup.c | 13 ++--- src/gallium/drivers/llvmpipe/lp_test_arit.c | 4 ++-- src/gallium/drivers/l

[Mesa-dev] [PATCH 11/12] gallivm: Remove gallivm_free_function.

2014-05-13 Thread jfonseca
From: José Fonseca Unused. Deprecated by gallivm_free_ir(). --- src/gallium/auxiliary/gallivm/lp_bld_init.c | 18 -- src/gallium/auxiliary/gallivm/lp_bld_init.h | 5 - 2 files changed, 23 deletions(-) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c b/src/gallium/

[Mesa-dev] [PATCH 08/12] gallivm: Separate freeing LLVM intermediate data from freeing final code.

2014-05-13 Thread jfonseca
From: Frank Henigman Split free_gallivm_state() into two steps. First step is gallivm_free_ir() which cleans up the LLVM scaffolding used to generate code while preserving the code itself. Second step is gallivm_free_code() to free the memory occupied by the code. v2: s/gallivm_teardown/galliv

[Mesa-dev] [PATCH 06/12] gallivm: Run passes per module, not per function.

2014-05-13 Thread jfonseca
From: José Fonseca This is how it is meant to be done nowadays. --- src/gallium/auxiliary/gallivm/lp_bld_init.c | 47 - 1 file changed, 19 insertions(+), 28 deletions(-) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c b/src/gallium/auxiliary/gallivm/lp_bld_

[Mesa-dev] [PATCH 12/12] gallivm: Remove lp_func_delete_body.

2014-05-13 Thread jfonseca
From: José Fonseca Not necessary, now that we will free the whole module (hence all function bodies) immediately after compiling. --- src/gallium/auxiliary/gallivm/lp_bld_init.c | 3 --- src/gallium/auxiliary/gallivm/lp_bld_misc.cpp | 8 src/gallium/auxiliary/gallivm/lp_bld_misc.h |

[Mesa-dev] [PATCH 07/12] gallivm: One code memory pool with deferred free.

2014-05-13 Thread jfonseca
From: Frank Henigman Provide a JITMemoryManager derivative which puts all generated code into one memory pool instead of creating a new one each time code is generated. This saves significant memory per shader as the pool size is 512K and a small shader occupies just several K. This memory manag

[Mesa-dev] [PATCH 02/12] configure: Require LLVM 3.1.

2014-05-13 Thread jfonseca
From: José Fonseca --- configure.ac | 6 ++ 1 file changed, 6 insertions(+) diff --git a/configure.ac b/configure.ac index 99a761a..b4a1606 100644 --- a/configure.ac +++ b/configure.ac @@ -1624,6 +1624,12 @@ if test "x$enable_gallium_llvm" = xyes; then LLVM_VERSION_INT=`echo $L

[Mesa-dev] [PATCH 03/12] gallivm, draw, llvmpipe: Remove support for versions of LLVM prior to 3.1.

2014-05-13 Thread jfonseca
From: José Fonseca Older versions haven't been tested probably don't work anyway. But more importantly, code supporting it is hindering further work. --- src/gallium/auxiliary/draw/draw_llvm.c| 48 -- src/gallium/auxiliary/gallivm/lp_bld.h| 3 + src/gallium/auxili

[Mesa-dev] [PATCH 01/12] scons: Require LLVM 3.1

2014-05-13 Thread jfonseca
From: José Fonseca Support for prior versions will be removed in the following change. --- scons/llvm.py | 57 + 1 file changed, 13 insertions(+), 44 deletions(-) diff --git a/scons/llvm.py b/scons/llvm.py index 134a072..cdfbe43 100644 ---

[Mesa-dev] [PATCH 09/12] draw: Delete unneeded LLVM stuff earlier.

2014-05-13 Thread jfonseca
From: Frank Henigman Free up unneeded LLVM stuff immediately after generating vertex shader code. Saves about 500K per shader. v2: Don't bother calling gallivm_free_function (Jose) Signed-off-by: José Fonseca --- src/gallium/auxiliary/draw/draw_llvm.c | 19 --- 1 file changed

[Mesa-dev] [PATCH 05/12] gallivm: Use LLVM global context.

2014-05-13 Thread jfonseca
From: José Fonseca I saw that LLVM internally uses its global context for some things, even when we use our own. Given ours is also global, might as well use LLVM's. However, sepearate contexts can still be enabled with a simple source code modification, for when the need/benefit arises. --- s

[Mesa-dev] [PATCH 1/2] gallivm: Support MCJIT on Windows.

2014-05-14 Thread jfonseca
From: José Fonseca It works fine, though it requires using ELF objects. With this change there is nothing preventing us to switch exclusively to MCJIT, everywhere. It's still off though. --- scons/llvm.py | 8 +++- src/gallium/auxiliary/gallivm/lp_bld_misc.c

[Mesa-dev] [PATCH 2/2] gallivm: Disable workaround for PR12833 on LLVM 3.2+.

2014-05-14 Thread jfonseca
From: José Fonseca Fixed upstream. --- src/gallium/auxiliary/gallivm/lp_bld_misc.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp index 4d63f9a..ec54776 100644 --- a/src/gall

[Mesa-dev] [PATCH 1/2] scons: Fix x86_64 build.

2014-05-22 Thread jfonseca
From: José Fonseca x86/common_x86.c is required also for x86_64 builds. --- src/mesa/SConscript | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/SConscript b/src/mesa/SConscript index cd959be..f565786 100644 --- a/src/mesa/SConscript +++ b/src/mesa/SConscript @@ -392,6 +392,7 @@ if (

[Mesa-dev] [PATCH 2/2] mesa: Rely on USE_X86_64_ASM.

2014-05-22 Thread jfonseca
From: José Fonseca This fixes MinGW x64 builds. We don't use assembly on any of the Windows builds, to avoid divergence between MSVC and MinGW when testing. --- src/mesa/main/cpuinfo.c | 2 +- src/mesa/main/cpuinfo.h | 2 +- src/mesa/x86/common_x86.c | 6 +++--- 3 files changed, 5 insertion

[Mesa-dev] [PATCH] docs: Document how to replace Windows built-in OpenGL software rasterizer with llvmpipe.

2014-05-29 Thread jfonseca
From: José Fonseca Just happened to stumble across this registry key while debugging something else. This technique is much neater than trying to override opengl32.dll. Also a few minors cleanups. --- docs/llvmpipe.html | 52 1 file changed,

[Mesa-dev] [PATCH 2/2] mesa: Make glGetIntegerv(GL_*_ARRAY_SIZE) return GL_BGRA.

2014-06-01 Thread jfonseca
From: José Fonseca Same as b026b6bbfe3f15c8a7296ac107dc3d31f74e401e, but COLOR_ARRAY_SIZE/SECONDARY_COLOR_ARRAY_SIZE. Ideally we wouldn't munge the incoming state, so that we wouldn't need to unmunge it back on glGet*. But the array size state is copied and referred in many places, many of whic

[Mesa-dev] [PATCH 1/2] mesa/main: Make get_hash.c values constant.

2014-06-01 Thread jfonseca
From: José Fonseca --- src/mesa/main/get_hash_generator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/main/get_hash_generator.py b/src/mesa/main/get_hash_generator.py index 96bc495..b200d19 100644 --- a/src/mesa/main/get_hash_generator.py +++ b/src/mesa/main/ge

[Mesa-dev] [PATCH] wgl: Disable CRT message boxes when Windows system error messages boxes are disabled.

2014-06-03 Thread jfonseca
From: José Fonseca At least on MSVC we statically link against the CRT, so we must disable the CRT message boxes if we want to attended testing. The messages are convenient when running manually, so let them be if the system error message boxes are not disabled. --- src/gallium/auxiliary/util/u

[Mesa-dev] [PATCH 1/3] gallivm: Emit vector selects.

2013-04-20 Thread jfonseca
From: José Fonseca They are supported on LLVM 3.1, at least on x86. (I haven't tested on PPC though.) Actually lp_build_linear_mip_levels() already has been emitting them for some time. This avoids intrinsics, which tend to be an obstacle for certain optimization passes. --- src/gallium/auxili

[Mesa-dev] [PATCH 2/3] gallivm: Disable LLVM 2.7 workaround on other versions.

2013-04-20 Thread jfonseca
From: José Fonseca 2.7 was a particularly trouble ridden released. Furthermore, the bug no longer can be reproduced ever since the first_level state was taken in account. --- src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git

[Mesa-dev] [PATCH 3/3] llvmpipe: Ignore depth-stencil state if format has no depth/stencil.

2013-04-20 Thread jfonseca
From: José Fonseca Prevents assertion failures inside the driver for such state combinations. --- src/gallium/drivers/llvmpipe/lp_state_fs.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.c b/src/gallium/drivers/llv

[Mesa-dev] [PATCH] llvmpipe: Don't support Z32_FLOAT_S8X24_UINT texture sampling support either.

2013-04-20 Thread jfonseca
From: José Fonseca Because we don't support, and the u_format fallback doesn't work for zs formats. --- src/gallium/drivers/llvmpipe/lp_screen.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/gallium/drivers/llvmpipe/lp_screen.c b/src/gallium/drivers/llvmpi

[Mesa-dev] [PATCH 1/2] gallium: Add a new clip_halfz rasterizer state.

2013-04-20 Thread jfonseca
From: José Fonseca gl_rasterization_rules lumps too many different flags. --- src/gallium/auxiliary/draw/draw_context.c |1 + src/gallium/auxiliary/draw/draw_llvm.c |2 +- src/gallium/auxiliary/draw/draw_pt.h |2 +- .../auxiliary/draw/draw_pt_fetch_

[Mesa-dev] [PATCH 1/2] gallium: Add a new clip_halfz rasterizer state.

2013-04-20 Thread jfonseca
From: José Fonseca gl_rasterization_rules lumps too many different flags. --- src/gallium/auxiliary/draw/draw_context.c |1 + src/gallium/auxiliary/draw/draw_llvm.c |2 +- src/gallium/auxiliary/draw/draw_pt.h |2 +- .../auxiliary/draw/draw_pt_fetch_

[Mesa-dev] [PATCH] gallivm: Fix assignment of unsigned values to OUT register.

2013-04-22 Thread jfonseca
From: José Fonseca TEMP is not the only register file that accept unsigned. OUT too. Actually, what determines the appropriate type of the destination value is not the opcode, but rather the register. Also cleanup/simplify code. Add a few more asserts, but also make code more robust by handlin

[Mesa-dev] [PATCH] winsys/sw/xlib: Prevent shared memory segment leakage.

2013-04-24 Thread jfonseca
From: José Fonseca Running piglit with was causing all sort of weird stuff happening to my desktop (Chromium webpages become blank, Qt Creator flickered, etc). I tracked this down to shared memory segment leakage when GL is not shutdown properly. The segments can be seen running `ipcs` and looki

  1   2   3   >