[Mesa-dev] [PATCH] Support unlimited number of display connections

2016-02-29 Thread George Kyriazis
There is a limit of 10 display connections, which was a problem for apps/tests that were continuously opening/closing display connections. This fix uses XAddExtension() and XESetCloseDisplay() to keep track of the status of the display connections from the X server, freeing mesa-related data as X

[Mesa-dev] [PATCH v2] Support unlimited number of display connections

2016-03-01 Thread George Kyriazis
There is a limit of 10 display connections, which was a problem for apps/tests that were continuously opening/closing display connections. This fix uses XAddExtension() and XESetCloseDisplay() to keep track of the status of the display connections from the X server, freeing mesa-related data as X

[Mesa-dev] [PATCH] gallium/swr: Cleaned up some context-resource management

2016-03-14 Thread George Kyriazis
Removed bound_to_context. We now pick up the context from the screen instead of the resource itself. The resource could be out-of-date and point to a pipe that is already freed. Fixes manywin mesa xdemo. --- src/gallium/drivers/swr/swr_context.cpp | 16 +++-

[Mesa-dev] [PATCH] GLX: Don't destroy screen on XCloseDisplay()

2016-03-04 Thread George Kyriazis
screen may still be used by other resources that are not yet freed. To correctly fix this there will be a need to account for resources differently, but this quick fix is not any worse than the original code that leaked screens anyway. --- src/gallium/state_trackers/glx/xlib/xm_api.c | 10

[Mesa-dev] [PATCH v3 2/2] Hang off screen destructor off main XCloseDisplay() callback.

2016-03-02 Thread George Kyriazis
This resolves some order dependencies between the already existing callback the newly created one. --- src/gallium/state_trackers/glx/xlib/glx_api.c | 1 + src/gallium/state_trackers/glx/xlib/xm_api.c | 58 +++ src/gallium/state_trackers/glx/xlib/xm_api.h | 3 ++ 3

[Mesa-dev] [PATCH v3 1/2] Support unlimited number of display connections

2016-03-02 Thread George Kyriazis
There is a limit of 10 display connections, which was a problem for apps/tests that were continuously opening/closing display connections. This fix uses XAddExtension() and XESetCloseDisplay() to keep track of the status of the display connections from the X server, freeing mesa-related data as X

[Mesa-dev] [PATCH] gallium/swr: Make flat shading tris work.

2016-04-13 Thread George Kyriazis
- Incorporate flatshade flag into the shader generation - Use provoking vertex (vc) in shader when flat shading. --- src/gallium/drivers/swr/swr_shader.cpp | 4 src/gallium/drivers/swr/swr_shader.h | 1 + 2 files changed, 5 insertions(+) diff --git a/src/gallium/drivers/swr/swr_shader.cpp

[Mesa-dev] [PATCH] [swr] fix index buffers with non-zero indices

2017-01-31 Thread George Kyriazis
Fix issue with index buffers that do not contain 0 index. Use core BaseVertex functionality to offset index buffer indices, instead of offsetting vertex buffer to point before the buffer origin. --- src/gallium/drivers/swr/swr_draw.cpp | 2 +- src/gallium/drivers/swr/swr_state.cpp | 2 +- 2

[Mesa-dev] [PATCH] [swr] Align query results allocation

2017-01-20 Thread George Kyriazis
Some query results struct contents are declared as cache line aligned. Use aligned malloc, and align the whole struct, to be safe. Fixes crash when compiling with clang. CC: --- src/gallium/drivers/swr/swr_query.cpp | 7 ---

[Mesa-dev] [PATCH] [swr] Update fs texture & sampler state logic

2017-01-24 Thread George Kyriazis
In swr_update_derived() update texture and sampler state on a new fragment shader. GALLIUM_HUD can update fs using a previously bound texture and sampler. --- src/gallium/drivers/swr/swr_state.cpp | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git

[Mesa-dev] [PATCH v2 1/2] [util] add extern "C" guards

2017-02-15 Thread George Kyriazis
Added extern "C" __cplusplus guards on headers that did not have them. --- src/gallium/auxiliary/util/u_transfer.h | 8 src/gallium/auxiliary/util/u_upload_mgr.h | 7 +++ 2 files changed, 15 insertions(+) diff --git a/src/gallium/auxiliary/util/u_transfer.h

[Mesa-dev] [PATCH v2 2/2] [swr] remove unneeded extern "C"

2017-02-15 Thread George Kyriazis
the guards have been added to the header files that needed them. --- src/gallium/drivers/swr/swr_context.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/gallium/drivers/swr/swr_context.cpp b/src/gallium/drivers/swr/swr_context.cpp index 2e37bac..3e17edc 100644 ---

[Mesa-dev] [PATCH 2/2] [swr] fix index buffers with non-zero indices

2017-02-17 Thread George Kyriazis
Fix issue with index buffers that do not contain a 0 index. 0 index can be a non-valid index if the (copied) vertex buffers are a subset of the user's (which happens because we only copy the range between min & max). Core will use an index passed in from the driver to replace invalid indices.

[Mesa-dev] [PATCH 1/2] [swr] Add fetch shader cache

2017-02-17 Thread George Kyriazis
For now, the cache key is all of FETCH_COMPILE_STATE. Use new/delete for swr_vertex_element_state, since we have to call the constructors/destructors of the struct elements. --- src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.h | 2 +- src/gallium/drivers/swr/swr_draw.cpp |

[Mesa-dev] [PATCH] [swr] fix windows build

2017-02-15 Thread George Kyriazis
move util/u_upload_mgr.h inside extern "C" --- src/gallium/drivers/swr/swr_context.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/swr/swr_context.cpp b/src/gallium/drivers/swr/swr_context.cpp index 2e37bac..04ff146 100644 ---

[Mesa-dev] [PATCH 4/5] swr: [rasterizer core] Frontend dependency work

2016-10-26 Thread George Kyriazis
Add frontend dependency concept in the DRAW_CONTEXT, which allows serialization of frontend work if necessary. --- src/gallium/drivers/swr/rasterizer/core/api.cpp | 3 +++ src/gallium/drivers/swr/rasterizer/core/context.h | 3 ++- src/gallium/drivers/swr/rasterizer/core/threads.cpp | 14

[Mesa-dev] [PATCH 1/5] swr: [rasterizer archrast] Add thread tags to event files.

2016-10-26 Thread George Kyriazis
This allows the post-processor to easily detect the API thread and to process frame information. The frame information is needed to optimized how data is processed from worker threads. --- src/gallium/drivers/swr/rasterizer/archrast/events.proto | 8

[Mesa-dev] [PATCH 2/5] swr: [rasterizer core] Remove deprecated simd intrinsics

2016-10-26 Thread George Kyriazis
Used in abandoned all-or-nothing approach to converting to AVX512 --- .../drivers/swr/rasterizer/common/simdintrin.h | 633 - .../drivers/swr/rasterizer/core/format_types.h | 189 -- src/gallium/drivers/swr/rasterizer/core/knobs.h| 5 -

[Mesa-dev] [PATCH 3/5] swr: [rasterizer core] Refactor/cleanup backends

2016-10-26 Thread George Kyriazis
Used for common code reuse and simplification --- .../drivers/swr/rasterizer/core/backend.cpp| 561 - src/gallium/drivers/swr/rasterizer/core/backend.h | 150 +- 2 files changed, 351 insertions(+), 360 deletions(-) diff --git

[Mesa-dev] [PATCH 5/5] swr: [rasterizer] added EventHandlerFile contructor

2016-10-26 Thread George Kyriazis
--- .../rasterizer/scripts/templates/ar_eventhandlerfile_h.template| 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/swr/rasterizer/scripts/templates/ar_eventhandlerfile_h.template

[Mesa-dev] [PATCH 3/3] swr: Support windows builds

2016-11-07 Thread George Kyriazis
- Added SConscript files - better handling of NOMINMAX for inclusion - Reorder header files in swr_context.cpp to handle NOMINMAX better, since mesa header files include windows.h before we get a chance to #define NOMINMAX - cleaner support for .dll and .so prefix/suffix across OSes - added

[Mesa-dev] [PATCH 2/3] mesa: added msvc HAS_TRIVIAL_DESTRUCTOR implementation

2016-11-07 Thread George Kyriazis
not having it on windows causes a CANARY assertion in src/util/ralloc.c:get_header() Tested only on MSVC 19.00 (DevStudio 14.0), so #ifdef guards reflect that. --- src/util/macros.h | 5 + 1 file changed, 5 insertions(+) diff --git a/src/util/macros.h b/src/util/macros.h index

[Mesa-dev] [PATCH 1/3] gallium/scons: OpenSWR Windows support

2016-11-07 Thread George Kyriazis
- Added code to create screen and handle swaps in libgl_gdi.c - Added call to swr SConscript - included llvm 3.9 support for scons (windows swr only support 3.9 and later) - include -DHAVE_SWR to subdirs that need it To buils SWR on windows, use "scons swr libgl-gdi" --- scons/llvm.py

[Mesa-dev] [PATCH 0/3] swr: Support Windows builds

2016-11-07 Thread George Kyriazis
enable SWR by setting the GALLIUM_DRIVER variable to "swr". George Kyriazis (3): gallium/scons: OpenSWR Windows support mesa: added msvc HAS_TRIVIAL_DESTRUCTOR implementation swr: Support windows builds scons/llvm.py | 21 ++- sr

[Mesa-dev] [PATCH v2 2/8] scons: ignore .hpp files in parse_source_list()

2016-11-09 Thread George Kyriazis
Drivers that contain C++ .hpp files need to ignore them too, along with .h files, when building source file lists. --- scons/custom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scons/custom.py b/scons/custom.py index bdb4039..544b15d 100644 --- a/scons/custom.py +++

[Mesa-dev] [PATCH v2 5/8] gallium scons: Added swr driver to scons

2016-11-09 Thread George Kyriazis
Enable swr builds by "scons swr=1 libgl-gdi" (windows only) --- src/gallium/SConscript | 1 + src/gallium/drivers/swr/SConscript | 199 + 2 files changed, 200 insertions(+) create mode 100644 src/gallium/drivers/swr/SConscript diff --git

[Mesa-dev] [PATCH v2 7/8] swr: Added swr windows support

2016-11-09 Thread George Kyriazis
- moving some header files around for proper inclusion of windows.h - OS agnostic loading of arch-specific loadable modules - PUBLIC function declaration - better handling on NOMINMAX around windows.h inclusion. --- src/gallium/drivers/swr/rasterizer/common/os.h | 5 -

[Mesa-dev] [PATCH v2 3/8] scons: added llvm 3.9 support.

2016-11-09 Thread George Kyriazis
--- scons/llvm.py | 21 +++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/scons/llvm.py b/scons/llvm.py index 1fc8a3f..977e47a 100644 --- a/scons/llvm.py +++ b/scons/llvm.py @@ -106,7 +106,24 @@ def generate(env): ]) env.Prepend(LIBPATH =

[Mesa-dev] [PATCH v2 4/8] gallium: Added SWR support for gdi

2016-11-09 Thread George Kyriazis
Added hooks for screen creation and swap. Still keep llvmpipe the default software renderer. --- src/gallium/targets/libgl-gdi/libgl_gdi.c | 28 +++- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/src/gallium/targets/libgl-gdi/libgl_gdi.c

[Mesa-dev] [PATCH v2 0/8] Support windows builds for OpenSWR

2016-11-09 Thread George Kyriazis
(swrAVX.dll and swrAVX2.dll). The default software renderer is still llvmpipe, and, like on linux, you enable SWR by setting the GALLIUM_DRIVER variable to "swr". George Kyriazis (8): mesa: removed redundant #else scons: ignore .hpp files in parse_source_list() scons: added llvm 3

[Mesa-dev] [PATCH v2 1/8] mesa: removed redundant #else

2016-11-09 Thread George Kyriazis
--- src/util/macros.h | 1 - 1 file changed, 1 deletion(-) diff --git a/src/util/macros.h b/src/util/macros.h index 0563fa5..3730abe 100644 --- a/src/util/macros.h +++ b/src/util/macros.h @@ -178,7 +178,6 @@ do { \ # elif defined(_MSC_VER) && !defined(__INTEL_COMPILER)

[Mesa-dev] [PATCH v2 6/8] gallium: Enable swr driver

2016-11-09 Thread George Kyriazis
--- src/gallium/targets/libgl-gdi/SConscript | 6 ++ src/gallium/targets/libgl-xlib/SConscript | 6 ++ src/gallium/targets/osmesa/SConscript | 6 ++ 3 files changed, 18 insertions(+) diff --git a/src/gallium/targets/libgl-gdi/SConscript

[Mesa-dev] [PATCH v2 8/8] swr: Fix linux build

2016-11-09 Thread George Kyriazis
Added compiler flags for libmesaswr, since it now includes core header files. --- src/gallium/drivers/swr/Makefile.am | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/gallium/drivers/swr/Makefile.am b/src/gallium/drivers/swr/Makefile.am index dd1c2e6..843d3b5 ---

[Mesa-dev] [PATCH] docs: fix minor edits and reviewer suggestions

2016-11-23 Thread George Kyriazis
--- docs/submittingpatches.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/submittingpatches.html b/docs/submittingpatches.html index 2d18c74..be49a2e 100644 --- a/docs/submittingpatches.html +++ b/docs/submittingpatches.html @@ -41,7 +41,7 @@ components. git

[Mesa-dev] [PATCH] gdi: Add GALLIUM_TRACE and GALLIUM_RBUG to gdi

2016-11-23 Thread George Kyriazis
--- src/gallium/targets/libgl-gdi/SConscript | 1 + src/gallium/targets/libgl-gdi/libgl_gdi.c | 4 2 files changed, 5 insertions(+) diff --git a/src/gallium/targets/libgl-gdi/SConscript b/src/gallium/targets/libgl-gdi/SConscript index d3251ca..adb3581 100644 ---

[Mesa-dev] [PATCH v5 06/11] swr: renamed duplicate swr_create_screen()

2016-11-18 Thread George Kyriazis
There are 2 swr_create_screen() functions. One in swr_loader.cpp, which is used during driver init, and the other is hiding in swr_screen.cpp, which ends up in the arch-specific .dll/.so. Rename the second one to swr_create_screen_internal(), to avoid confusion in header files. ---

[Mesa-dev] [PATCH v5 05/11] swr: Handle windows.h and NOMINMAX

2016-11-18 Thread George Kyriazis
Reorder header files so that we have a chance to defined NOMINMAX before mesa include files include windows.h v3: split from bigger patch Reviewed-by: Emil Velikov --- src/gallium/drivers/swr/swr_context.cpp | 16

[Mesa-dev] [PATCH v5 00/11] Support windows builds for OpenSWR

2016-11-18 Thread George Kyriazis
software renderer is still llvmpipe, and, like on linux, you enable SWR by setting the GALLIUM_DRIVER variable to "swr". George Kyriazis (11): mesa: removed redundant #else scons: ignore .hpp files in parse_source_list() scons: add llvm 3.9 support. gallium: Added SWR support for

[Mesa-dev] [PATCH v5 04/11] gallium: Added SWR support for gdi

2016-11-18 Thread George Kyriazis
Added hooks for screen creation and swap. Still keep llvmpipe the default software renderer. v2: split from bigger patch v3: reword commit message Reviewed-by: Emil Velikov --- src/gallium/targets/libgl-gdi/libgl_gdi.c | 28 +++- 1 file

[Mesa-dev] [PATCH v5 10/11] gallium: swr: Added swr build for windows

2016-11-18 Thread George Kyriazis
v4: Add windows-specific gen_knobs.{cpp|h} changes v5: remove aggresive squashing of gen_knobs.py to this commit Reviewed-by: Emil Velikov --- src/gallium/SConscript | 1 + src/gallium/drivers/swr/SConscript | 216 +

[Mesa-dev] [PATCH v5 01/11] mesa: removed redundant #else

2016-11-18 Thread George Kyriazis
Reviewed-by: Emil Velikov --- src/util/macros.h | 1 - 1 file changed, 1 deletion(-) diff --git a/src/util/macros.h b/src/util/macros.h index 733bf42..6f55ac6 100644 --- a/src/util/macros.h +++ b/src/util/macros.h @@ -178,7 +178,6 @@ do { \ #

[Mesa-dev] [PATCH v5 11/11] gallium: Add support for SWR compilation

2016-11-18 Thread George Kyriazis
Include swr library and include -DHAVE_SWR in the compile line. v3: split to a separate commit Reviewed-by: Emil Velikov --- src/gallium/targets/libgl-gdi/SConscript | 4 src/gallium/targets/libgl-xlib/SConscript | 4 src/gallium/targets/osmesa/SConscript

[Mesa-dev] [PATCH v5 02/11] scons: ignore .hpp files in parse_source_list()

2016-11-18 Thread George Kyriazis
Drivers that contain C++ .hpp files need to ignore them too, along with .h files, when building source file lists. Reviewed-by: Emil Velikov --- scons/custom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scons/custom.py b/scons/custom.py

[Mesa-dev] [PATCH v5 03/11] scons: add llvm 3.9 support.

2016-11-18 Thread George Kyriazis
v2: reworded commit message Reviewed-by: Emil Velikov --- scons/llvm.py | 21 +++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/scons/llvm.py b/scons/llvm.py index 1fc8a3f..977e47a 100644 --- a/scons/llvm.py +++ b/scons/llvm.py @@

[Mesa-dev] [PATCH v5 07/11] swr: Windows-related changes

2016-11-18 Thread George Kyriazis
- Handle dynamic library loading for windows - Implement swap for gdi - fix prototypes - update include paths on configure-based build for swr_loader.cpp v2: split to multiple patches v3: split and reshuffle some more; renamed title v4: move Makefile.am changes to other commit. Modify header

[Mesa-dev] [PATCH v5 09/11] swr: Modify gen_knobs.{cpp|h} creation script

2016-11-18 Thread George Kyriazis
Modify gen_knobs.py so that each invocation creates a single generated file. This is more similar to how the other generators behave. v5: remove Scoscript edits from this commit; moved to commit that first adds SConscript Acked-by: Emil Velikov ---

[Mesa-dev] [PATCH v5 08/11] scons: Add swr compile option

2016-11-18 Thread George Kyriazis
To buils The SWR driver (currently optional, not compiled by default) v3: add option as opposed to target Reviewed-by: Emil Velikov --- common.py | 1 + 1 file changed, 1 insertion(+) diff --git a/common.py b/common.py index fb0884e..704ad2e 100644 --- a/common.py

[Mesa-dev] [PATCH v4 06/10] swr: renamed duplicate swr_create_screen()

2016-11-17 Thread George Kyriazis
There are 2 swr_create_screen() functions. One in swr_loader.cpp, which is used during driver init, and the other is hiding in swr_screen.cpp, which ends up in the arch-specific .dll/.so. Rename the second one to swr_create_screen_internal(), to avoid confusion in header files. ---

[Mesa-dev] [PATCH v4 04/10] gallium: Added SWR support for gdi

2016-11-17 Thread George Kyriazis
Added hooks for screen creation and swap. Still keep llvmpipe the default software renderer. --- src/gallium/targets/libgl-gdi/libgl_gdi.c | 28 +++- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/src/gallium/targets/libgl-gdi/libgl_gdi.c

[Mesa-dev] [PATCH v4 03/10] scons: add llvm 3.9 support.

2016-11-17 Thread George Kyriazis
--- scons/llvm.py | 21 +++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/scons/llvm.py b/scons/llvm.py index 1fc8a3f..977e47a 100644 --- a/scons/llvm.py +++ b/scons/llvm.py @@ -106,7 +106,24 @@ def generate(env): ]) env.Prepend(LIBPATH =

[Mesa-dev] [PATCH v4 10/10] gallium: Add support for SWR compilation

2016-11-17 Thread George Kyriazis
Include swr library and include -DHAVE_SWR in the compile line. --- src/gallium/targets/libgl-gdi/SConscript | 4 src/gallium/targets/libgl-xlib/SConscript | 4 src/gallium/targets/osmesa/SConscript | 4 3 files changed, 12 insertions(+) diff --git

[Mesa-dev] [PATCH v4 09/10] gallium: swr: Added swr build for windows

2016-11-17 Thread George Kyriazis
Also, modify gen_knobs.py so that each invocation creates a single generated file. This is more similar to how the other generators behave. --- src/gallium/SConscript | 1 + src/gallium/drivers/swr/Makefile.am| 15 +-

[Mesa-dev] [PATCH v4 00/10] Support windows builds for OpenSWR

2016-11-17 Thread George Kyriazis
software renderer is still llvmpipe, and, like on linux, you enable SWR by setting the GALLIUM_DRIVER variable to "swr". George Kyriazis (10): mesa: removed redundant #else scons: ignore .hpp files in parse_source_list() scons: add llvm 3.9 support. gallium: Added SWR support for

[Mesa-dev] [PATCH v4 07/10] swr: Windows-related changes

2016-11-17 Thread George Kyriazis
- Handle dynamic library loading for windows - Implement swap for gdi - fix prototypes - update include paths on configure-based build for swr_loader.cpp --- src/gallium/drivers/swr/swr_loader.cpp | 27 --- src/gallium/drivers/swr/swr_public.h | 9 + 2 files

[Mesa-dev] [PATCH v4 08/10] scons: Add swr compile option

2016-11-17 Thread George Kyriazis
To buils The SWR driver (currently optional, not compiled by default) --- common.py | 1 + 1 file changed, 1 insertion(+) diff --git a/common.py b/common.py index fb0884e..704ad2e 100644 --- a/common.py +++ b/common.py @@ -110,5 +110,6 @@ def AddOptions(opts):

[Mesa-dev] [PATCH v4 05/10] swr: Handle windows.h and NOMINMAX

2016-11-17 Thread George Kyriazis
Reorder header files so that we have a chance to defined NOMINMAX before mesa include files include windows.h --- src/gallium/drivers/swr/swr_context.cpp | 16 src/gallium/drivers/swr/swr_context.h | 2 ++ src/gallium/drivers/swr/swr_screen.cpp | 25 +++--

[Mesa-dev] [PATCH v4 02/10] scons: ignore .hpp files in parse_source_list()

2016-11-17 Thread George Kyriazis
Drivers that contain C++ .hpp files need to ignore them too, along with .h files, when building source file lists. --- scons/custom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scons/custom.py b/scons/custom.py index bdb4039..544b15d 100644 --- a/scons/custom.py +++

[Mesa-dev] [PATCH v4 01/10] mesa: removed redundant #else

2016-11-17 Thread George Kyriazis
--- src/util/macros.h | 1 - 1 file changed, 1 deletion(-) diff --git a/src/util/macros.h b/src/util/macros.h index 733bf42..6f55ac6 100644 --- a/src/util/macros.h +++ b/src/util/macros.h @@ -178,7 +178,6 @@ do { \ # elif defined(_MSC_VER) && !defined(__INTEL_COMPILER)

[Mesa-dev] [PATCH v3 02/10] scons: ignore .hpp files in parse_source_list()

2016-11-15 Thread George Kyriazis
Drivers that contain C++ .hpp files need to ignore them too, along with .h files, when building source file lists. --- scons/custom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scons/custom.py b/scons/custom.py index bdb4039..544b15d 100644 --- a/scons/custom.py +++

[Mesa-dev] [PATCH v3 10/10] swr: Modify gen_knobs.{cpp|h} creation script

2016-11-15 Thread George Kyriazis
Modify gen_knobs.py so that each invocation creates a single generated file. This is more similar to how the other generators behave. --- src/gallium/drivers/swr/Makefile.am| 14 +- src/gallium/drivers/swr/SConscript | 17 +---

[Mesa-dev] [PATCH v3 01/10] mesa: removed redundant #else

2016-11-15 Thread George Kyriazis
--- src/util/macros.h | 1 - 1 file changed, 1 deletion(-) diff --git a/src/util/macros.h b/src/util/macros.h index 0563fa5..3730abe 100644 --- a/src/util/macros.h +++ b/src/util/macros.h @@ -178,7 +178,6 @@ do { \ # elif defined(_MSC_VER) && !defined(__INTEL_COMPILER)

[Mesa-dev] [PATCH v3 03/10] scons: add llvm 3.9 support.

2016-11-15 Thread George Kyriazis
--- scons/llvm.py | 21 +++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/scons/llvm.py b/scons/llvm.py index 1fc8a3f..977e47a 100644 --- a/scons/llvm.py +++ b/scons/llvm.py @@ -106,7 +106,24 @@ def generate(env): ]) env.Prepend(LIBPATH =

[Mesa-dev] [PATCH v3 00/10] Support windows builds for OpenSWR

2016-11-15 Thread George Kyriazis
software renderer is still llvmpipe, and, like on linux, you enable SWR by setting the GALLIUM_DRIVER variable to "swr". George Kyriazis (10): mesa: removed redundant #else scons: ignore .hpp files in parse_source_list() scons: add llvm 3.9 support. gallium: Added SWR support for

[Mesa-dev] [PATCH v3 09/10] gallium: Add support for SWR compilation

2016-11-15 Thread George Kyriazis
Include swr library and include -DHAVE_SWR in the compile line. --- src/gallium/targets/libgl-gdi/SConscript | 4 src/gallium/targets/libgl-xlib/SConscript | 4 src/gallium/targets/osmesa/SConscript | 4 3 files changed, 12 insertions(+) diff --git

[Mesa-dev] [PATCH v3 06/10] swr: Windows-related changes

2016-11-15 Thread George Kyriazis
- Handle dynamic library loading for windows - Implement swap for gdi - fix prototypes - update include paths on configure-based build for swr_loader.cpp --- src/gallium/drivers/swr/Makefile.am| 7 +++ src/gallium/drivers/swr/swr_loader.cpp | 28 +---

[Mesa-dev] [PATCH v3 08/10] gallium: swr: Added swr build for windows

2016-11-15 Thread George Kyriazis
--- src/gallium/SConscript | 1 + src/gallium/drivers/swr/SConscript | 213 + 2 files changed, 214 insertions(+) create mode 100755 src/gallium/drivers/swr/SConscript diff --git a/src/gallium/SConscript b/src/gallium/SConscript index

[Mesa-dev] [PATCH v3 05/10] swr: Handle windows.h and NOMINMAX

2016-11-15 Thread George Kyriazis
Reorder header files so that we have a chance to defined NOMINMAX before mesa include files include windows.h --- src/gallium/drivers/swr/swr_context.cpp | 16 src/gallium/drivers/swr/swr_context.h | 2 ++ src/gallium/drivers/swr/swr_screen.cpp | 25 +++--

[Mesa-dev] [PATCH v3 07/10] scons: Add swr compile option

2016-11-15 Thread George Kyriazis
To buils The SWR driver (currently optional, not compiled by default) --- common.py | 1 + 1 file changed, 1 insertion(+) diff --git a/common.py b/common.py index fb0884e..704ad2e 100644 --- a/common.py +++ b/common.py @@ -110,5 +110,6 @@ def AddOptions(opts):

[Mesa-dev] [PATCH v3 04/10] gallium: Added SWR support for gdi

2016-11-15 Thread George Kyriazis
Added hooks for screen creation and swap. Still keep llvmpipe the default software renderer. --- src/gallium/targets/libgl-gdi/libgl_gdi.c | 28 +++- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/src/gallium/targets/libgl-gdi/libgl_gdi.c

[Mesa-dev] [PATCH] swr: Templetize std::max to work on windows

2016-11-29 Thread George Kyriazis
--- src/gallium/drivers/swr/swr_clear.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/swr/swr_clear.cpp b/src/gallium/drivers/swr/swr_clear.cpp index f59179f..e752ee0 100644 --- a/src/gallium/drivers/swr/swr_clear.cpp +++

[Mesa-dev] [PATCH] [swr] Always defer memory free in swr_resource_destroy

2017-01-11 Thread George Kyriazis
Defer delete on regular resources. This ensures that any work being done on the resource is completed before freeing up the resource's memory. --- src/gallium/drivers/swr/swr_screen.cpp | 17 + 1 file changed, 5 insertions(+), 12 deletions(-) diff --git

[Mesa-dev] [PATCH v2] swr: Fix type to match parameters of std::max()

2016-12-02 Thread George Kyriazis
Include propagation of comparisons further down. --- src/gallium/drivers/swr/swr_clear.cpp | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/gallium/drivers/swr/swr_clear.cpp b/src/gallium/drivers/swr/swr_clear.cpp index f59179f..08eead8 100644 ---

[Mesa-dev] [PATCH] swr: fix windows build break

2017-01-04 Thread George Kyriazis
Explicitly declare lp_native_vector_width inside an extern "C", since we cannot include the correct header file inside extern "C". --- src/gallium/drivers/swr/swr_screen.cpp | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git

[Mesa-dev] [PATCH v3] swr: fix windows build break

2017-01-04 Thread George Kyriazis
wrap lp_bld_type.h around extern "C". Windows decorates global variables, so when used from .cpp files, need to use an undecorated version. --- src/gallium/auxiliary/gallivm/lp_bld_type.h | 7 +++ src/gallium/drivers/swr/swr_screen.cpp | 4 2 files changed, 7 insertions(+), 4

[Mesa-dev] [PATCH v2] swr: fix windows build break

2017-01-04 Thread George Kyriazis
wrap lp_native_vector_width around extern "C" for C++. Windows decorates global variables, so when used from .cpp files, need to use an undecorated version. --- src/gallium/auxiliary/gallivm/lp_bld_type.h | 7 +++ src/gallium/drivers/swr/swr_screen.cpp | 4 2 files changed, 7

[Mesa-dev] [PATCH v3] swr: [rasterizer codegen] Fix windows build

2017-03-28 Thread George Kyriazis
Fix codegen build break that was introduced earlier v2: update rules for gen_knobs.cpp and gen_knobs.h v3: Introduce bldroot and revert generator file changes, making patch simpler. --- src/gallium/drivers/swr/SConscript | 38 +++--- 1 file changed, 31

[Mesa-dev] [PATCH v2 10/10] swr: [rasterizer codegen] Fix windows build

2017-03-27 Thread George Kyriazis
Fix codegen build break that was introduced earlier v2: update rules for gen_knobs.cpp and gen_knobs.h --- src/gallium/drivers/swr/Makefile.am| 4 +-- src/gallium/drivers/swr/SConscript | 15 ++- .../drivers/swr/rasterizer/codegen/gen_backends.py | 30

[Mesa-dev] [PATCH] swr: add linux to scons build

2017-04-13 Thread George Kyriazis
Make swr compile for both linux and windows. --- src/gallium/drivers/swr/SConscript| 7 +-- src/gallium/targets/libgl-xlib/SConscript | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/gallium/drivers/swr/SConscript b/src/gallium/drivers/swr/SConscript index

[Mesa-dev] [PATCH] swr: Add polygon stipple support

2017-04-13 Thread George Kyriazis
Add polygon stipple functionality to the fragment shader. Explicitly turn off polygon stipple for lines and points, since we do them using tris. --- src/gallium/drivers/swr/swr_context.h | 4 ++- src/gallium/drivers/swr/swr_shader.cpp | 56 ++

[Mesa-dev] [PATCH] swr: Fix swr osmesa build

2017-04-14 Thread George Kyriazis
--- src/gallium/targets/osmesa/SConscript | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/targets/osmesa/SConscript b/src/gallium/targets/osmesa/SConscript index 47937a2..7be1b48 100644 --- a/src/gallium/targets/osmesa/SConscript +++

[Mesa-dev] [PATCH] swr: fix transform feedback logic

2017-07-23 Thread George Kyriazis
The shader that is used to copy vertex data out of the vs/gs shaders to the user-specified buffer (streamout os SO shader) was not using the correct offsets. Adjust the offsets that are used just for the SO shader: - Make sure that position is handled in the same special way as in the vs/gs

[Mesa-dev] [PATCH v2] swr: fix transform feedback logic

2017-07-26 Thread George Kyriazis
The shader that is used to copy vertex data out of the vs/gs shaders to the user-specified buffer (streamout or SO shader) was not using the correct offsets. Adjust the offsets that are used just for the SO shader: - Make sure that position is handled in the same special way as in the vs/gs

[Mesa-dev] [PATCH 2/2] swr: Fix polygonmode for front==back

2017-04-25 Thread George Kyriazis
Add logic for converting enums and also making sure stipple works. CC: --- src/gallium/drivers/swr/swr_state.cpp | 14 +- src/gallium/drivers/swr/swr_state.h | 20 2 files changed, 33 insertions(+), 1 deletion(-) diff --git

[Mesa-dev] [PATCH 1/2] swr: [rasterizer core] support polygonmode point

2017-04-25 Thread George Kyriazis
add support in the binner: Split BinPoints into BinPostSetupPoints, so we can use it from BinTriangles, since setup is already done. CC: --- src/gallium/drivers/swr/rasterizer/core/binner.cpp | 175 ++--- 1 file changed, 117 insertions(+), 58

[Mesa-dev] [PATCH v2 1/2] swr: [rasterizer core] support polygonmode point

2017-04-26 Thread George Kyriazis
add support in the binner: Split BinPoints into BinPostSetupPoints, so we can use it from BinTriangles, since setup is already done. v2: remove cc stable --- src/gallium/drivers/swr/rasterizer/core/binner.cpp | 175 ++--- 1 file changed, 117 insertions(+), 58 deletions(-) diff

[Mesa-dev] [PATCH v2 2/2] swr: Fix polygonmode for front==back

2017-04-26 Thread George Kyriazis
Add logic for converting enums and also making sure stipple works. v2: remove cc stable, and remove "not implemented" assert --- src/gallium/drivers/swr/swr_state.cpp | 8 +++- src/gallium/drivers/swr/swr_state.h | 20 2 files changed, 27 insertions(+), 1 deletion(-)

[Mesa-dev] [PATCH] swr: invalidate attachment on transition change

2017-06-20 Thread George Kyriazis
Consider the following RT attachment order: 1. Attach surfaces attachments 0 & 1, and render with them 2. Detach 0 & 1 3. Re-attach 0 & 1 to different surfaces 4. Render with the new attachment The definition of a tile being resolved is that local changes have been flushed out to the surface,

[Mesa-dev] [PATCH] swr/rast: Include definition of missing function

2017-06-20 Thread George Kyriazis
Inline function SWR_MULTISAMPLE_POS::PrecalcSampleData() was missing definition. Include definition in core/state_funcs.h. Fixes windows build. --- src/gallium/drivers/swr/swr_state.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/drivers/swr/swr_state.cpp

[Mesa-dev] [PATCH v3 1/2] swr/rast: support polygonmode point

2017-05-04 Thread George Kyriazis
Add support for polygonmode point in the binner. This is done by splitting BinPostSetupPoints from BinPoints, so the earlier call can be called from BinTriangles. Setup has already been done at the time BinPostSetupPoints needs to be called. This checkin just adds support in the rasterizer. A

[Mesa-dev] [PATCH v3 2/2] swr: fix polygonmode for front==back

2017-05-04 Thread George Kyriazis
Rasterizer core only supports polygonmode front==back. Add logic for populating fillMode for the rasterizer only for that case correctly. Provide enum conversion between mesa enums and core enums. The core renders lines/points as tris. Previously, code would enable stipple for polygonmode !=

[Mesa-dev] [PATCH 1/2] swr: Handle resource across context changes

2017-09-25 Thread George Kyriazis
Swr caches fb contents in tiles. Those tiles are stored on a per-context basis. When switching contexts that share resources we need to make sure that the tiles of the old context are being stored and the tiles of the new context are being invalidated (marked as invalid, hence contents need to

[Mesa-dev] [PATCH 2/2] swr: Remove unneeeded comparison

2017-09-25 Thread George Kyriazis
No need to check if screen->pipe != pipe, so we can just assign it. Just do it. --- src/gallium/drivers/swr/swr_state.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/gallium/drivers/swr/swr_state.cpp b/src/gallium/drivers/swr/swr_state.cpp index 893bd6e..c6da4fc

[Mesa-dev] [PATCH] gallium/u_tests: fix ifdef for sync_file fences

2017-10-03 Thread George Kyriazis
include libsync.h only when libdrm is compiled in --- src/gallium/auxiliary/util/u_tests.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/util/u_tests.c b/src/gallium/auxiliary/util/u_tests.c index 2e931c0..3cc79af 100644 ---

[Mesa-dev] [PATCH] swr/scons: Fix intermittent build failure

2017-11-30 Thread George Kyriazis
gen_rasterizer*.cpp now depend on gen_ar_eventhandler.hpp. Account for new dependency. --- src/gallium/drivers/swr/SConscript | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/drivers/swr/SConscript b/src/gallium/drivers/swr/SConscript index e35eff7..9204ecb 100644 ---

[Mesa-dev] [PATCH] swr: Account for VBO index_bias in offsets

2017-12-15 Thread George Kyriazis
Account for info.index_bias when calculating buffers offsets. Fixes the follow piglit tests: arb_draw_elements_base_vertex-drawelements-user_varrays arb_draw_elements_base_vertex-negative-index-user_varrays --- src/gallium/drivers/swr/swr_state.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3

[Mesa-dev] [PATCH 1/2] util: Remove dependency on gallium header file

2017-11-16 Thread George Kyriazis
Do not depend on gallium/include/pipe/p_config.h for PIPE_OS_* defines. Use standard OS defines instead. --- src/util/os_time.c | 23 ++- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/src/util/os_time.c b/src/util/os_time.c index 72dc7e4..1c34bfd 100644 ---

[Mesa-dev] [PATCH 1/2] util: Remove dependency on gallium header file

2017-11-16 Thread George Kyriazis
Do not depend on gallium/include/pipe/p_config.h for PIPE_OS_* defines. Use standard OS defines instead. --- src/util/os_time.c | 23 ++- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/src/util/os_time.c b/src/util/os_time.c index 72dc7e4..1c34bfd 100644 ---

[Mesa-dev] [PATCH 2/2] util: fix compatibility of timespec_get() across OSes

2017-11-15 Thread George Kyriazis
while timespec_get() is supposed to hide OS differences, compatibility doesn't cover old OSes (like CentOS 6) where timespec_get() does not exist. Fall back to using os_get_time_nano(), but separate out the functionality that populates struct timespec, so it can also be called from

[Mesa-dev] [PATCH] swr/scons: Fix another intermittent build failure

2017-12-05 Thread George Kyriazis
gen_BackendPixelRate*.cpp depends on gen_ar_eventhandler.hpp. Fix missing dependency. --- src/gallium/drivers/swr/SConscript | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/drivers/swr/SConscript b/src/gallium/drivers/swr/SConscript index 9204ecb..eca4830 100644 ---

[Mesa-dev] [PATCH] swr: Rework scratch space allocation

2017-10-19 Thread George Kyriazis
Remove allocation of > 2kbyte buffers into context memory in swr_copy_to_scatch_space() (which is used to copy small vertex/index buffers and shader constants to a scratch space to be used by the upcoming draw.) Large shader constant allocations need to be done in the circular scratch buffer

  1   2   3   4   >