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

2013-04-24 Thread jfonseca
From: José Fonseca Running piglit with this 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

[Mesa-dev] [PATCH 1/3] scons: Remove redundant code.

2013-04-24 Thread jfonseca
From: José Fonseca -fvisibility=hidden is already elsewhere for the whole tree. --- src/gallium/drivers/svga/SConscript |3 --- 1 file changed, 3 deletions(-) diff --git a/src/gallium/drivers/svga/SConscript b/src/gallium/drivers/svga/SConscript index 8ffeed5..94c35ed 100644 --- a/src/gall

[Mesa-dev] [PATCH 2/3] util/u_sse: Fix _mm_shuffle_epi8 prototype for clang.

2013-04-24 Thread jfonseca
From: José Fonseca Clang does not support __artificial__. Instead match precisely what's in the clang headers. --- src/gallium/auxiliary/util/u_sse.h |7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/util/u_sse.h b/src/gallium/auxiliary/util/u_ss

[Mesa-dev] [PATCH 3/3] scons: Support clang.

2013-04-24 Thread jfonseca
From: José Fonseca clang is supports most gcc options / extensions, with a some exceptions. The biggest advantage of using clang is that compilation times are much short. One can tell scons to use clang when building by invoking it as CC=clang CXX=clang++ scons libgl-xlib --- scons/gallium

[Mesa-dev] [PATCH] scons: Don't force stabs debug format for Mingw.

2013-05-17 Thread jfonseca
From: José Fonseca - recent gdb handles DWARF fine (tested both with version 7.1.90.20100730 from mingw-w64 project, and 7.5-1 from mingw project) - http://people.freedesktop.org/~jrfonseca/bfdhelp/ was updated to handle DWARF - it requires ugly hacks to prevent compilation failures - it p

[Mesa-dev] [PATCH 1/2] gallivm: Add and use lp_build_lerp_3d.

2013-05-17 Thread jfonseca
From: José Fonseca --- src/gallium/auxiliary/gallivm/lp_bld_arit.c | 20 src/gallium/auxiliary/gallivm/lp_bld_arit.h | 15 ++ src/gallium/auxiliary/gallivm/lp_bld_sample_aos.c | 51 ++--- 3 files changed, 60 insertions(+), 26 deletions(-) diff --gi

[Mesa-dev] [PATCH 2/2] gallivm: Eliminate 8.8 fixed point intermediates from AoS sampling path.

2013-05-17 Thread jfonseca
From: José Fonseca This change was meant as a stepping stone to use PMADDUBSW SSSE3 instruction, but actually this refactoring by itself yields a 10% speedup on texture intensive shaders (e.g, Google Earth's ocean water w/o S3TC on a Ivy Bridge machine), while giving yielding exactly the same res

[Mesa-dev] [PATCH 1/6] trace: Don't dump texture transfers.

2013-06-21 Thread jfonseca
From: José Fonseca Huge trace files with little value. --- src/gallium/drivers/trace/tr_context.c | 4 ++-- src/gallium/drivers/trace/tr_dump.c| 23 --- src/gallium/drivers/trace/tr_dump.h| 2 +- 3 files changed, 19 insertions(+), 10 deletions(-) diff --git a/src/g

[Mesa-dev] [PATCH 3/6] tools/trace: Tool to dump gallium state at any draw call.

2013-06-21 Thread jfonseca
From: José Fonseca Based from the code from the good old python state tracker. Extremely handy to diagnose regressions in state trackers. --- src/gallium/tools/trace/dump_state.py | 633 ++ src/gallium/tools/trace/parse.py | 4 +- 2 files changed, 635 inse

[Mesa-dev] [PATCH 2/6] tools/trace: Defer blob hex-decoding.

2013-06-21 Thread jfonseca
From: José Fonseca To speed up parsing. --- src/gallium/tools/trace/model.py | 31 +-- src/gallium/tools/trace/parse.py | 5 ++--- 2 files changed, 27 insertions(+), 9 deletions(-) diff --git a/src/gallium/tools/trace/model.py b/src/gallium/tools/trace/model.py inde

[Mesa-dev] [PATCH 4/6] tools/trace: Tool to compare json state dumps.

2013-06-21 Thread jfonseca
From: José Fonseca Copied verbatim from apitrace's scripts/jsondiff.py --- src/gallium/tools/trace/diff_state.py | 324 ++ 1 file changed, 324 insertions(+) create mode 100755 src/gallium/tools/trace/diff_state.py diff --git a/src/gallium/tools/trace/diff_state.

[Mesa-dev] [PATCH 5/6] tools/trace: Do a better job at comparing multi line strings.

2013-06-21 Thread jfonseca
From: José Fonseca For TGSI diffing. --- src/gallium/tools/trace/diff_state.py | 35 ++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/src/gallium/tools/trace/diff_state.py b/src/gallium/tools/trace/diff_state.py index 470aeda..00853ba 100755 ---

[Mesa-dev] [PATCH 6/6] tools/trace: Quick instructions/notes.

2013-06-21 Thread jfonseca
From: José Fonseca --- src/gallium/tools/trace/README.txt | 39 ++ src/gallium/tools/trace/TODO.txt | 9 + 2 files changed, 48 insertions(+) create mode 100644 src/gallium/tools/trace/README.txt create mode 100644 src/gallium/tools/trace/TODO.txt

[Mesa-dev] [PATCH 1/2] util/debug: Make debug_backtrace_capture work for 64bit windows.

2013-06-24 Thread jfonseca
From: José Fonseca Rely on Windows' CaptureStackBackTrace to do the grunt work. --- src/gallium/auxiliary/util/u_debug_stack.c | 56 -- src/gallium/auxiliary/util/u_debug_stack.h | 7 2 files changed, 61 insertions(+), 2 deletions(-) diff --git a/src/gallium/au

[Mesa-dev] [PATCH 2/2] util/debug: Cleanup/improve debug_symbol_name_dbghelp.

2013-06-24 Thread jfonseca
From: José Fonseca - use mgwhelp -- the successor for bfdhelp which does not have a hard dependency on BFD, and works on 64bits. - use a macro instead of hand-typing to dispatch DbgHelp functions - dump line numbers - dump module names when symbols are not available - support 64bits. - add comm

[Mesa-dev] [PATCH] gallivm: Fix indirect immediate registers.

2013-07-01 Thread jfonseca
From: José Fonseca If reg->Register.Indirect then the immediate is not truly a constant expression. There is no performance regression -- LLVMBuildBitCast will fallback to LLVMConstBitCast internally when the argument is a constant. --- src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c | 4 ++--

[Mesa-dev] [PATCH] gallivm: Eliminate redundant lp_build_select calls.

2013-07-05 Thread jfonseca
From: José Fonseca lp_build_cmp already returns 0 / ~0, so the lp_build_select call is unnecessary. Trivial. --- src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c | 14 ++ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_actio

[Mesa-dev] [PATCH 1/3] c11: Fix nano to second conversion.

2014-03-03 Thread jfonseca
From: José Fonseca Per https://gist.github.com/yohhoy/2223710/#comment-710118 --- include/c11/threads_win32.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/c11/threads_win32.h b/include/c11/threads_win32.h index be1a389..771db94 100644 --- a/include/c11/threads_win3

[Mesa-dev] [PATCH 2/3] mapi/u_thread: Use GetCurrentThreadId

2014-03-03 Thread jfonseca
From: José Fonseca u_thread_self() expects thrd_current() to return a unique numeric ID for the current thread, but this is not feasible on Windows. --- src/mapi/u_thread.h | 18 ++ 1 file changed, 18 insertions(+) diff --git a/src/mapi/u_thread.h b/src/mapi/u_thread.h index ba5

[Mesa-dev] [PATCH 3/3] c11/threads: Don't implement thrd_current on Windows.

2014-03-03 Thread jfonseca
From: José Fonseca GetCurrentThread() returns a pseudo-handle (a constant which can only be used within the calling thread) and not a real handle. DuplicateHandle will return a real handle, but it will create a new handle every time we call. Calling DuplicateHandle here means we will leak handl

[Mesa-dev] [PATCH] st/mesa: Add R8G8B8A8_SRGB case to st_pipe_format_to_mesa_format.

2014-03-06 Thread jfonseca
From: José Fonseca With the recent SRGB changes all my automated OpenGL llvmpipe tests (piglit, conform, glretrace) start asserting with the backtrace below. I'm hoping this change will fix it. I'm not entirely sure, as this doesn't happen in my development machine (the bug probably depends on

[Mesa-dev] [PATCH 2/2] llvmpipe: Simplify vertex and geometry shaders.

2014-03-24 Thread jfonseca
From: José Fonseca Eliminate lp_vertex_shader, as it added nothing over draw_vertex_shader. Simplify lp_geometry_shader, as most of the incoming state is unneeded. (We could also just use draw_geometry_shader if we were willing to peek inside the structure.) --- src/gallium/drivers/llvmpipe/lp_

[Mesa-dev] [PATCH 1/2] draw: Duplicate TGSI tokens in draw_pipe_pstipple module.

2014-03-24 Thread jfonseca
From: José Fonseca As done in draw_pipe_aaline and draw_pipe_aapoint modules. --- src/gallium/auxiliary/draw/draw_pipe_pstipple.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/draw/draw_pipe_pstipple.c b/src/gallium/auxiliary/draw/draw_pipe_pstipple

[Mesa-dev] [PATCH] mapi/glapi: Use ElementTree instead of libxml2.

2014-03-25 Thread jfonseca
From: José Fonseca It is quite hard to meet the dependency of the libxml2 python bindings out side Linux, and in particularly on MacOSX; whereas ElementTree is part of Python's standard library. ElementTree is more limited than libxml2: no DTD verification, defaults from DTD, or XInclude support

[Mesa-dev] [PATCH] st/wgl: Remove wgl*Gallium*MESA().

2014-03-27 Thread jfonseca
From: José Fonseca These were only used by the Python state tracker, which was removed, hence they have no practical use. --- src/gallium/state_trackers/wgl/Makefile.sources| 1 - src/gallium/state_trackers/wgl/stw_ext_gallium.c | 50 -- src/gallium/state_trackers/wgl/

[Mesa-dev] [PATCH 1/3] gallivm, llvmpipe, clover: Bump required LLVM version to 3.3.

2014-10-22 Thread jfonseca
From: José Fonseca We'll need to update gallivm for the interface changes in LLVM 3.6, and the fewer the number of older LLVM versions we support the less hairy that will be. As consequence HAVE_AVX define can disappear. (Note HAVE_AVX means whether LLVM version is supported or not. Runtime su

[Mesa-dev] [PATCH 2/3] gallivm: Fix white-space.

2014-10-22 Thread jfonseca
From: José Fonseca Replace tabs with spaces. --- src/gallium/auxiliary/gallivm/lp_bld_misc.cpp | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp index ab3b3c9..a1d2940

[Mesa-dev] [PATCH 3/3] gallivm: Properly update for removal of JITMemoryManager in LLVM 3.6.

2014-10-22 Thread jfonseca
From: José Fonseca JITMemoryManager was removed in LLVM 3.6, and replaced by its base class RTDyldMemoryManager. This change fixes our JIT memory managers specializations to derive from RTDyldMemoryManager in LLVM 3.6 instead of JITMemoryManager. This enables llvmpipe to run with LLVM 3.6. How

[Mesa-dev] [PATCH 1/2] llvmpipe: Flush stdout on lp_test_* unit tests.

2014-10-24 Thread jfonseca
From: José Fonseca So that the order of test messages and gallivm/llvmpipe debug output is preserved. Trivial. --- src/gallium/drivers/llvmpipe/lp_test_arit.c | 1 + src/gallium/drivers/llvmpipe/lp_test_format.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/gallium/drivers/llvmpi

[Mesa-dev] [PATCH 2/2] llvmpipe: Ensure the packed input of the lp_test_format is aligned.

2014-10-24 Thread jfonseca
From: José Fonseca https://bugs.freedesktop.org/show_bug.cgi?id=85377 http://llvm.org/bugs/show_bug.cgi?id=21365 --- src/gallium/drivers/llvmpipe/lp_test_format.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/llvmpipe/lp_test_format.c b/sr

[Mesa-dev] [PATCH] util/format: Generate floating point constants for clamping.

2014-11-07 Thread jfonseca
From: José Fonseca This commit causes the generated C code to change as union util_format_r32g32b32a32_sscaled pixel; - pixel.chan.r = (int32_t)CLAMP(src[0], -2147483648, 2147483647); - pixel.chan.g = (int32_t)CLAMP(src[1], -2147483648, 2147483647); - pi

[Mesa-dev] [PATCH] llvmpipe: Avoid deadlock when unloading opengl32.dll

2014-11-07 Thread jfonseca
From: José Fonseca On Windows, DllMain calls and thread creation/destruction are serialized, so when llvmpipe is destroyed from DllMain waiting for the rasterizer threads to finish will deadlock. So, instead of waiting for rasterizer threads to have finished, simply wait for the rasterizer thre

[Mesa-dev] [PATCH] util/format: Fix clamping to 32bit integers.

2014-11-07 Thread jfonseca
From: José Fonseca Use clamping constants that guarantee no integer overflows. As spotted by Chris Forbes. This causes the code to change as: - value |= (uint32_t)CLAMP(src[0], 0.0f, 4294967295.0f); + value |= (uint32_t)CLAMP(src[0], 0.0f, 4294967040.0f); - value |= (u

[Mesa-dev] [PATCH 2/3] st/dri: Support EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR/GLX_CONTEXT_DEBUG_BIT_ARB on ES contexts.

2014-11-12 Thread jfonseca
From: José Fonseca The latest version of the specs explicitly allow it, and given that Mesa universally supports KHR_debug we should definitely support it. Totally untested. (Just happened to noticed this while implementing GLX_EXT_create_context_es2_profile for st/xlib.) --- src/gallium/state

[Mesa-dev] [PATCH 1/3] st/glx: Implement GLX_EXT_create_context_es2_profile.

2014-11-12 Thread jfonseca
From: José Fonseca apitrace now supports it, and it makes it much easier to test tracing/replaying on OpenGL ES contexts since GLX_EXT_create_context_{es2,es}_profile are widely available. --- src/gallium/state_trackers/glx/xlib/glx_api.c | 5 +- src/gallium/state_trackers/glx/xlib/xm_api.c |

[Mesa-dev] [PATCH 3/3] glx: Allow to create any OpenGL ES version.

2014-11-12 Thread jfonseca
From: José Fonseca The latest version of GLX_EXT_create_context_es2_profile states: "If the version requested is a valid and supported OpenGL-ES version, and the GLX_CONTEXT_ES_PROFILE_BIT_EXT bit is set in the GLX_CONTEXT_PROFILE_MASK_ARB attribute (see below), then the context returned

[Mesa-dev] [PATCH 1/2] st/xlib: Generate errors as specified.

2014-11-14 Thread jfonseca
From: José Fonseca Tested with piglit glx tests. --- src/gallium/state_trackers/glx/xlib/glx_api.c | 125 ++ 1 file changed, 109 insertions(+), 16 deletions(-) diff --git a/src/gallium/state_trackers/glx/xlib/glx_api.c b/src/gallium/state_trackers/glx/xlib/glx_api.c ind

[Mesa-dev] [PATCH 2/2] st/wgl: Implement WGL_EXT_create_context_es/es2_profile.

2014-11-14 Thread jfonseca
From: José Fonseca Derived from st/glx's GLX_EXT_create_context_es/es2_profile implementation. Tested with an OpenGL ES 2.0 ApiTrace. --- src/gallium/state_trackers/wgl/stw_context.c | 74 +- src/gallium/state_trackers/wgl/stw_ext_context.c | 65 +--

[Mesa-dev] [PATCH] mesa, st/glx, st/wgl: Move GL version validation into an helper.

2014-11-14 Thread jfonseca
From: José Fonseca As suggested by Brian Paul. Tested with piglit glx-create-context-invalid-{gl,es}-version. --- src/gallium/state_trackers/glx/xlib/glx_api.c| 13 +++--- src/gallium/state_trackers/wgl/stw_ext_context.c | 13 +++--- src/mesa/main/version.c

[Mesa-dev] [PATCH] rtasm,translate: Re-enable SSE on Mingw64.

2014-11-19 Thread jfonseca
From: José Fonseca This reverts f4dd0991719ef3e2606920c5100b372181c60899. The src/gallium/tests/unit/translate_test.c gives the same results on MinGW 64-bits as on Linux 64-bits. And since MinGW is often used for development/testing due to its convenience, it's better not to have this sort of d

[Mesa-dev] [PATCH 3/3] wgl: Ensure PIXELFORMATDESCRIPTOR members are zeroed.

2014-11-19 Thread jfonseca
From: José Fonseca I suddenly started seeing many simple GL apps, including wglinfo, choosing Microsoft GDI OpenGL implementation, even though hardware accelerated pixel formats were available. It turned out that: - the screen was in 16bpp mode (some WHCK tests have the nasty habit of doing th

[Mesa-dev] [PATCH 2/3] tests, trival, fp, vp: Rename errno with errnum.

2014-11-19 Thread jfonseca
From: José Fonseca Prevents warnings on MinGW due to conflicting linkage types for errno. --- src/fp/fp-tri.c | 8 src/tests/arbfpspec.c| 14 +++--- src/tests/arbfptest1.c | 8 src/tests/arbvptest1.c |

[Mesa-dev] [PATCH 1/3] cmake: Don't use gcc specific warnings with g++.

2014-11-19 Thread jfonseca
From: José Fonseca Avoids "warning: command line option ‘-W...’ is valid for Ada/C/ObjC but not for C++". --- CMakeLists.txt | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c3e217f..57a46f8 100644 --- a/CMakeLists.txt +++ b/CMakeLi

[Mesa-dev] [PATCH 1/9] scons: Remove dead code/comments.

2014-11-26 Thread jfonseca
From: José Fonseca - Remove no-op if-clause. - -mstackrealign has been enabled again on MinGW for quite some time and appears to work alright nowadays. - Drop -mmmx option as it is implied my -msse, and we don't use MMX intrinsics anyway. --- scons/gallium.py | 5 + 1 file changed, 1 i

[Mesa-dev] [PATCH 4/9] draw, gallivm, llvmpipe: Avoid implicit casts of 32-bit shifts to 64-bits.

2014-11-26 Thread jfonseca
From: José Fonseca Addresses MSVC warnings "result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)", which can often be symptom of bugs, but in these cases were all benign. --- src/gallium/auxiliary/draw/draw_llvm.c| 4 ++-- src/gallium/auxiliary/gallivm/lp_b

[Mesa-dev] [PATCH 7/9] mapi/glapi: Fix dll linkage of GLES1 symbols.

2014-11-26 Thread jfonseca
From: José Fonseca This fixes several MSVC warnings like: warning C4273: 'glClearColorx' : inconsistent dll linkage In fact, we should avoid using `declspec(dllexport)` altogether, and use exclusively the .DEF instead, which gives more precise control of which symbols must be exported, but al

[Mesa-dev] [PATCH 3/9] scons: Disable MSVC signed/unsigned mismatch warnings.

2014-11-26 Thread jfonseca
From: José Fonseca Unfortunately gcc completely ignores the issue, and as result code that mixes signed/unsigned is so widespread through the code base end up being little more than noise, potentially obscuring more pertinent warnings. This change disables them. --- scons/gallium.py | 1 + 1 fi

[Mesa-dev] [PATCH 2/9] scons: Generate SSE2 floating-point arithmetic.

2014-11-26 Thread jfonseca
From: José Fonseca - SSE2 is available on all x86 processors we care about. - It's recommended by Intel: https://software.intel.com/en-us/blogs/2012/09/26/gcc-x86-performance-hints - And has been the default since MSVC 2012: http://msdn.microsoft.com/en-us/library/7t5yh4fd(v=vs.110).aspx

[Mesa-dev] [PATCH 8/9] st/wgl: Don't export wglGetExtensionsStringARB.

2014-11-26 Thread jfonseca
From: José Fonseca It's not exported by the official opengl32.dll neither. Applications are supposed to get it via wglGetProcAddress(), not GetProcAddress(). --- src/gallium/state_trackers/wgl/opengl32.def | 1 - 1 file changed, 1 deletion(-) diff --git a/src/gallium/state_trackers/wgl/opengl3

[Mesa-dev] [PATCH 6/9] util/u_snprintf: Don't redefine HAVE_STDINT_H as 0.

2014-11-26 Thread jfonseca
From: José Fonseca We now always guarantee availability of stdint.h on MSVC -- if MSVC doesn't supply one we use our own. --- src/gallium/auxiliary/util/u_snprintf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/util/u_snprintf.c b/src/gallium/auxilia

[Mesa-dev] [PATCH 5/9] gallivm: Removed unused variable.

2014-11-26 Thread jfonseca
From: José Fonseca --- src/gallium/auxiliary/gallivm/lp_bld_tgsi_aos.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_aos.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_aos.c index 2ef5db1..738d5e9 100644 --- a/src/gallium/auxiliary/

[Mesa-dev] [PATCH 9/9] mesa/gdi: Don't pretend mesadef.py is auto generated.

2014-11-26 Thread jfonseca
From: José Fonseca Just use the same entrypoints we use for st/wgl's opengl32.dll. --- src/mesa/drivers/windows/gdi/mesa.def | 839 -- 1 file changed, 192 insertions(+), 647 deletions(-) diff --git a/src/mesa/drivers/windows/gdi/mesa.def b/src/mesa/drivers/windo

[Mesa-dev] [PATCH] gallivm: Fix lp_build_float_to_half.

2012-11-29 Thread jfonseca
From: José Fonseca The current implementation was close by not fully correct: several operations that should be done in floating point were being done in integer. Fixes piglit fbo-clear-formats GL_ARB_texture_float --- src/gallium/auxiliary/gallivm/lp_bld_conv.c | 103 +++--

[Mesa-dev] [PATCH 1/2] llvmpipe: Recompute the fs shader key when framebuffer varies.

2012-11-30 Thread jfonseca
From: José Fonseca The fs shader now depends on the color buffer formats. The shader key was extended to accommodate this, but llvmpipe_update_derived needs to be updated to check the framebuffer dirty flag. This fixes bug 57674. --- src/gallium/drivers/llvmpipe/lp_state_derived.c |1 + 1 f

[Mesa-dev] [PATCH 2/2] llvmpipe: Improve color buffer loads/stores alignment.

2012-11-30 Thread jfonseca
From: José Fonseca Tell LLVM the exact alignment we can guarantee, based on the fs block dimensions, pixel format, and the alignment of the resource base pointer and stride. --- src/gallium/drivers/llvmpipe/lp_state_fs.c | 31 +++- 1 file changed, 21 insertions(+), 10 d

[Mesa-dev] [PATCH] llvmpipe: Refactor convert_to/from_blend_type to convert in place.

2012-11-30 Thread jfonseca
From: José Fonseca This fixes the "Source and destination overlap in memcpy" valgrind warnings. --- src/gallium/drivers/llvmpipe/lp_state_fs.c | 20 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.c b/src/gallium/dri

[Mesa-dev] [PATCH] llvmpipe: Implement PIPE_QUERY_TIMESTAMP and PIPE_QUERY_TIME_ELAPSED.

2012-12-02 Thread jfonseca
From: James Benton This required an update for the query storage in llvmpipe, there can now be an active query per query type, so an occlusion query can run at the same time as a time elapsed query. Based on PIPE_QUERY_TIME_ELAPSED patch from Dave Airlie . --- src/gallium/auxiliary/os/os_time.c

[Mesa-dev] [PATCH] gallivm: Generalize lp_build_mul and lp_build_lerp for signed normalized types.

2012-12-04 Thread jfonseca
From: José Fonseca This fixes fdo bug 57755 and most of the failures of piglit fbo-blending-formats GL_EXT_texture_snorm. GL_INTENSITY_SNORM is still failing, but problem is probably elsewhere, as GL_R8_SNORM works fine. --- src/gallium/auxiliary/gallivm/lp_bld_arit.c | 174 +--

[Mesa-dev] [PATCH 1/9] tgsi: Increase maximum number of temps to 4096.

2012-12-04 Thread jfonseca
From: José Fonseca To match Shader Model 4 limits, as specified in http://msdn.microsoft.com/en-us/library/windows/desktop/ff471378.aspx --- src/gallium/auxiliary/tgsi/tgsi_exec.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.h b/src

[Mesa-dev] [PATCH 2/9] util/surface: Always use the surface format when clearing.

2012-12-04 Thread jfonseca
From: José Fonseca Not the texture format, as they might differ. --- src/gallium/auxiliary/util/u_surface.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/gallium/auxiliary/util/u_surface.c b/src/gallium/auxiliary/util/u_surface.c index e99431e..5b42af

[Mesa-dev] [PATCH 3/9] tgsi: Allow TXF from buffers.

2012-12-04 Thread jfonseca
From: José Fonseca There is more work necessary to properly support buffers in shaders, but this gets things a bit further along. --- src/gallium/auxiliary/tgsi/tgsi_exec.c |1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.c b/src/gallium/auxiliary/tgsi

[Mesa-dev] [PATCH 4/9] draw: Consider the geometry shader when choosing the vertex size.

2012-12-04 Thread jfonseca
From: José Fonseca A single vertex size is chosen for the whole pipeline. So the number of geometry shader outputs must also be taken in consideration. --- .../auxiliary/draw/draw_pt_fetch_shade_pipeline.c |9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/galli

[Mesa-dev] [PATCH 5/9] draw: Use symbolic primitive names in debug output.

2012-12-04 Thread jfonseca
From: José Fonseca --- src/gallium/auxiliary/draw/draw_gs.c |7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/gallium/auxiliary/draw/draw_gs.c b/src/gallium/auxiliary/draw/draw_gs.c index 60e3952..ceaed11 100644 --- a/src/gallium/auxiliary/draw/draw_gs.c +++ b/sr

[Mesa-dev] [PATCH 6/9] draw: Properly limit vertex buffer fetches on draw arrays.

2012-12-04 Thread jfonseca
From: José Fonseca We need to clamp vertex buffer fetch based on its size, not based on the user specified max index hint. This matches draw_pt_fetch_run() above. NOTE: This is a candidate for the stable branches. --- src/gallium/auxiliary/draw/draw_pt_fetch.c |2 +- 1 file changed, 1 inse

[Mesa-dev] [PATCH 7/9] util/u_draw: Skip rendering instead of aborting when excessive number of instances is found.

2012-12-04 Thread jfonseca
From: José Fonseca This is a temporary hack. I believe the only way of properly fixing this is to check buffer overflow just before fetching based on addresses, instead of number of vertices/instances. This change simply allows tests that stress buffer overflows to complete without asserting, and

[Mesa-dev] [PATCH 8/9] translate: Fix the fetch function assertions.

2012-12-04 Thread jfonseca
From: José Fonseca fetch_rgba_float is NULL for integer formats, and vice-versa. --- .../auxiliary/translate/translate_generic.c|4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/translate/translate_generic.c b/src/gallium/auxiliary/translate

[Mesa-dev] [PATCH 9/9] util/u_debug: Cleanup/fix debug_dump_image.

2012-12-04 Thread jfonseca
From: José Fonseca - Handle other formats. - Prevent CRLF on Windows. --- src/gallium/auxiliary/util/u_debug.c | 53 ++ src/gallium/auxiliary/util/u_debug.h |4 ++- 2 files changed, 25 insertions(+), 32 deletions(-) diff --git a/src/gallium/auxiliary/util/u

[Mesa-dev] [PATCH 1/4] gallium/os: Fix os_time_sleep() on Windows for small durations.

2012-12-06 Thread jfonseca
From: José Fonseca Prevents undetermined sleeps. --- src/gallium/auxiliary/os/os_time.c |6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/os/os_time.c b/src/gallium/auxiliary/os/os_time.c index 4055125..f943e0f 100644 --- a/src/gallium/auxiliary/o

[Mesa-dev] [PATCH 2/4] gallium/os: Cleanup up os_time_get/os_time_get_nano.

2012-12-06 Thread jfonseca
From: José Fonseca - Re-implement os_time_get in terms of os_time_get_nano() for consistency - Use CLOCK_MONOTONIC as recommended - Only use clock_gettime on Linux for now. --- scons/gallium.py |2 +- src/gallium/auxiliary/os/os_time.c | 28 s

[Mesa-dev] [PATCH 3/4] gallium/util: Move the util_copy/fill_rect into u_surface.

2012-12-06 Thread jfonseca
From: José Fonseca u_rect.h said these should move to a different file, and u_surface seems a better home. Leave #include "util/u_surface.h" to avoid having to touch thousand of files. --- src/gallium/auxiliary/Makefile.sources |1 - src/gallium/auxiliary/util/u_rect.c| 158 ---

[Mesa-dev] [PATCH 4/4] util: Add util_copy_box helper.

2012-12-06 Thread jfonseca
From: José Fonseca Must users of util_copy_rect() need or should deal with volumes. --- src/gallium/auxiliary/util/u_surface.c | 55 +++ src/gallium/auxiliary/util/u_surface.h | 10 ++ src/gallium/auxiliary/util/u_transfer.c | 28 3 files

[Mesa-dev] [PATCH 1/2] gallivm: Fix lp_build_print_value of small integers

2012-12-06 Thread jfonseca
From: José Fonseca They need to be converted to native integers to prevent garbagge in higher order bits from being printed. --- src/gallium/auxiliary/gallivm/lp_bld_printf.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_

[Mesa-dev] [PATCH 2/2] gallivm: Fix lerping of (un)signed normalized numbers.

2012-12-06 Thread jfonseca
From: José Fonseca Several issues acutally: - Fix a regression in unsigned normalized in the rescaling [0, 255] to [0, 256] - Ensure we use signed shifts where appropriate (instead of unsigned shifts) - Refactor the code slightly -- move all the logic inside lp_build_lerp_simple(). This

[Mesa-dev] [PATCH 1/4] gallivm, llvmpipe, draw: Support multiple constant buffers.

2012-12-06 Thread jfonseca
From: José Fonseca Support 4 (defined in LP_MAX_TGSI_CONST_BUFFERS) as opposed to 32 (as defined by PIPE_MAX_CONSTANT_BUFFERS) because that would make the jit context become unnecessarily large. --- src/gallium/auxiliary/draw/draw_llvm.c |5 +- src/gallium/auxiliary/draw/draw_llv

[Mesa-dev] [PATCH 2/4] gallivm: Allow indirection from TEMP registers too.

2012-12-06 Thread jfonseca
From: José Fonseca The ADDR file is cumbersome for native integer capable drivers. We should consider deprecating it eventually, but this just adds support for indirection from TEMP registers. --- src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c | 20 +--- 1 file changed, 17 in

[Mesa-dev] [PATCH 3/4] draw: Dump LLVM shader key.

2012-12-06 Thread jfonseca
From: José Fonseca Just like we do in llvmpipe for the fragment shader compilation key. --- src/gallium/auxiliary/draw/draw_llvm.c | 31 ++- src/gallium/auxiliary/draw/draw_llvm.h |3 +++ 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/src/gallium

[Mesa-dev] [PATCH 4/4] gallivm: Rudimentary native integer support.

2012-12-06 Thread jfonseca
From: José Fonseca Just enough for draw module to work ok. This improves "piglit attribs GL3", though something fishy is still happening with certain unsigned integer values. --- src/gallium/auxiliary/gallivm/lp_bld_format_aos.c |4 ++-- .../auxiliary/gallivm/lp_bld_format_aos_array.c|

[Mesa-dev] [PATCH] softpipe: Use os_time_get_nano() everywhere.

2012-12-08 Thread jfonseca
From: José Fonseca --- src/gallium/drivers/softpipe/sp_query.c |8 src/gallium/drivers/softpipe/sp_screen.c |2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/gallium/drivers/softpipe/sp_query.c b/src/gallium/drivers/softpipe/sp_query.c index c173736..2d

[Mesa-dev] [PATCH 1/4] softpipe: Use os_time_get_nano() everywhere.

2012-12-19 Thread jfonseca
From: José Fonseca --- src/gallium/drivers/softpipe/sp_query.c |8 src/gallium/drivers/softpipe/sp_screen.c |2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/gallium/drivers/softpipe/sp_query.c b/src/gallium/drivers/softpipe/sp_query.c index c173736..39

[Mesa-dev] [PATCH 2/4] gallium: s/PIPE_CAP_TIMER_QUERY/PIPE_CAP_QUERY_TIME_ELAPSED/

2012-12-19 Thread jfonseca
From: José Fonseca To better reflect what it iis being advertised. --- src/gallium/docs/source/screen.rst |2 +- src/gallium/drivers/galahad/glhd_context.c |2 +- src/gallium/drivers/i915/i915_screen.c |2 +- src/gallium/drivers/llvmpipe/lp_screen.c |2 +- s

[Mesa-dev] [PATCH 3/4] mesa/st: Implement GL_TIME_ELAPSED w/ PIPE_QUERY_TIMESTAMP.

2012-12-19 Thread jfonseca
From: José Fonseca ARB/EXT_timer_query's definition of GL_TIME_ELAPSED match precisely the subtraction of two GL_TIMESTAMP queries. And for a lot of drivers, that's precisely how they have to implement internally -- by emitting two hardware timestamp queries. So, to simplify driver implementati

[Mesa-dev] [PATCH 4/4] llvmpipe: Drop PIPE_QUERY_TIME_ELAPSED support.

2012-12-19 Thread jfonseca
From: José Fonseca It was slightly wrong: we were computing the longest duration of the query among all the rasterizer tasks. Regardless, for tile-based implementations such as llvmpipe, time differences will never be very useful, because rendering before/during/after the query is all interleave

[Mesa-dev] [PATCH] scons: Fix dependencies of generated headers.

2013-01-21 Thread jfonseca
From: José Fonseca It appears that scons implicit dependency scanners fail to chain dependencies of generated headers when these are outside the build tree. This patch ensures generated source files are _always_ put in the build tree. I'm not 100% this will fix all depency issues, but from my ex

[Mesa-dev] [PATCH] tests/occlude: Remove.

2013-01-22 Thread jfonseca
From: José Fonseca HP_occlusion_test is no longer supported by Mesa, and recent builds of GLEW on Mac don't include this extensions' defines/prototypes, causing build failure. Therefore it doesn't seem to be worth having this around any longer. --- src/demos/Makefile.cygnus |1 - src/tests/.

[Mesa-dev] [PATCH] nouveau/build: Fix build failures when drm is not in /usr/include.

2013-01-22 Thread jfonseca
From: José Fonseca Fixes failures to include libdrm/nouveau.h when drm is not installed in /usr/include. --- src/gallium/drivers/nv30/Makefile.am |3 ++- src/gallium/drivers/nv50/Makefile.am |3 ++- src/gallium/drivers/nvc0/Makefile.am |3 ++- 3 files changed, 6 insertions(+), 3 dele

[Mesa-dev] [PATCH] llvmpipe: Support Z16_UNORM as depth-stencil format.

2013-01-28 Thread jfonseca
From: José Fonseca Simply by adjusting the vector element width after/before reading/writing the depth-stencil values. Ran several GL_DEPTH_COMPONENT16 piglit tests without regressions. --- src/gallium/drivers/llvmpipe/lp_bld_depth.c | 46 --- src/gallium/drivers/llvmp

[Mesa-dev] [PATCH 1/2] llvmpipe: Fix deferred depth writes for Z16_UNORM.

2013-01-29 Thread jfonseca
From: José Fonseca This special path hadn't been exercised by my earlier testing, and mask values weren't being properly truncated to match the values. This change fixes that. --- src/gallium/drivers/llvmpipe/lp_bld_depth.c |7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --

[Mesa-dev] [PATCH 2/2] llvmpipe: Don't advertise S8_UNORM (with feeble attempt at supporting it).

2013-01-29 Thread jfonseca
From: José Fonseca S8_UNORM was inadvertedly supported together with Z16_UNORM. I tried to update the code to accomodate stencil-only -- it seemed a simple thing to do -- but "fbo-stencil clear GL_STENCIL_INDEX8" still fails, and it's not worth debugging. Therefore although this change tries to

[Mesa-dev] [PATCH] egl/dri: Don't invoke dri2_dpy->flush if it's NULL.

2013-02-05 Thread jfonseca
From: José Fonseca I'd like to test Mesa OpenGL ES along side with NVIDIA libGL drivers. But without this change, I get a NULL pointer dereference. --- src/egl/drivers/dri2/egl_dri2.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/e

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

2011-11-29 Thread jfonseca
From: José Fonseca 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 --- src/gallium/auxiliary/

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

2011-11-29 Thread jfonseca
From: José Fonseca Not actively used. --- common.py |2 +- scons/gallium.py| 128 + src/gallium/auxiliary/os/os_memory.h|4 - src/gallium/auxiliary/os/os_memory_win32k.h | 123

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

2011-12-08 Thread jfonseca
From: José Fonseca 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. --- src/mesa/state_tracker/st_manager.c | 64

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

2012-01-27 Thread jfonseca
From: José Fonseca 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 a/src/gallium/auxiliary/draw/draw_llvm.c b/src/g

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

2012-02-02 Thread jfonseca
From: José Fonseca 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 files changed, 6 inser

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

2012-02-02 Thread jfonseca
From: José Fonseca 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 +- src/gallium/auxiliary/draw/draw_pipe_aapoint.c |2

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

2011-10-14 Thread jfonseca
From: José Fonseca Issue spotted by Adam Jackson . 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 49e81ad..ae7b36b 100644 --- a/configure.ac +

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

2011-10-31 Thread jfonseca
From: José Fonseca 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 +++- src/gallium/drivers/llvmpipe/lp_state_setup.h |8

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

2011-10-31 Thread jfonseca
From: José Fonseca 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 +++- src/gallium/drivers/llvmpipe/lp_state_setup.h |8

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

2011-11-04 Thread jfonseca
From: José Fonseca 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 a/src/mesa/state_tracker/st_glsl_to_tg

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

2012-07-12 Thread jfonseca
From: José Fonseca - 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 PIPE_MAX_VERTEX_SAMPLERS is s

<    1   2   3   >