[Mesa-dev] [PATCH] mesa: Fix uf10_to_f32() scale factor in the E == 0 and M != 0 case.

2016-08-15 Thread Kenneth Graunke
GL_EXT_packed_float, 2.1.B Unsigned 10-Bit Floating-Point Numbers: 0.0, if E == 0 and M == 0, 2^-14 * (M / 32), if E == 0 and M != 0, 2^(E-15) * (1 + M/32),if 0 < E < 31, INF, if E == 31 and M == 0, or Na

[Mesa-dev] [PATCH] glx: Don't use current context in __glXSendError

2016-08-15 Thread Michel Dänzer
From: Michel Dänzer There's no guarantee that there is one, and we don't need one anyway. Fixes piglit tests: glx@glx-fbconfig-bad glx@glx_ext_import_context@import context, multi process glx@glx_ext_import_context@import context, single process Fixes: 2e3f067458e4 ("glx: fix error code when t

[Mesa-dev] [PATCH] i965: use nir_lower_indirect_derefs() for GLSL

2016-08-15 Thread Timothy Arceri
This moves the nir_lower_indirect_derefs() call into brw_preprocess_nir() so thats is called by both OpenGL and Vulkan and removes that call to the old GLSL IR pass lower_variable_index_to_cond_assign() We want to do this pass in nir to be able to move loop unrolling to nir. There is a increase o

[Mesa-dev] [Bug 97307] glsl/glcpp/tests/glcpp-test regression

2016-08-15 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=97307 Kenneth Graunke changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED

Re: [Mesa-dev] [PATCH] glcpp: Update tests for new #undef of built-in macro rules.

2016-08-15 Thread Kenneth Graunke
On Sunday, August 14, 2016 9:07:59 PM PDT Kenneth Graunke wrote: > Ian recently changed the preprocessor to allow this in most GLSL > versions, but not GLSL ES 3.00+. This patch converts the existing > test that expects a failure to a #version 300 es shader, and adds > a #version 110 shader to mak

Re: [Mesa-dev] [PATCH] i965: Drop assertion about buffer offset at draw time.

2016-08-15 Thread Kenneth Graunke
On Monday, August 15, 2016 9:01:06 AM PDT Eric Anholt wrote: > Given robust access, we should just be returning zeroes if the user gives > us a base pointer that's too big, which is what was happens on a release > build. This was caught by a webgl conformance test for out-of-bounds > draws on serv

Re: [Mesa-dev] [PATCH] anv: fix writemask on blit fragment shader.

2016-08-15 Thread Kenneth Graunke
On Tuesday, August 16, 2016 10:01:47 AM PDT Dave Airlie wrote: > From: Dave Airlie > > I'm not sure if anything even uses this, but I found this on radv, so > just fix it on anv for consistency. > > Signed-off-by: Dave Airlie > --- > src/intel/vulkan/anv_meta_blit.c | 2 +- > 1 file changed, 1

Re: [Mesa-dev] [PATCH 2/4] i965: Turn not.nz x into cmp.z x,0.

2016-08-15 Thread Kenneth Graunke
On Monday, August 15, 2016 2:24:30 PM PDT Matt Turner wrote: > This allow conditional mod propagation to handle it. > > HSW: > >total instructions in shared programs: 8270006 -> 8269855 (-0.00%) >instructions in affected programs: 41552 -> 41401 (-0.36%) >helped: 136 > >total cyc

Re: [Mesa-dev] [PATCH 3/6] gallium/u_blitter: split out a helper for common clear state

2016-08-15 Thread Rob Clark
On Mon, Aug 15, 2016 at 10:44 AM, Marek Olšák wrote: > On Sat, Aug 13, 2016 at 8:57 PM, Rob Clark wrote: >> On Sat, Aug 13, 2016 at 2:23 PM, Rob Clark wrote: >>> Signed-off-by: Rob Clark >>> --- >>> src/gallium/auxiliary/util/u_blitter.c | 38 >>> ++ >>> src/ga

Re: [Mesa-dev] Mesa stopped passing make check on August 10th: FAIL: glsl/glcpp/tests/glcpp-test

2016-08-15 Thread Michel Dänzer
On 16/08/16 08:42 AM, dar...@chaosreigns.com wrote: > Looks to me like src/compiler/glsl/glcpp/tests/120-undef-builtin.c.expected > just needs to be updated. > > > make check output includes: > > > Testsuite summary for

Re: [Mesa-dev] [PATCH] anv: fix writemask on blit fragment shader.

2016-08-15 Thread Jason Ekstrand
Drp... Thanks! Cc: "12.0" Reviewed-by: Jason Ekstrand On Mon, Aug 15, 2016 at 5:01 PM, Dave Airlie wrote: > From: Dave Airlie > > I'm not sure if anything even uses this, but I found this on radv, so > just fix it on anv for consistency. > > Signed-off-by: Dave Airlie > --- > src/intel/vul

[Mesa-dev] [PATCH] anv: fix writemask on blit fragment shader.

2016-08-15 Thread Dave Airlie
From: Dave Airlie I'm not sure if anything even uses this, but I found this on radv, so just fix it on anv for consistency. Signed-off-by: Dave Airlie --- src/intel/vulkan/anv_meta_blit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/intel/vulkan/anv_meta_blit.c b/src

[Mesa-dev] Mesa stopped passing make check on August 10th: FAIL: glsl/glcpp/tests/glcpp-test

2016-08-15 Thread darxus
Looks to me like src/compiler/glsl/glcpp/tests/120-undef-builtin.c.expected just needs to be updated. make check output includes: Testsuite summary for Mesa 12.1.0-devel =

Re: [Mesa-dev] [PATCH 1/3] gallium: change pipe_sampler_view::first_element/last_element -> offset/size

2016-08-15 Thread Roland Scheidegger
Am 15.08.2016 um 19:48 schrieb Marek Olšák: > On Sun, Aug 14, 2016 at 11:38 AM, Marek Olšák wrote: >> On Aug 12, 2016 8:49 PM, "Roland Scheidegger" wrote: >>> >>> I can't say I'm a big fan of this. >>> From an "api cleanness" point of view, defining things in elements makes >>> more sense imho. >

Re: [Mesa-dev] [PATCH] glcpp: Update tests for new #undef of built-in macro rules.

2016-08-15 Thread Vinson Lee
On Sun, Aug 14, 2016 at 9:07 PM, Kenneth Graunke wrote: > Ian recently changed the preprocessor to allow this in most GLSL > versions, but not GLSL ES 3.00+. This patch converts the existing > test that expects a failure to a #version 300 es shader, and adds > a #version 110 shader to make sure t

Re: [Mesa-dev] [PATCH] svga: remove incorrect buffer invalidation code

2016-08-15 Thread Charmaine Lee
Reviewed-by: Charmaine Lee From: Brian Paul Sent: Monday, August 15, 2016 3:43:22 PM To: mesa-dev@lists.freedesktop.org Cc: Charmaine Lee Subject: [PATCH] svga: remove incorrect buffer invalidation code Fixes regression with team_fortress_2 trace. This

[Mesa-dev] [PATCH] egl: reset 'ViewportInitialized' when unbinding current context

2016-08-15 Thread Dongwon Kim
'ViewportInitialized' flag in gl_context has to be reset to '0' when the current context is unbound via a eglMakeCurrent call with all of 'NULL' resources (surfaces and context). This is to make sure the viewport of the context is re-initialized when the same context is bound to new read and draw

[Mesa-dev] [PATCH] svga: remove incorrect buffer invalidation code

2016-08-15 Thread Brian Paul
Fixes regression with team_fortress_2 trace. This change has been in our in-house tree for some time. --- src/gallium/drivers/svga/svga_screen_cache.c | 5 - 1 file changed, 5 deletions(-) diff --git a/src/gallium/drivers/svga/svga_screen_cache.c b/src/gallium/drivers/svga/svga_screen_cache.

Re: [Mesa-dev] [PATCH] egl/dri2: Do not need to check return value from mtx_lock

2016-08-15 Thread Dongwon Kim
A new patch, "[PATCH] egl/dri2: remove error checks on return values from mtx_lock and cnd_wait" containing additional clean-up has been submitted. Please disregard this one. On Thu, Jul 28, 2016 at 02:38:35PM -0700, Dongwon Kim wrote: > This removes unnecessary error checks on return result of

Re: [Mesa-dev] [PATCH] egl/dri2: Do not need to check return value from mtx_lock

2016-08-15 Thread Dongwon Kim
Emil, I just submitted a new patch "[PATCH] egl/dri2: remove error checks on return values from mtx_lock and cnd_wait" that replaces the old one. Please review the new one and disregard the original one, "egl/dri2: Do not need to check return value from mtx_lock". On Mon, Aug 15, 2016 at 02:4

[Mesa-dev] [PATCH] egl/dri2: remove error checks on return values from mtx_lock and cnd_wait

2016-08-15 Thread Dongwon Kim
This removes unnecessary error checks on return result of mtx_lock and cnd_wait calls as in all other places in MESA source since there is no chance that any of these functions return any of error codes in current implementation. This patch also removes a redundent _eglError call that follows EGL_

[Mesa-dev] [PATCH 3/4] gallium: remove unused u_clear.h file

2016-08-15 Thread Brian Paul
--- src/gallium/auxiliary/Makefile.sources | 1 - src/gallium/auxiliary/util/u_clear.h | 64 -- 2 files changed, 65 deletions(-) delete mode 100644 src/gallium/auxiliary/util/u_clear.h diff --git a/src/gallium/auxiliary/Makefile.sources b/src/gallium/auxiliary

[Mesa-dev] [PATCH 4/4] st/mesa: use pipe var instead of st->pipe in st_create_context_priv()

2016-08-15 Thread Brian Paul
As is done in most other places in the function. --- src/mesa/state_tracker/st_context.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c index 687ca19..ddc11a4 100644 --- a/src/mesa/state_tracker

[Mesa-dev] [PATCH 1/4] gallium/util: minor reformatting in u_box.h

2016-08-15 Thread Brian Paul
--- src/gallium/auxiliary/util/u_box.h | 42 -- 1 file changed, 13 insertions(+), 29 deletions(-) diff --git a/src/gallium/auxiliary/util/u_box.h b/src/gallium/auxiliary/util/u_box.h index 00f231d..eb41f8a 100644 --- a/src/gallium/auxiliary/util/u_box.h +++ b/

[Mesa-dev] [PATCH 2/4] gallium/i915: inline the util_clear() code into i915_clear_blitter()

2016-08-15 Thread Brian Paul
This is the only place the util_clear() function was used. --- src/gallium/drivers/i915/i915_clear.c | 24 +--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/i915/i915_clear.c b/src/gallium/drivers/i915/i915_clear.c index 57244a6..a1af789 1

[Mesa-dev] [PATCH 1/2] st/va: enable dual instances encode by sync surface

2016-08-15 Thread Boyuan Zhang
This patch improves the performance of Vaapi Encode by enabling dual instances encoding. flush function is not called after each end_frame call. radeon/vce will do flush whenever 2 frames are submitted for encoding. Implement sync surface function to flush only if the frame hasn't been flushed y

[Mesa-dev] [PATCH 2/2] radeon/vce: set flag based on dual instance enablement

2016-08-15 Thread Boyuan Zhang
Set the flag on when dual instance encoding is supported, otherwise set it to off Signed-off-by: Boyuan Zhang --- src/gallium/drivers/radeon/radeon_vce_52.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/radeon/radeon_vce_52.c b/src/gallium/driver

Re: [Mesa-dev] [PATCH] egl/dri2: Do not need to check return value from mtx_lock

2016-08-15 Thread Dongwon Kim
Yes, you are right. It is duplicate EGL_FALSE check and _eglError call in the end of the function.. Also, I don't see any good reason to check return value of cnd_wait (though we still need to check it in timedwait case.). I will prepare a new patch with all of these taken into acocunt. On Mon, A

Re: [Mesa-dev] [PATCH 1/2] llvmpipe: fix depth clamping wrt reversed near/far values

2016-08-15 Thread Jose Fonseca
On 15/08/16 04:41, srol...@vmware.com wrote: From: Roland Scheidegger This wasn't handled before (the result was that no matter what value got clamped, it always ended up as the near value in this case) (if clamping actually happened). Fix this by using the util helper for that (the math is oth

Re: [Mesa-dev] [PATCH 3/3] i965/fs: Estimate maximum sampler message execution size more accurately.

2016-08-15 Thread Francisco Jerez
Kenneth Graunke writes: > On Friday, August 12, 2016 10:06:29 PM PDT Francisco Jerez wrote: >> The current logic used to determine the execution size of sampler >> messages was based on special-casing several argument and opcode >> combinations, which unsurprisingly missed the possibility that so

Re: [Mesa-dev] [PATCH] egl/x11: avoid using freed memory if dri2 init fails

2016-08-15 Thread Kristian Høgsberg
On Mon, Aug 15, 2016 at 11:33 AM, ⚛ <0xe2.0x9a.0...@gmail.com> wrote: > On Mon, Aug 15, 2016 at 8:08 PM, Emil Velikov > wrote: >> >> On 4 August 2016 at 03:13, Nicolas Boichat wrote: >> > Thanks! See also related series here, which fixes the other platforms: >> > https://lists.freedesktop.org/ar

Re: [Mesa-dev] [PATCH] egl/x11: avoid using freed memory if dri2 init fails

2016-08-15 Thread
On Mon, Aug 15, 2016 at 8:08 PM, Emil Velikov wrote: > > On 4 August 2016 at 03:13, Nicolas Boichat wrote: > > Thanks! See also related series here, which fixes the other platforms: > > https://lists.freedesktop.org/archives/mesa-dev/2016-August/125147.html > > > > Fixes: 9ee683f877 (egl/dri2: Ad

Re: [Mesa-dev] [PATCH] egl/x11: avoid using freed memory if dri2 init fails

2016-08-15 Thread Emil Velikov
On 4 August 2016 at 03:13, Nicolas Boichat wrote: > Thanks! See also related series here, which fixes the other platforms: > https://lists.freedesktop.org/archives/mesa-dev/2016-August/125147.html > > On Sun, Jul 31, 2016 at 9:44 PM, Jan Ziak <0xe2.0x9a.0...@gmail.com> wrote: >> Found with valgrin

Re: [Mesa-dev] [PATCH 1/3] gallium: change pipe_sampler_view::first_element/last_element -> offset/size

2016-08-15 Thread Marek Olšák
On Sun, Aug 14, 2016 at 11:38 AM, Marek Olšák wrote: > On Aug 12, 2016 8:49 PM, "Roland Scheidegger" wrote: >> >> I can't say I'm a big fan of this. >> From an "api cleanness" point of view, defining things in elements makes >> more sense imho. >> This is due to the GL api though which uses gener

Re: [Mesa-dev] [PATCH 1/2] aubinator: Add a new tool called Aubinator to the src/intel/tools folder.

2016-08-15 Thread Gandikota, Sirisha
Thanks Emil/Jason/Ken/Matt/Kristian... for your time and review comments. Noted all the suggestions and I'll send out the updated patches soon. -Sirisha -Original Message- From: Emil Velikov [mailto:emil.l.veli...@gmail.com] Sent: Monday, August 15, 2016 5:41 AM To: Gandikota, Sirisha

Re: [Mesa-dev] [PATCH] egl/dri2: dri2_initialize: Do not reference-count TestOnly display

2016-08-15 Thread Emil Velikov
Hi Nicolas, On 4 August 2016 at 02:51, Nicolas Boichat wrote: > On Thu, Aug 4, 2016 at 9:38 AM, Michel Dänzer wrote: >> On 04.08.2016 09:53, Nicolas Boichat wrote: >>> On Thu, Aug 4, 2016 at 12:22 AM, Martin Peres >>> wrote: On 03/08/16 16:54, Nicolas Boichat wrote: > > In the case

Re: [Mesa-dev] [PATCH 00/32] i965/blorp: Use genxml for state setup

2016-08-15 Thread Jason Ekstrand
On Sun, Aug 14, 2016 at 11:53 PM, Kenneth Graunke wrote: > On Thursday, August 11, 2016 2:14:57 PM PDT Jason Ekstrand wrote: > > This patch series is the next on the way towards generalizing blorp for > > usin in Vulkan. At this point, I'd say the project is about 80% > complete. > > This series

Re: [Mesa-dev] [PATCH] anv/x11: Add support for Xlib platform

2016-08-15 Thread Jason Ekstrand
On Mon, Aug 15, 2016 at 4:05 AM, Emil Velikov wrote: > On 11 August 2016 at 23:26, Kevin Strasser > wrote: > > Some applications continue to use the Xlib client library and expect that > > VK_KHR_xlib_surface will be available in the driver. Service these > > applications by converting the Displ

Re: [Mesa-dev] [PATCH 25/32] i965: Move gen6_blorp.c to a file that gets recompiled per-gen

2016-08-15 Thread Jason Ekstrand
On Mon, Aug 15, 2016 at 5:58 AM, Emil Velikov wrote: > Hi Jason, > > On 11 August 2016 at 22:15, Jason Ekstrand wrote: > > At the moment, it's only used for gen6 but that will change soon. We use > > the genX prefix for recompiled things in the Vulkan driver. It isn't > > great, but it seems t

[Mesa-dev] [PATCH] i965: Drop assertion about buffer offset at draw time.

2016-08-15 Thread Eric Anholt
Given robust access, we should just be returning zeroes if the user gives us a base pointer that's too big, which is what was happens on a release build. This was caught by a webgl conformance test for out-of-bounds draws on servo. --- src/mesa/drivers/dri/i965/brw_draw_upload.c | 11 ---

Re: [Mesa-dev] [PATCH v2 2/2] i915: remove unnecessary `if`

2016-08-15 Thread Chris Wilson
On Mon, Aug 15, 2016 at 03:51:21PM +0100, Eric Engestrom wrote: > if (x) return true; else return false; > can be simplified as: > return x; > since `x` is already a boolean expression. > > Signed-off-by: Eric Engestrom Both Reviewed-by: Chris Wilson -Chris -- Chris Wilson, Intel

[Mesa-dev] [PATCH v2 1/2] i965: remove unnecessary `if`

2016-08-15 Thread Eric Engestrom
if (x) return true; else return false; can be simplified as: return x; since both `x` are already boolean expressions. Signed-off-by: Eric Engestrom --- src/mesa/drivers/dri/i965/intel_screen.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/mesa/d

[Mesa-dev] [PATCH v2 2/2] i915: remove unnecessary `if`

2016-08-15 Thread Eric Engestrom
if (x) return true; else return false; can be simplified as: return x; since `x` is already a boolean expression. Signed-off-by: Eric Engestrom --- v2: replace `x == 0` with `!x` for consistency. src/mesa/drivers/dri/i915/intel_screen.c | 4 +--- 1 file changed, 1 insertion(+),

Re: [Mesa-dev] [PATCH 3/6] gallium/u_blitter: split out a helper for common clear state

2016-08-15 Thread Marek Olšák
On Sat, Aug 13, 2016 at 8:57 PM, Rob Clark wrote: > On Sat, Aug 13, 2016 at 2:23 PM, Rob Clark wrote: >> Signed-off-by: Rob Clark >> --- >> src/gallium/auxiliary/util/u_blitter.c | 38 >> ++ >> src/gallium/auxiliary/util/u_blitter.h | 5 + >> 2 files change

Re: [Mesa-dev] [PATCH 1/2] i965: remove unnecessary `if`

2016-08-15 Thread Chris Wilson
On Mon, Aug 15, 2016 at 03:16:12PM +0100, Eric Engestrom wrote: > if (x) return true; else return false; > can be simplified as: > return x; > since both `x` are already boolean expressions. > > Signed-off-by: Eric Engestrom > --- > src/mesa/drivers/dri/i965/intel_screen.c | 8 ++

[Mesa-dev] [PATCH 1/2] i965: remove unnecessary `if`

2016-08-15 Thread Eric Engestrom
if (x) return true; else return false; can be simplified as: return x; since both `x` are already boolean expressions. Signed-off-by: Eric Engestrom --- src/mesa/drivers/dri/i965/intel_screen.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/mesa/d

Re: [Mesa-dev] [PATCH] Return corresponding offset of EGLImage instead of 0.

2016-08-15 Thread Eric Engestrom
On Mon, Aug 15, 2016 at 08:48:56PM +0800, Chuanbo Weng wrote: > The offset should not always be 0. For example, if EGLImage is > created from a 2D texture with EGL_GL_TEXTURE_LEVEL=1, then the > offset should be the actual start of miplevel 1 in drm bo. > > Signed-off-by: Chuanbo Weng LGTM :) Re

Re: [Mesa-dev] [PATCH] egl/dri2: Do not need to check return value from mtx_lock

2016-08-15 Thread Emil Velikov
Hi Kim, On 28 July 2016 at 22:38, Dongwon Kim wrote: > This removes unnecessary error checks on return result of mtx_lock > calls as in all other places in MESA source since there is no chance > that mtx_lock returns any of error codes in current implementation. > > Signed-off-by: Dongwon Kim >

Re: [Mesa-dev] [PATCH 25/32] i965: Move gen6_blorp.c to a file that gets recompiled per-gen

2016-08-15 Thread Emil Velikov
Hi Jason, On 11 August 2016 at 22:15, Jason Ekstrand wrote: > At the moment, it's only used for gen6 but that will change soon. We use > the genX prefix for recompiled things in the Vulkan driver. It isn't > great, but it seems to have worked ok. Speaking of genX and Vulkan - I was wondering wh

[Mesa-dev] [PATCH] Return corresponding offset of EGLImage instead of 0.

2016-08-15 Thread Chuanbo Weng
The offset should not always be 0. For example, if EGLImage is created from a 2D texture with EGL_GL_TEXTURE_LEVEL=1, then the offset should be the actual start of miplevel 1 in drm bo. Signed-off-by: Chuanbo Weng --- include/GL/internal/dri_interface.h | 2 ++ src/egl/drivers/dri2/egl_dri2

Re: [Mesa-dev] [PATCH 1/2] aubinator: Add a new tool called Aubinator to the src/intel/tools folder.

2016-08-15 Thread Emil Velikov
Hi Sirisha, A few misc suggestions all over on top of Matt's input. Please don't read too much into them ;-) On 10 August 2016 at 00:52, Sirisha Gandikota wrote: > From: Kristian Høgsberg Kristensen > > The Aubinator tool is designed to help the driver developers in debugging > the driver funct

Re: [Mesa-dev] [PATCH] anv/x11: Add support for Xlib platform

2016-08-15 Thread Emil Velikov
On 11 August 2016 at 23:26, Kevin Strasser wrote: > Some applications continue to use the Xlib client library and expect that > VK_KHR_xlib_surface will be available in the driver. Service these > applications by converting the Display pointer to xcb_connection_t and use > the existing xcb code in

[Mesa-dev] [Bug 97291] Incorrect packing of struct

2016-08-15 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=97291 --- Comment #5 from Michel Dänzer --- (In reply to Matias N. Goldberg from comment #4) > [...] I don't have compute shaders. Googling around it appears for > Southern Island radeon it could be buggy so it was turned off. No, it just requires ker

[Mesa-dev] [Bug 97285] Darkness in Dota 2 after Patch "Make Gallium's BlitFramebuffer follow the GL 4.4 sRGB rules"

2016-08-15 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=97285 --- Comment #16 from Dmytro Zverev --- Sorry. Waiting for fix in master branch. -- You are receiving this mail because: You are the QA Contact for the bug. You are the assignee for the bug.___ mesa-de