Re: [Mesa-dev] [PATCH] i965/vs: Move compute_clip_distance() out of emit_urb_writes().

2015-06-26 Thread Chris Forbes
Reviewed-by: Chris Forbes On Sat, Jun 27, 2015 at 11:31 AM, Kenneth Graunke wrote: > On Friday, June 26, 2015 04:17:39 PM Jason Ekstrand wrote: >> On Fri, Jun 26, 2015 at 3:56 PM, Kenneth Graunke >> wrote: >> > Legacy user clipping (using gl_Position or gl_ClipVertex) is handled by >> > turnin

[Mesa-dev] [PATCH] android: freedreno: add missing components to the build

2015-06-26 Thread Varad Gautam
Freedreno requires {a4xx,ir3}_SOURCES and NIR to build. Signed-off-by: Varad Gautam --- src/gallium/drivers/freedreno/Android.mk | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/freedreno/Android.mk b/src/gallium/drivers/freedreno/Android.mk index a671

[Mesa-dev] [PATCH 1/2] doxygen: Add doxygen_sqlite3.db to .gitignore

2015-06-26 Thread Rhys Kidd
Signed-off-by: Rhys Kidd --- doxygen/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/doxygen/.gitignore b/doxygen/.gitignore index abf56ac..a5f3921 100644 --- a/doxygen/.gitignore +++ b/doxygen/.gitignore @@ -1,3 +1,4 @@ +*.db *.tag *.tmp agpgart -- 2.1.4 _

[Mesa-dev] [PATCH 2/2] doxygen: Remove doxygen_sqlite3.db with 'make clean'

2015-06-26 Thread Rhys Kidd
Signed-off-by: Rhys Kidd --- doxygen/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/doxygen/Makefile b/doxygen/Makefile index 0a95a35..01c2691 100644 --- a/doxygen/Makefile +++ b/doxygen/Makefile @@ -33,3 +33,4 @@ subset: $(SUBSET:.doxy=.tag) clean: -rm -rf $(FULL:.doxy=) $

[Mesa-dev] [PATCH 0/2] doxygen: Properly handle doxygen_sqlite3.db output file

2015-06-26 Thread Rhys Kidd
A simple patch set for my first proposed Mesa contribution. Modern doxygen uses a SQLite intermediate output file when producing documentation from source code. Mesa's Makefile and .gitignore in doxygen/ could better handle this output file, which these two patches address. Rhys Kidd (2): doxyg

Re: [Mesa-dev] [PATCH] nir: Make C++ more happy with NIR_SRC_INIT and NIR_DEST_INIT

2015-06-26 Thread Francisco Jerez
Jason Ekstrand writes: > On Fri, Jun 26, 2015 at 3:34 PM, Francisco Jerez > wrote: >> Jason Ekstrand writes: >> >>> On Fri, Jun 26, 2015 at 3:03 PM, Francisco Jerez >>> wrote: Jason Ekstrand writes: > On Fri, Jun 26, 2015 at 12:08 PM, Francisco Jerez > wrote: >> Jaso

[Mesa-dev] [Bug 91123] [swrast] piglit egl-create-pbuffer-surface regression

2015-06-26 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=91123 Bug ID: 91123 Summary: [swrast] piglit egl-create-pbuffer-surface regression Product: Mesa Version: git Hardware: x86-64 (AMD64) OS: Linux (All) Status: NEW

Re: [Mesa-dev] [PATCH] i965: Write at least some data in SIMD8 URB write messages.

2015-06-26 Thread Kenneth Graunke
On Friday, June 26, 2015 04:15:46 PM Jordan Justen wrote: > On 2015-06-26 15:18:52, Kenneth Graunke wrote: > > According to the "URB SIMD8 Write > Write Data Payload" documentation, > > "The write data payload can be between 1 and 8 message phases long." > > Would a more precise PRM ref location b

Re: [Mesa-dev] [PATCH] nir: Make C++ more happy with NIR_SRC_INIT and NIR_DEST_INIT

2015-06-26 Thread Jason Ekstrand
On Fri, Jun 26, 2015 at 3:34 PM, Francisco Jerez wrote: > Jason Ekstrand writes: > >> On Fri, Jun 26, 2015 at 3:03 PM, Francisco Jerez >> wrote: >>> Jason Ekstrand writes: >>> On Fri, Jun 26, 2015 at 12:08 PM, Francisco Jerez wrote: > Jason Ekstrand writes: > >> In C,

[Mesa-dev] [PATCH 2/5] i965: Run vector splitting for CS in brw_link_shader

2015-06-26 Thread Jordan Justen
Signed-off-by: Jordan Justen --- src/mesa/drivers/dri/i965/brw_shader.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/drivers/dri/i965/brw_shader.cpp b/src/mesa/drivers/dri/i965/brw_shader.cpp index 5653d6b..309f495 100644 --- a/src/mesa/drivers/dri/i965/brw_shader.cpp +++ b/src

[Mesa-dev] [PATCH 3/5] i965/fs: Set first_non_payload_grf in assign_curb_setup

2015-06-26 Thread Jordan Justen
first_non_payload_grf may be updated in assign_urb_setup for FS or assign_vs_urb_setup for VS. Signed-off-by: Jordan Justen --- src/mesa/drivers/dri/i965/brw_fs.cpp | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drive

[Mesa-dev] [PATCH 5/5] i965/cs: Emit texture surfaces to enable CS sampling

2015-06-26 Thread Jordan Justen
Signed-off-by: Jordan Justen --- src/mesa/drivers/dri/i965/brw_context.h | 2 +- src/mesa/drivers/dri/i965/brw_state_upload.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h index 51a1447

[Mesa-dev] [PATCH 4/5] i965/cs: Support texture sampling for CS

2015-06-26 Thread Jordan Justen
Signed-off-by: Jordan Justen --- src/mesa/drivers/dri/i965/brw_cs.cpp | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_cs.cpp b/src/mesa/drivers/dri/i965/brw_cs.cpp index 63e3b8d..bf43def 100644 --- a/src/mesa/drivers/dri/i965/brw_

[Mesa-dev] [PATCH 0/5] i965/cs: Texture sampling support

2015-06-26 Thread Jordan Justen
With these environment overrides: MESA_GL_VERSION_OVERRIDE=4.3 MESA_GLSL_VERSION_OVERRIDE=430 MESA_EXTENSION_OVERRIDE=GL_ARB_compute_shader This series allows this piglit test to pass: tests/spec/arb_compute_shader/execution/basic-texelFetch.shader_test Note, these patches were applied on top

[Mesa-dev] [PATCH 1/5] i965: Support CS in update_stage_texture_surfaces

2015-06-26 Thread Jordan Justen
Signed-off-by: Jordan Justen --- src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c index 72aad96..0eb5361 100644 --- a/sr

Re: [Mesa-dev] [PATCH] i965/vs: Move compute_clip_distance() out of emit_urb_writes().

2015-06-26 Thread Kenneth Graunke
On Friday, June 26, 2015 04:17:39 PM Jason Ekstrand wrote: > On Fri, Jun 26, 2015 at 3:56 PM, Kenneth Graunke > wrote: > > Legacy user clipping (using gl_Position or gl_ClipVertex) is handled by > > turning those into the modern gl_ClipDistance equivalents. > > > > This is unnecessary in Core Pro

Re: [Mesa-dev] [PATCH] radeonsi: add support for viewport array (v3)

2015-06-26 Thread Marek Olšák
Reviewed-by: Marek Olšák Marek On Sat, Jun 27, 2015 at 1:15 AM, Dave Airlie wrote: > From: Dave Airlie > > This isn't pretty and I'd suggest it the pm4 interface builder > could be tweaked to do this more efficently, but I'd need > guidance on how that would look. > > This seems to pass the fe

Re: [Mesa-dev] [PATCH] i965/vs: Move compute_clip_distance() out of emit_urb_writes().

2015-06-26 Thread Jason Ekstrand
On Fri, Jun 26, 2015 at 3:56 PM, Kenneth Graunke wrote: > Legacy user clipping (using gl_Position or gl_ClipVertex) is handled by > turning those into the modern gl_ClipDistance equivalents. > > This is unnecessary in Core Profile: if user clipping is enabled, but > the shader doesn't write the co

Re: [Mesa-dev] [PATCH] i965: Write at least some data in SIMD8 URB write messages.

2015-06-26 Thread Jordan Justen
On 2015-06-26 15:18:52, Kenneth Graunke wrote: > According to the "URB SIMD8 Write > Write Data Payload" documentation, > "The write data payload can be between 1 and 8 message phases long." Would a more precise PRM ref location be possible? Reviewed-by: Jordan Justen > Apparently, the simulato

Re: [Mesa-dev] [PATCH] radeonsi: add support for viewport array (v2)

2015-06-26 Thread Dave Airlie
On 27 June 2015 at 09:03, Marek Olšák wrote: > If you write VIEWPORT_INDEX at location 0, it overwrites POSITION > which happens to be at location 0 too and that's why the test fails. > > The fix is not to call si_shader_io_get_unique_index (or its caller > get_param_index) for LAYER and VIEWPORT_

[Mesa-dev] [PATCH] radeonsi: add support for viewport array (v3)

2015-06-26 Thread Dave Airlie
From: Dave Airlie This isn't pretty and I'd suggest it the pm4 interface builder could be tweaked to do this more efficently, but I'd need guidance on how that would look. This seems to pass the few piglit tests I threw at it. v2: handle passing layer/viewport index to fragment shader. fix cras

Re: [Mesa-dev] [PATCH] radeonsi: add support for viewport array (v2)

2015-06-26 Thread Marek Olšák
If you write VIEWPORT_INDEX at location 0, it overwrites POSITION which happens to be at location 0 too and that's why the test fails. The fix is not to call si_shader_io_get_unique_index (or its caller get_param_index) for LAYER and VIEWPORT_INDEX. LAYER and VIEWPORT_INDEX should be ignored in s

[Mesa-dev] [PATCH] i965: Switch on shader stage in nir_setup_outputs().

2015-06-26 Thread Kenneth Graunke
Adding new shader stages to a switch statement is less confusing than an if-else-if ladder where all but the first case are fragment shader specific (but don't claim to be). Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 59 +- 1 file

[Mesa-dev] [PATCH] i965/vs: Move compute_clip_distance() out of emit_urb_writes().

2015-06-26 Thread Kenneth Graunke
Legacy user clipping (using gl_Position or gl_ClipVertex) is handled by turning those into the modern gl_ClipDistance equivalents. This is unnecessary in Core Profile: if user clipping is enabled, but the shader doesn't write the corresponding gl_ClipDistance entry, results are undefined. Hence,

Re: [Mesa-dev] [PATCH] i965/fs: Fix ir_txs in emit_texture_gen4_simd16().

2015-06-26 Thread Jordan Justen
Reviewed-by: Jordan Justen On 2015-06-22 11:18:55, Kenneth Graunke wrote: > We were not emitting the LOD, which led to message lengths of 1 instead > of 3. Setting has_lod makes us emit the LOD, but I had to make changes > to avoid emitting the non-existent coordinate as well. > > Bugzilla: htt

Re: [Mesa-dev] [PATCH] nir: Make C++ more happy with NIR_SRC_INIT and NIR_DEST_INIT

2015-06-26 Thread Francisco Jerez
Jason Ekstrand writes: > On Fri, Jun 26, 2015 at 3:03 PM, Francisco Jerez > wrote: >> Jason Ekstrand writes: >> >>> On Fri, Jun 26, 2015 at 12:08 PM, Francisco Jerez >>> wrote: Jason Ekstrand writes: > In C, if you partially initialize a structure, the rest of the struct gets

[Mesa-dev] [PATCH] i965: Write at least some data in SIMD8 URB write messages.

2015-06-26 Thread Kenneth Graunke
According to the "URB SIMD8 Write > Write Data Payload" documentation, "The write data payload can be between 1 and 8 message phases long." Apparently, the simulator considers it an error if you issue an URB SIMD8 message with only a header and no actual data to write. Signed-off-by: Kenneth Grau

Re: [Mesa-dev] [PATCH] nir: Make C++ more happy with NIR_SRC_INIT and NIR_DEST_INIT

2015-06-26 Thread Jason Ekstrand
On Fri, Jun 26, 2015 at 3:03 PM, Francisco Jerez wrote: > Jason Ekstrand writes: > >> On Fri, Jun 26, 2015 at 12:08 PM, Francisco Jerez >> wrote: >>> Jason Ekstrand writes: >>> In C, if you partially initialize a structure, the rest of the struct gets set to 0. C++, however, does no

Re: [Mesa-dev] [PATCH] nir: Make C++ more happy with NIR_SRC_INIT and NIR_DEST_INIT

2015-06-26 Thread Francisco Jerez
Jason Ekstrand writes: > On Fri, Jun 26, 2015 at 12:08 PM, Francisco Jerez > wrote: >> Jason Ekstrand writes: >> >>> In C, if you partially initialize a structure, the rest of the struct gets >>> set to 0. C++, however, does not have this rule so GCC throws warnings >>> whenver NIR_SRC_INIT o

Re: [Mesa-dev] [PATCH] Only change and restore viewport 0 in mesa meta mode

2015-06-26 Thread Mike Stroyan
There isn't any bugzilla entry for this yet. I just saw it in the source code so far rather than in a misbehaving program. Perhaps piglit could use a few tests for whether meta operations damage context attributes. On Fri, Jun 26, 2015 at 3:26 PM, Kenneth Graunke wrote: > On Friday, June 26, 20

Re: [Mesa-dev] [PATCH] nir: Make C++ more happy with NIR_SRC_INIT and NIR_DEST_INIT

2015-06-26 Thread Jason Ekstrand
On Fri, Jun 26, 2015 at 12:08 PM, Francisco Jerez wrote: > Jason Ekstrand writes: > >> In C, if you partially initialize a structure, the rest of the struct gets >> set to 0. C++, however, does not have this rule so GCC throws warnings >> whenver NIR_SRC_INIT or NIR_DEST_INIT is used in C++. > >

Re: [Mesa-dev] [PATCH 2/2] i965: Delete linked GLSL IR when using NIR.

2015-06-26 Thread Kenneth Graunke
On Thursday, June 25, 2015 02:29:13 PM Tapani Pälli wrote: > Huh I see this went in already, I've noticed a problem and thought to > share it. > > Currently program resource list (used by gl api shader queries) is > generated in linker, before backend LinkShader call. What this means is > that

Re: [Mesa-dev] [PATCH] Only change and restore viewport 0 in mesa meta mode

2015-06-26 Thread Kenneth Graunke
On Friday, June 26, 2015 03:15:46 PM Mike Stroyan wrote: > The meta code was setting a default depth range for all viewports > and 'restoring' all viewports to depth range values saved from viewport 0. > --- > src/mesa/drivers/common/meta.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(

[Mesa-dev] [PATCH] Only change and restore viewport 0 in mesa meta mode

2015-06-26 Thread Mike Stroyan
The meta code was setting a default depth range for all viewports and 'restoring' all viewports to depth range values saved from viewport 0. --- src/mesa/drivers/common/meta.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/

Re: [Mesa-dev] [PATCH] radeonsi: add support for viewport array (v2)

2015-06-26 Thread Dave Airlie
On 26 June 2015 at 07:43, Dave Airlie wrote: > On 26 June 2015 at 07:11, Marek Olšák wrote: >> Wait a moment, how did it fail with si_shader_io_get_unique_index? The >> function shouldn't be called for ES with the viewport index, because >> ES can't pass the output to GS. If it was called, ignori

Re: [Mesa-dev] [PATCH 1/5] gallium/docs: remove out-of-date document about D3D11 features

2015-06-26 Thread Brian Paul
Series LGTM. Reviewed-by: Brian Paul On 06/26/2015 12:22 PM, Marek Olšák wrote: From: Marek Olšák --- src/gallium/docs/d3d11ddi.txt | 462 -- 1 file changed, 462 deletions(-) delete mode 100644 src/gallium/docs/d3d11ddi.txt diff --git a/src/galli

Re: [Mesa-dev] [PATCH 2/5] i965/gen9: Plugin the code for selecting YF/YS tiling on skl+

2015-06-26 Thread Anuj Phogat
On Mon, Jun 22, 2015 at 5:23 PM, Anuj Phogat wrote: > On Mon, Jun 22, 2015 at 2:53 PM, Ben Widawsky wrote: >> On Wed, Jun 10, 2015 at 03:30:47PM -0700, Anuj Phogat wrote: >>> Buffers with Yf/Ys tiling end up using meta upload / download >>> paths or the blitter for cases where they used tiled_mem

Re: [Mesa-dev] [PATCH 02/14] meta: Fix transfer operations check in meta pbo path for readpixels

2015-06-26 Thread Anuj Phogat
On Fri, Jun 19, 2015 at 4:48 PM, Anuj Phogat wrote: > On Thu, Jun 18, 2015 at 5:26 AM, Iago Toral wrote: >> On Tue, 2015-06-16 at 11:15 -0700, Anuj Phogat wrote: >>> Without this patch, arb_color_buffer_float-readpixels test fails, when >>> forced to use meta pbo path. >>> >>> Signed-off-by: Anuj

[Mesa-dev] [PATCH v2 02/14] meta: Fix transfer operations check in meta pbo path for readpixels

2015-06-26 Thread Anuj Phogat
Currently used ctx->_ImageTransferState check is not sufficient because it doesn't include the read color clamping enabled with GL_CLAMP_READ_COLOR. So, use the helper function _mesa_get_readpixels_transfer_ops(). Also, transfer operations don't affect glGetTexImage(). So, do the check only for gl

Re: [Mesa-dev] [PATCH] mesa/macros: move ALIGN_NPOT to macros.h

2015-06-26 Thread Anuj Phogat
On Fri, Jun 26, 2015 at 11:39 AM, Nanley Chery wrote: > From: Nanley Chery > > Aligning with a non-power-of-two number is a general task that can be used in > various places. This commit is required for the next one. > > v2: add greater than 0 assertion (Anuj). > convert the macro to a static

Re: [Mesa-dev] [PATCH] gallium/os: add os_wait_until_zero

2015-06-26 Thread Jose Fonseca
As others pointed, volatile and atomic are slightly different things, but you have point: atomic operations should probably take volatile pointers as arguments. This is what C11 did http://en.cppreference.com/w/c/atomic/atomic_load so I do believe that it makes sense to update p_atomic help

Re: [Mesa-dev] [PATCH] nir: Make C++ more happy with NIR_SRC_INIT and NIR_DEST_INIT

2015-06-26 Thread Francisco Jerez
Jason Ekstrand writes: > In C, if you partially initialize a structure, the rest of the struct gets > set to 0. C++, however, does not have this rule so GCC throws warnings > whenver NIR_SRC_INIT or NIR_DEST_INIT is used in C++. I don't think that's right, in C++ initializers missing from an ag

[Mesa-dev] [Bug 91118] Skydrift (running in Wine) crashes on start

2015-06-26 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=91118 --- Comment #1 from Béla Gyebrószki --- The following patch by Ilia Mirkin also fixes the crash for me: diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index 79fa018..f7d8028 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/mai

[Mesa-dev] [PATCH] nv50/ir: propagate modifier to right arg when folding mad(const, const)

2015-06-26 Thread Ilia Mirkin
An immediate has to be the second arg of an ADD operation. However we were mistakenly propagating the modifier of the non-folded value to the folded immediate argument. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91117 Signed-off-by: Ilia Mirkin Cc: "10.5 10.6" --- src/gallium/driver

Re: [Mesa-dev] [PATCH v3 6/6] mesa/main: free locale at exit

2015-06-26 Thread Brian Paul
On 06/26/2015 12:06 PM, Erik Faye-Lund wrote: In order to save a small leak if mesa is continously loaded and unloaded, let's free the locale when the shared object is unloaded. Signed-off-by: Erik Faye-Lund Reviewed-by: Matt Turner --- src/mesa/main/context.c | 12 +++- src/util/st

Re: [Mesa-dev] [PATCH v2 16/19] i965/fs: Use the builder dispatch_width for computing register offsets

2015-06-26 Thread Francisco Jerez
Jason Ekstrand writes: > On Fri, Jun 26, 2015 at 8:52 AM, Francisco Jerez > wrote: >> Jason Ekstrand writes: >> >>> Reviewed-by: Topi Pohjolainen >>> --- >>> src/mesa/drivers/dri/i965/brw_fs.h | 2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>> >>> diff --git a/src/mesa/drivers/dri

[Mesa-dev] [Bug 91118] Skydrift (running in Wine) crashes on start

2015-06-26 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=91118 Bug ID: 91118 Summary: Skydrift (running in Wine) crashes on start Product: Mesa Version: 10.6 Hardware: Other URL: http://store.steampowered.com/app/91100/ OS:

[Mesa-dev] [PATCH] mesa/macros: move ALIGN_NPOT to macros.h

2015-06-26 Thread Nanley Chery
From: Nanley Chery Aligning with a non-power-of-two number is a general task that can be used in various places. This commit is required for the next one. v2: add greater than 0 assertion (Anuj). convert the macro to a static inline function. Signed-off-by: Nanley Chery --- src/mesa/drive

Re: [Mesa-dev] [PATCH v2 16/19] i965/fs: Use the builder dispatch_width for computing register offsets

2015-06-26 Thread Jason Ekstrand
On Fri, Jun 26, 2015 at 8:52 AM, Francisco Jerez wrote: > Jason Ekstrand writes: > >> Reviewed-by: Topi Pohjolainen >> --- >> src/mesa/drivers/dri/i965/brw_fs.h | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/src/mesa/drivers/dri/i965/brw_fs.h >> b/src/mesa/drivers/

[Mesa-dev] [PATCH] nir: Make C++ more happy with NIR_SRC_INIT and NIR_DEST_INIT

2015-06-26 Thread Jason Ekstrand
In C, if you partially initialize a structure, the rest of the struct gets set to 0. C++, however, does not have this rule so GCC throws warnings whenver NIR_SRC_INIT or NIR_DEST_INIT is used in C++. Since nir.h contains a static inline that uses NIR_SRC_INIT, every C++ file that includes nir.h c

[Mesa-dev] [PATCH 2/2] gallium/radeon: mark the gpu load thread stop trigger as volatile

2015-06-26 Thread Marek Olšák
From: Marek Olšák --- src/gallium/drivers/radeon/r600_pipe_common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/radeon/r600_pipe_common.h b/src/gallium/drivers/radeon/r600_pipe_common.h index c38155f..61d4f09 100644 --- a/src/gallium/drivers/radeon/r6

[Mesa-dev] [PATCH 1/2] winsys/radeon: use os_wait_until_zero in radeon_bo_set_tiling

2015-06-26 Thread Marek Olšák
From: Marek Olšák --- src/gallium/winsys/radeon/drm/radeon_drm_bo.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c index edce1fb..3b960c0 100644 --- a/src/gallium/winsys/radeon/

[Mesa-dev] [PATCH 3/5] gallium: use fence_finish instead of fence_signalled in state trackers

2015-06-26 Thread Marek Olšák
From: Marek Olšák --- src/gallium/state_trackers/clover/core/event.cpp | 2 +- src/gallium/state_trackers/nine/swapchain9.c | 2 +- src/gallium/state_trackers/vdpau/presentation.c | 2 +- src/gallium/state_trackers/xvmc/surface.c| 2 +- src/mesa/state_tracker/st_cb_syncobj.c

[Mesa-dev] [PATCH 5/5] gallium/os: add os_wait_until_zero (v2)

2015-06-26 Thread Marek Olšák
From: Marek Olšák This will be used by radeon and amdgpu winsyses. Copied from the amdgpu winsys. v2: use volatile and p_atomic_read --- src/gallium/auxiliary/os/os_time.c | 36 +++- src/gallium/auxiliary/os/os_time.h | 10 ++ 2 files changed, 45 insertio

[Mesa-dev] [PATCH 4/5] gallium: remove redundant pipe_context::fence_signalled

2015-06-26 Thread Marek Olšák
From: Marek Olšák fence_finish(timeout=0) does the same thing --- src/gallium/drivers/freedreno/freedreno_screen.c | 1 - src/gallium/drivers/i915/i915_screen.c | 10 -- src/gallium/drivers/ilo/ilo_screen.c | 8 src/gallium/drivers/llvmpipe/lp_screen.c

[Mesa-dev] [PATCH 1/5] gallium/docs: remove out-of-date document about D3D11 features

2015-06-26 Thread Marek Olšák
From: Marek Olšák --- src/gallium/docs/d3d11ddi.txt | 462 -- 1 file changed, 462 deletions(-) delete mode 100644 src/gallium/docs/d3d11ddi.txt diff --git a/src/gallium/docs/d3d11ddi.txt b/src/gallium/docs/d3d11ddi.txt deleted file mode 100644 index a703

[Mesa-dev] [PATCH 2/5] gallium: handle fence_finish timeout in various drivers

2015-06-26 Thread Marek Olšák
From: Marek Olšák I copied what fence_signalled does. --- src/gallium/drivers/freedreno/freedreno_fence.c | 3 +++ src/gallium/drivers/i915/i915_screen.c | 3 +++ src/gallium/drivers/llvmpipe/lp_screen.c| 3 +++ src/gallium/drivers/nouveau/nouveau_screen.c| 3 +++ src/galliu

Re: [Mesa-dev] [PATCH v3 11/18] mesa/macros: add power-of-two assertions for alignment macros

2015-06-26 Thread Nanley Chery
On Thu, Jun 25, 2015 at 4:16 PM, Anuj Phogat wrote: > On Thu, Jun 25, 2015 at 3:22 PM, Nanley Chery wrote: >> How about if I create a patch which puts the greater than 0 check into >> is_power_of_two()? >> >> (value > 0) && (value & (value - 1)) == 0); >> > Not a bad idea except that you'll need

[Mesa-dev] [PATCH v3 3/6] mesa/main: only call _mesa_destroy_shader_compiler once on exit

2015-06-26 Thread Erik Faye-Lund
There's no point in calling _mesa_destroy_shader_compiler multiple times on exit; the resources will only be released once anyway. So let's move the atexit-call into the part that is only called once. Signed-off-by: Erik Faye-Lund Reviewed-by: Matt Turner --- src/mesa/main/context.c | 7 ++

[Mesa-dev] [PATCH v3 2/6] dri: don't touch the shader compiler

2015-06-26 Thread Erik Faye-Lund
This function is for deleting per-screen resources, and the shader compiler resources are not of such nature. Besides, dri shouldn't need to even know about the presence of a shader compiler. These resources will already be released when mesa gets unloaded, and that should be sufficient. Signed-o

[Mesa-dev] [PATCH v3 6/6] mesa/main: free locale at exit

2015-06-26 Thread Erik Faye-Lund
In order to save a small leak if mesa is continously loaded and unloaded, let's free the locale when the shared object is unloaded. Signed-off-by: Erik Faye-Lund Reviewed-by: Matt Turner --- src/mesa/main/context.c | 12 +++- src/util/strtod.c | 8 src/util/strtod.h

[Mesa-dev] [PATCH v3 5/6] util: port _mesa_strto[df] to C

2015-06-26 Thread Erik Faye-Lund
_mesa_strtod and _mesa_strtof are only used from the GLSL compiler and the ARB_[vertex|fragment]_program code, meaning that the locale doesn't need to be initialized before the first OpenGL context gets initialized. So let's use explicit initialization from the one-time init code instead of depend

[Mesa-dev] [PATCH v3 4/6] glsl: No need to lock in _mesa_glsl_release_types

2015-06-26 Thread Erik Faye-Lund
This function only gets called while mesa is unloading, so there's no potential of racing or multiple calls at the same time. So let's just get rid of the locking. Signed-off-by: Erik Faye-Lund Reviewed-by: Matt Turner --- src/glsl/glsl_types.cpp | 8 1 file changed, 4 insertions(+), 4

[Mesa-dev] [PATCH v3 1/6] mesa/main: Get rid of outdated GDB-hack

2015-06-26 Thread Erik Faye-Lund
All of these enums are now in use around in the code, so there's no need to explicitly use them here any more. Signed-off-by: Erik Faye-Lund Reviewed-by: Matt Turner --- src/mesa/main/context.c | 27 --- 1 file changed, 27 deletions(-) diff --git a/src/mesa/main/context

[Mesa-dev] [PATCH v3 0/6] port _mesa_strto[df] to C

2015-06-26 Thread Erik Faye-Lund
Here's the third version of this series (previsou version was posted as [1]). A couple of typos in patch 4 was fixed, an incorrectly squashed hunk was removed from patch 5. And finally, patch 7 was skipped completely. [1]: <1435266326-13540-1-git-send-email-kusmab...@gmail.com> Erik Faye-Lund (6)

Re: [Mesa-dev] [PATCH] gallium/os: add os_wait_until_zero

2015-06-26 Thread Patrick Baggett
On Fri, Jun 26, 2015 at 11:40 AM, Marek Olšák wrote: > If p_atomic_read is fine, then this patch is fine too. So you're > telling that this should work: > > while (p_atomic_read(var)); > > I wouldn't be concerned about a memory barrier. This is only 1 int, so > it should make its way into the sha

Re: [Mesa-dev] [PATCH 1/2] clover: fix event handling of buffer operations

2015-06-26 Thread Francisco Jerez
Grigori Goronzy writes: > On 2015-06-09 22:52, Francisco Jerez wrote: >>> + >>> + if (blocking) >>> + hev().wait(); >>> + >> >> hard_event::wait() may fail, so this should probably be done before the >> ret_object() call to avoid leaks. > > Alright... C++ exceptions are a minefield. :) >

Re: [Mesa-dev] [PATCH] i965: Don't try to print the GLSL IR if it has been freed

2015-06-26 Thread Ben Widawsky
On Fri, Jun 26, 2015 at 05:54:15PM +0100, Neil Roberts wrote: > Since commit 104c8fc2c2aa5621261f8 the GLSL IR will be freed if NIR is > being used. This was causing it to segfault if INTEL_DEBUG=wm is set. > This patch just makes it avoid dumping the GLSL IR in that case. > --- > src/mesa/drivers

[Mesa-dev] [PATCH] i965: Don't try to print the GLSL IR if it has been freed

2015-06-26 Thread Neil Roberts
Since commit 104c8fc2c2aa5621261f8 the GLSL IR will be freed if NIR is being used. This was causing it to segfault if INTEL_DEBUG=wm is set. This patch just makes it avoid dumping the GLSL IR in that case. --- src/mesa/drivers/dri/i965/brw_program.c | 11 +++ 1 file changed, 7 insertions(+

Re: [Mesa-dev] [PATCH v2] glsls: Modify exec_list to avoid strict-aliasing violations

2015-06-26 Thread Eirik Byrkjeflot Anonsen
Davin McCall writes: > On 26/06/15 17:08, Eirik Byrkjeflot Anonsen wrote: >> Davin McCall writes: >> >>> On 26/06/15 14:31, Eirik Byrkjeflot Anonsen wrote: Erik Faye-Lund writes: > On Fri, Jun 26, 2015 at 1:23 PM, Davin McCall wrote: >> On 26/06/15 12:03, Davin McCall wrote:

Re: [Mesa-dev] [PATCH] gallium/os: add os_wait_until_zero

2015-06-26 Thread Ilia Mirkin
On Fri, Jun 26, 2015 at 12:40 PM, Marek Olšák wrote: > If p_atomic_read is fine, then this patch is fine too. So you're > telling that this should work: > > while (p_atomic_read(var)); No, this shouldn't work. I don't believe that anyone ever claimed it ought to. But perhaps we have different ide

Re: [Mesa-dev] [PATCH] gallium/os: add os_wait_until_zero

2015-06-26 Thread Marek Olšák
If p_atomic_read is fine, then this patch is fine too. So you're telling that this should work: while (p_atomic_read(var)); I wouldn't be concerned about a memory barrier. This is only 1 int, so it should make its way into the shared cache eventually. Marek On Fri, Jun 26, 2015 at 6:25 PM, Ili

Re: [Mesa-dev] [PATCH v2] glsls: Modify exec_list to avoid strict-aliasing violations

2015-06-26 Thread Davin McCall
On 26/06/15 17:08, Eirik Byrkjeflot Anonsen wrote: Davin McCall writes: On 26/06/15 14:31, Eirik Byrkjeflot Anonsen wrote: Erik Faye-Lund writes: On Fri, Jun 26, 2015 at 1:23 PM, Davin McCall wrote: On 26/06/15 12:03, Davin McCall wrote: ... The stored value of 'n' is not accessed by an

Re: [Mesa-dev] [PATCH 2/2] clover: implement CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE

2015-06-26 Thread Francisco Jerez
Grigori Goronzy writes: > On 2015-05-28 13:04, Grigori Goronzy wrote: >> Work-group size should always be aligned to subgroup size; this is a >> basic requirement, otherwise some work-items will be no-operation. >> >> It might make sense to refine the value according to a kernel's >> resource us

Re: [Mesa-dev] [PATCH v2 0/7] port _mesa_strto[df] to C

2015-06-26 Thread Erik Faye-Lund
On Fri, Jun 26, 2015 at 6:14 PM, Ilia Mirkin wrote: > On Fri, Jun 26, 2015 at 12:03 PM, Emil Velikov > wrote: >> On 25 June 2015 at 23:10, Matt Turner wrote: >>> On Thu, Jun 25, 2015 at 2:05 PM, Erik Faye-Lund wrote: Back in March[1], I sent a patch porting _mesa_strto[df] to C rathe

Re: [Mesa-dev] [PATCH v2 0/7] port _mesa_strto[df] to C

2015-06-26 Thread Erik Faye-Lund
On Fri, Jun 26, 2015 at 6:03 PM, Emil Velikov wrote: > On 25 June 2015 at 23:10, Matt Turner wrote: >> On Thu, Jun 25, 2015 at 2:05 PM, Erik Faye-Lund wrote: >>> Back in March[1], I sent a patch porting _mesa_strto[df] to >>> C rather than C++. I fixed up the patch according to the >>> criticism

Re: [Mesa-dev] [PATCH] gallium/os: add os_wait_until_zero

2015-06-26 Thread Ilia Mirkin
p_atomic_read is fine as-is. The read is guaranteed to be atomic up to a word size on x86 processors. I suspect other cpu's have similar guarantees, and if not, then hopefully have other ops to perform the read atomically. On Fri, Jun 26, 2015 at 12:18 PM, Marek Olšák wrote: > My question was how

Re: [Mesa-dev] [PATCH v2] glsls: Modify exec_list to avoid strict-aliasing violations

2015-06-26 Thread Eirik Byrkjeflot Anonsen
Francisco Jerez writes: > Erik Faye-Lund writes: > >> On Fri, Jun 26, 2015 at 4:01 PM, Francisco Jerez >> wrote: >>> Davin McCall writes: >>> On 26/06/15 14:31, Eirik Byrkjeflot Anonsen wrote: > Erik Faye-Lund writes: > >> On Fri, Jun 26, 2015 at 1:23 PM, Davin McCall wrote

Re: [Mesa-dev] [PATCH] gallium/os: add os_wait_until_zero

2015-06-26 Thread Marek Olšák
My question was how to fix p_atomic_read? Would the volatile read that I proposed work? Marek On Fri, Jun 26, 2015 at 5:59 PM, Ilia Mirkin wrote: > The compiler doesn't know that there's another thread. And it won't > start to assume that there might always be another thread because then > it c

Re: [Mesa-dev] [PATCH v2 0/7] port _mesa_strto[df] to C

2015-06-26 Thread Ilia Mirkin
On Fri, Jun 26, 2015 at 12:03 PM, Emil Velikov wrote: > On 25 June 2015 at 23:10, Matt Turner wrote: >> On Thu, Jun 25, 2015 at 2:05 PM, Erik Faye-Lund wrote: >>> Back in March[1], I sent a patch porting _mesa_strto[df] to >>> C rather than C++. I fixed up the patch according to the >>> criticis

Re: [Mesa-dev] [PATCH v2] glsls: Modify exec_list to avoid strict-aliasing violations

2015-06-26 Thread Eirik Byrkjeflot Anonsen
Davin McCall writes: > On 26/06/15 14:31, Eirik Byrkjeflot Anonsen wrote: >> Erik Faye-Lund writes: >> >>> On Fri, Jun 26, 2015 at 1:23 PM, Davin McCall wrote: On 26/06/15 12:03, Davin McCall wrote: > ... The stored value of 'n' is not accessed by any other type than the > type of

Re: [Mesa-dev] Early calls to st_validate_state

2015-06-26 Thread Marek Olšák
My patch should fix those too. Since this is glBlitFramebuffer, it shouldn't need any gallium states, so the st_validate_state call is mostly useless and all unnecessary operations should skipped. Sadly, there is little interest in such optimizations nowadays, but I understand that people are busy

Re: [Mesa-dev] [PATCH] egl_dri2: Remove trailing whitespaces

2015-06-26 Thread Emil Velikov
On 26 June 2015 at 13:54, Boyan Ding wrote: > Can someone help me push this please? > Added Marek's r-b and pushed to master. Thanks for the patch ! -Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/list

Re: [Mesa-dev] [PATCH v2 0/7] port _mesa_strto[df] to C

2015-06-26 Thread Emil Velikov
On 25 June 2015 at 23:10, Matt Turner wrote: > On Thu, Jun 25, 2015 at 2:05 PM, Erik Faye-Lund wrote: >> Back in March[1], I sent a patch porting _mesa_strto[df] to >> C rather than C++. I fixed up the patch according to the >> criticism, but unfortunately I dropped the ball before I sent >> out

Re: [Mesa-dev] [PATCH] gallium/os: add os_wait_until_zero

2015-06-26 Thread Ilia Mirkin
The compiler doesn't know that there's another thread. And it won't start to assume that there might always be another thread because then it could never optimize pointer derefs. On Fri, Jun 26, 2015 at 11:55 AM, Marek Olšák wrote: > I assumed the atomic operation in another thread would act as a

Re: [Mesa-dev] [PATCH] gallium/os: add os_wait_until_zero

2015-06-26 Thread Marek Olšák
I assumed the atomic operation in another thread would act as a barrier in this case. Is that right? Marek On Fri, Jun 26, 2015 at 5:47 PM, Ilia Mirkin wrote: > On Fri, Jun 26, 2015 at 11:33 AM, Marek Olšák wrote: >> I expect the variable will be changed using an atomic operation by the >> CPU,

Re: [Mesa-dev] [PATCH v2 16/19] i965/fs: Use the builder dispatch_width for computing register offsets

2015-06-26 Thread Francisco Jerez
Jason Ekstrand writes: > Reviewed-by: Topi Pohjolainen > --- > src/mesa/drivers/dri/i965/brw_fs.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/mesa/drivers/dri/i965/brw_fs.h > b/src/mesa/drivers/dri/i965/brw_fs.h > index d4cc43d..d94a842 100644 > --- a/src/mesa/

Re: [Mesa-dev] [PATCH] gallium/os: add os_wait_until_zero

2015-06-26 Thread Ilia Mirkin
On Fri, Jun 26, 2015 at 11:33 AM, Marek Olšák wrote: > I expect the variable will be changed using an atomic operation by the > CPU, or using a coherent store instruction by the GPU. > > If this is wrong and volatile is really required here, then > p_atomic_read is wrong too. Should we fix it? For

Re: [Mesa-dev] [PATCH v2] glsls: Modify exec_list to avoid strict-aliasing violations

2015-06-26 Thread Erik Faye-Lund
On Fri, Jun 26, 2015 at 5:32 PM, Davin McCall wrote: > On 26/06/15 15:29, Erik Faye-Lund wrote: > > On Fri, Jun 26, 2015 at 4:16 PM, Davin McCall wrote: > > On 26/06/15 14:53, Erik Faye-Lund wrote: > > On Fri, Jun 26, 2015 at 3:05 PM, Davin McCall wrote: > > [...] > > It is. In fact, it's not ev

Re: [Mesa-dev] Early calls to st_validate_state

2015-06-26 Thread Ilia Mirkin
Yeah, but there are a whole bunch of places, non-blit-related, where we call st_validate_state that will hit this same problem. On Fri, Jun 26, 2015 at 11:43 AM, Brian Paul wrote: > If we really do need to call _mesa_update_state() for this, I think the > right place would be in _mesa_blit_frameb

Re: [Mesa-dev] Early calls to st_validate_state

2015-06-26 Thread Brian Paul
If we really do need to call _mesa_update_state() for this, I think the right place would be in _mesa_blit_framebuffer(), not in the state tracker. -Brian On 06/26/2015 09:17 AM, Ilia Mirkin wrote: So that obviously avoids the crash. I guess I was unsure if that was the right way forward. The

Re: [Mesa-dev] [PATCH v2] glsls: Modify exec_list to avoid strict-aliasing violations

2015-06-26 Thread Davin McCall
On 26/06/15 14:53, Francisco Jerez wrote: Davin McCall writes: On 26/06/15 13:18, Francisco Jerez wrote: Davin McCall writes: On 26/06/15 11:08, Erik Faye-Lund wrote: On Thu, Jun 25, 2015 at 1:48 AM, Davin McCall wrote: This is an alternative to my earlier patch [1] (and it is now const

Re: [Mesa-dev] [PATCH] Allow setting GL_TEXTURE_COMPARE_MODE on a sampler object without ARB_shadow support.

2015-06-26 Thread Brian Paul
On 06/25/2015 05:11 PM, Matt Turner wrote: On Mon, Mar 23, 2015 at 12:25 PM, Stefan Dösinger wrote: This fixes a GL error warning on r200 in Wine. The GL_ARB_sampler_objects extension does not specify a dependency on GL_ARB_shadow or GL_ARB_depth_texture for this value. Just set the value and

Re: [Mesa-dev] [PATCH v2] glsls: Modify exec_list to avoid strict-aliasing violations

2015-06-26 Thread Davin McCall
On 26/06/15 15:29, Erik Faye-Lund wrote: On Fri, Jun 26, 2015 at 4:16 PM, Davin McCall wrote: On 26/06/15 14:53, Erik Faye-Lund wrote: On Fri, Jun 26, 2015 at 3:05 PM, Davin McCall wrote: [...] It is. In fact, it's not even possible to violate strict-aliasing without doing at least two oper

Re: [Mesa-dev] [PATCH] gallium/os: add os_wait_until_zero

2015-06-26 Thread Marek Olšák
I expect the variable will be changed using an atomic operation by the CPU, or using a coherent store instruction by the GPU. If this is wrong and volatile is really required here, then p_atomic_read is wrong too. Should we fix it? For example: #define p_atomic_read(_v) (*(volatile int*)(_v)) Th

Re: [Mesa-dev] [PATCH v2] glsls: Modify exec_list to avoid strict-aliasing violations

2015-06-26 Thread Erik Faye-Lund
On Fri, Jun 26, 2015 at 5:25 PM, Francisco Jerez wrote: > Erik Faye-Lund writes: > >> On Fri, Jun 26, 2015 at 4:53 PM, Francisco Jerez >> wrote: >>> Erik Faye-Lund writes: >>> On Fri, Jun 26, 2015 at 4:16 PM, Davin McCall wrote: > On 26/06/15 14:53, Erik Faye-Lund wrote: >> >

Re: [Mesa-dev] [PATCH v2] glsls: Modify exec_list to avoid strict-aliasing violations

2015-06-26 Thread Francisco Jerez
Erik Faye-Lund writes: > On Fri, Jun 26, 2015 at 4:01 PM, Francisco Jerez > wrote: >> Davin McCall writes: >> >>> On 26/06/15 14:31, Eirik Byrkjeflot Anonsen wrote: Erik Faye-Lund writes: > On Fri, Jun 26, 2015 at 1:23 PM, Davin McCall wrote: >> On 26/06/15 12:03, Davin McC

Re: [Mesa-dev] [PATCH v2] glsls: Modify exec_list to avoid strict-aliasing violations

2015-06-26 Thread Francisco Jerez
Erik Faye-Lund writes: > On Fri, Jun 26, 2015 at 4:53 PM, Francisco Jerez > wrote: >> Erik Faye-Lund writes: >> >>> On Fri, Jun 26, 2015 at 4:16 PM, Davin McCall wrote: On 26/06/15 14:53, Erik Faye-Lund wrote: > > On Fri, Jun 26, 2015 at 3:05 PM, Davin McCall wrote: >> >

Re: [Mesa-dev] [PATCH v2] glsls: Modify exec_list to avoid strict-aliasing violations

2015-06-26 Thread Erik Faye-Lund
On Fri, Jun 26, 2015 at 5:09 PM, Erik Faye-Lund wrote: > On Fri, Jun 26, 2015 at 4:53 PM, Francisco Jerez > wrote: >> Erik Faye-Lund writes: >> >>> On Fri, Jun 26, 2015 at 4:16 PM, Davin McCall wrote: On 26/06/15 14:53, Erik Faye-Lund wrote: > > On Fri, Jun 26, 2015 at 3:05 PM, Da

Re: [Mesa-dev] Early calls to st_validate_state

2015-06-26 Thread Ilia Mirkin
So that obviously avoids the crash. I guess I was unsure if that was the right way forward. The way that I understand it, there's "direct" state in the context, and there's derived state. And _mesa_update_state() will update the derived state. Since the various st atoms use derived state, doesn't i

  1   2   3   >