[Mesa-dev] [PATCH] glsl: fix Bug 85252 - Segfault in compiler while processing ternary operator with void arguments

2015-07-09 Thread Renaud Gaubert
This is done by returning an rvalue of type void in the ast_function_expression::hir function instead of a void expression. This produces (in the case of the ternary) an hir with a call to the void returning function and an assignement of a void variable which will be optimized out (the

Re: [Mesa-dev] [PATCH 1/2] i965: Set brw-batch.emit only #ifdef DEBUG.

2015-07-09 Thread Iago Toral
Even if your next patch needs more work this one alone still makes sense: Reviewed-by: Iago Toral Quiroga ito...@igalia.com Iago On Wed, 2015-07-08 at 14:00 -0700, Matt Turner wrote: It's only used inside #ifdef DEBUG. Cuts ~1.7k of .text, and more importantly prevents a larger code size

[Mesa-dev] [HACK] i965/fs: Fix ordering of src0 alpha and oMask in the framebuffer write payload.

2015-07-09 Thread Francisco Jerez
We were passing src0 alpha and oMask in reverse order. There seems to be no good way to pass them in the correct order to the new-style LOAD_PAYLOAD (how surprising) because src0 alpha is per-channel while oMask is not. Just split src0 alpha in fixed-width registers and pass them to LOAD_PAYLOAD

Re: [Mesa-dev] [Mesa-stable] [PATCHv2] i965/gen9: Use custom MOCS entries set up by the kernel.

2015-07-09 Thread Francisco Jerez
Ben Widawsky b...@bwidawsk.net writes: On Tue, Jul 07, 2015 at 10:21:28PM +0300, Francisco Jerez wrote: Instead of relying on hardware defaults the i915 kernel driver is going program custom MOCS tables system-wide on Gen9 hardware. The WT entry previously used for renderbuffers had a number

Re: [Mesa-dev] [PATCH 4/4] vc4: unref old fence

2015-07-09 Thread Rob Clark
On Thu, Jul 9, 2015 at 8:36 AM, Emil Velikov emil.l.veli...@gmail.com wrote: On 9 July 2015 at 01:46, Rob Clark robdcl...@gmail.com wrote: From: Rob Clark robcl...@freedesktop.org Some, but not all, state trackers will explicitly unref (and set to NULL) the previous *fence before calling

Re: [Mesa-dev] [PATCH 2/2] i965: Optimize intel_batchbuffer_emit_dword().

2015-07-09 Thread Martin Peres
On 09/07/15 11:13, Chris Wilson wrote: On Wed, Jul 08, 2015 at 05:08:11PM -0700, Matt Turner wrote: On Wed, Jul 8, 2015 at 4:53 PM, Chris Wilson ch...@chris-wilson.co.uk wrote: static void upload_viewport_state_pointers(struct brw_context *brw) { BEGIN_BATCH(4); brw-batch.map[0] =

[Mesa-dev] [PATCH] glsl: fix Bug 85252 - Segfault in compiler while processing ternary operator with void arguments

2015-07-09 Thread Renaud Gaubert
This is done by returning an rvalue of type void in the ast_function_expression::hir function instead of a void expression. This produces (in the case of the ternary) an hir with a call to the void returning function and an assignement of a void variable which will be optimized out (the

Re: [Mesa-dev] [RFC] loader: libudev vs sysfs vs libdrm

2015-07-09 Thread Axel Davy
On 09/07/2015 15:33, Emil Velikov wrote : Yakes forgot about that one. From a quick look we can (I know it feels durty) use readlink( /sys/dev/char/$(major):$(minor)). Everything seems to be there - bus type and exact location of the device on the bus. It's limited to sysfs users, but they are

[Mesa-dev] [PATCH shader-db] Add support for shadertoy tests

2015-07-09 Thread Rob Clark
Attached script grabs shaders from shadertoy, and dumps them out as .shader_test files which can be run through shader-db for compiler testing. shadertoy only gives you a fragment shader (which works based on gl_FragCoord), so a generic vertex shader is used. And a blurb is inserted for the

Re: [Mesa-dev] [PATCH 06/78] i965/nir/vec4: Add setup of uniform variables

2015-07-09 Thread Kenneth Graunke
On Tuesday, June 30, 2015 10:04:47 AM Iago Toral wrote: Hi Jason, On Mon, 2015-06-29 at 16:22 -0700, Jason Ekstrand wrote: On Fri, Jun 26, 2015 at 1:06 AM, Eduardo Lima Mitev el...@igalia.com wrote: From: Iago Toral Quiroga ito...@igalia.com This is based on similar code existing

Re: [Mesa-dev] [PATCH] [v2] i965: Split out gen8 push constant state upload

2015-07-09 Thread Ben Widawsky
On Thu, Jul 09, 2015 at 09:44:52AM -0700, Ben Widawsky wrote: While implementing the workaround in the previous patch I noticed things were starting to get a bit messy. Since gen8 works differently enough from gen7, I thought splitting it out with be good. While here, get rid of gen8 MOCS

[Mesa-dev] [PATCH] i965/hsw: Implement end of batch workaround

2015-07-09 Thread Kenneth Graunke
From: Ben Widawsky benjamin.widaw...@intel.com This patch can cause an infinite recursion if the previous patch titled, i965: Track finished batch state isn't present (backporters take notice). v2: Sent out the wrong patch originally. This patches switches the order of flushes, doing the generic

Re: [Mesa-dev] [PATCH 04/11] dri_interface: drop __NOT_HAVE_DRM_H magic

2015-07-09 Thread Ian Romanick
On 07/08/2015 10:07 AM, Emil Velikov wrote: Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- include/GL/internal/dri_interface.h | 11 --- 1 file changed, 11 deletions(-) diff --git a/include/GL/internal/dri_interface.h b/include/GL/internal/dri_interface.h index

Re: [Mesa-dev] [PATCH 06/11] loader: use HAVE_LIBDRM instead of ! __NOT_HAVE_DRM_H

2015-07-09 Thread Ian Romanick
I can't really speak to the Android.mk or SConscript changes, but the rest of this patch is Reviewed-by: Ian Romanick ian.d.roman...@intel.com You might also see what Jeremy Huddleston Sequoia jerem...@apple.com thinks, since most of this exists to support his platform. :) On 07/08/2015 10:07

Re: [Mesa-dev] [PATCH] i965/cs: Initialize GPGPU Thread Count

2015-07-09 Thread Ben Widawsky
On Thu, Jul 02, 2015 at 11:32:03PM -0700, Jordan Justen wrote: On 2015-06-25 11:34:59, Ben Widawsky wrote: On Thu, Jun 11, 2015 at 09:04:45PM -0700, Jordan Justen wrote: + desc[dw++] = 0; + const uint32_t media_threads = + brw-gen = 8 ? + SET_FIELD(threads,

Re: [Mesa-dev] [PATCH 03/11] radeon: remove dri_mirror state

2015-07-09 Thread Ian Romanick
On 07/08/2015 10:07 AM, Emil Velikov wrote: Most of the data stored(duplicated) was unused, and for the one that is follow the approach set by other drivers. This eliminates the use of legacy (dri1) types. XXX: The radeon code is the only user of __DRIscreen::drm_version (the only

[Mesa-dev] [PATCH] [v3] i965: Split out gen8 push constant state upload

2015-07-09 Thread Ben Widawsky
While implementing the workaround in the previous patch I noticed things were starting to get a bit messy. Since gen8 works differently enough from gen7, I thought splitting it out with be good. While here, get rid of gen8 MOCS which does nothing and was in the wrong place anyway. This patch is

Re: [Mesa-dev] [PATCH] glsl: use the fast hash table for ir_validate

2015-07-09 Thread Eric Anholt
Timothy Arceri t_arc...@yahoo.com.au writes: --- Some of the AoA tests currently get stuck in an optimisation loop for a long time and this was taking a large amount of time. Its a symptom not a cause but I don't see any issue with using the faster version. src/glsl/ir_validate.cpp |

[Mesa-dev] [PATCH] mesa: Fix generation of git_sha1.h.tmp for gitlinks

2015-07-09 Thread Chad Versace
Don't assume that $(top_srcdir)/.git is a directory. It may be a gitlink file [1] if $(top_srcdir) is a submodule checkout or a linked worktree [2]. [1] A gitlink is a text file that specifies the real location of the gitdir. [2] Linked worktrees are a new feature in Git 2.5. Cc: 10.6, 10.5

[Mesa-dev] [Bug 91290] SIGSEGV glcpp/glcpp-parse.y:1077

2015-07-09 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=91290 Bug ID: 91290 Summary: SIGSEGV glcpp/glcpp-parse.y:1077 Product: Mesa Version: git Hardware: x86-64 (AMD64) OS: All Status: NEW Keywords: have-backtrace

Re: [Mesa-dev] [PATCH 07/19] glsl/types: add new subroutine type (v3)

2015-07-09 Thread Chris Forbes
7-12 inclusive are Reviewed-by: Chris Forbes chr...@ijw.co.nz On Thu, Jul 9, 2015 at 7:17 PM, Dave Airlie airl...@gmail.com wrote: From: Dave Airlie airl...@redhat.com This type will be used to store the name of subroutine types as in subroutine void myfunc(void); will store myfunc into a

Re: [Mesa-dev] [PATCH 1/4] radeon, r200: remove unused variable texmicrotile

2015-07-09 Thread Roland Scheidegger
Ohhh ripping out some more of my _very_ old code, how dare you :-). Too bad some parts (fast z clear for instance) never made it past UMS for these chips, quake3 never was as fast again ;-). I wonder how well things actually work these days with enabled hyperz, it has some, let's say,

Re: [Mesa-dev] [PATCH 09/11] android: dri: correctly set HAVE_LIBDRM

2015-07-09 Thread Chih-Wei Huang
Emil Velikov 於 西元2015年07月09日 01:07 寫道: Set the macro if we're not building swrast alone. Cc: Chih-Wei Huang cwhu...@linux.org.tw Cc: Eric Anholt e...@anholt.net Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- src/gallium/targets/dri/Android.mk | 8 +++- 1 file changed, 3

Re: [Mesa-dev] [PATCH 3/4] radeon, r200: allow hyperz for radeon DRM module v2

2015-07-09 Thread Michel Dänzer
On 10.07.2015 05:13, Emil Velikov wrote: The original code only half considered hyperz as an option. As per previous commit major != 2 cannot occur we can simply things, and allow users to set the option if they choose to do so. Signed-off-by: Emil Velikov emil.l.veli...@gmail.com ---

Re: [Mesa-dev] [PATCH 2/2] i965: Optimize intel_batchbuffer_emit_dword().

2015-07-09 Thread Chris Wilson
On Wed, Jul 08, 2015 at 05:08:11PM -0700, Matt Turner wrote: On Wed, Jul 8, 2015 at 4:53 PM, Chris Wilson ch...@chris-wilson.co.uk wrote: static void upload_viewport_state_pointers(struct brw_context *brw) { BEGIN_BATCH(4); brw-batch.map[0] = (_3DSTATE_VIEWPORT_STATE_POINTERS 16 |

[Mesa-dev] [PATCH 0/2] egl, i965: Support importing R8 and GR88 dma_bufs as textures

2015-07-09 Thread Chad Versace
Teach EGL_EXT_image_dma_buf_import about DRM_FORMAT_R8 and DRM_FORMAT_GR88 in egl_dri2.c. Then add the plumbing to i965 to import R8 and GR88 dma_bufs as textures. This Mesa series shouldn't land until my kernel patch lands: To: dri-de...@freedesktop.org Subject: [PATCH] drm/fourcc: Add

[Mesa-dev] [PATCH 1/2] egl: Add support for DRM_FORMAT_R8, RG88, and GR88

2015-07-09 Thread Chad Versace
The Kodi/XBMC developers want to transcode NV12 to RGB with OpenGL shaders, importing the two source planes through EGL_EXT_image_dma_buf_import. That requires importing the Y plane as an R8 EGLImage and the UV plane as either an RG88 or GR88 EGLImage. This patch teaches the driver-independent

[Mesa-dev] [PATCH 2/2] i965: Support importing R8 and GR88 dma_bufs

2015-07-09 Thread Chad Versace
EGL_EXT_image_dma_buf_import now supports those formats. CC: Peter Frühberger peter.fruehber...@gmail.com Cc: Rainer Hochecker rainer.hochec...@onlinehome.de Signed-off-by: Chad Versace chad.vers...@intel.com --- include/GL/internal/dri_interface.h | 9 +++--

[Mesa-dev] [Bug 90903] egl_dri2.c:dri2_load fails to load libglapi on osx

2015-07-09 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=90903 Emil Velikov emil.l.veli...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED

[Mesa-dev] [Bug 90249] Fails to build egl_dri2 on osx

2015-07-09 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=90249 Emil Velikov emil.l.veli...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED

Re: [Mesa-dev] [PATCH] glsl: fix Bug 85252 - Segfault in compiler while processing ternary operator with void arguments

2015-07-09 Thread Samuel Iglesias Gonsálvez
On 07/07/15 21:47, Renaud Gaubert wrote: This is done by returning an rvalue of type void in the ast_function_expression::hir function instead of a void expression. This produces (in the case of the ternary) an hir with a call to the void returning function and an assignement of a void

[Mesa-dev] [Bug 66346] shader_query.cpp:49: error: invalid conversion from 'void*' to 'GLuint'

2015-07-09 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=66346 Emil Velikov emil.l.veli...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED

[Mesa-dev] [Bug 79706] [TRACKER] Mesa regression tracker

2015-07-09 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=79706 Bug 79706 depends on bug 66346, which changed state. Bug 66346 Summary: shader_query.cpp:49: error: invalid conversion from 'void*' to 'GLuint' https://bugs.freedesktop.org/show_bug.cgi?id=66346 What|Removed

[Mesa-dev] [RFC] r600 geometry streams (and ARB_gpu_shader5 support)

2015-07-09 Thread Dave Airlie
This applies on top of the two patches I've sent already, and enables the geometry streams, which is the final piece missing for ARB_gpu_shader5 on evergreen and cayman. (I'll do doc update patches later) Glenn wrote most of this, I just spent some time making it work and cleaning up the code.

[Mesa-dev] [PATCH 4/6] r600g/sb: add support for multiple streams to SB backend

2015-07-09 Thread Dave Airlie
From: Glenn Kennard glenn.kenn...@gmail.com This adds a peephole and removes an assert that isn't actually valid with some of the stream emit instructions. Signed-off-by: Dave Airlie airl...@redhat.com --- src/gallium/drivers/r600/sb/sb_bc_finalize.cpp | 2 --

[Mesa-dev] [PATCH 6/6] r600g: enable ARB_gpu_shader5 on evergreen and up

2015-07-09 Thread Dave Airlie
From: Dave Airlie airl...@redhat.com Signed-off-by: Dave Airlie airl...@redhat.com --- src/gallium/drivers/r600/r600_pipe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c index 67caa69..0db1c1c

Re: [Mesa-dev] [PATCH 3/4] ilo: unref old fence

2015-07-09 Thread Chia-I Wu
On Thu, Jul 9, 2015 at 8:46 AM, Rob Clark robdcl...@gmail.com wrote: From: Rob Clark robcl...@freedesktop.org Some, but not all, state trackers will explicitly unref (and set to NULL) the previous *fence before calling pipe-flush(). So driver should use fence_ref() which will unref the old

[Mesa-dev] [PATCH 1/6] r600g: add support for streams to the assembler.

2015-07-09 Thread Dave Airlie
From: Glenn Kennard glenn.kenn...@gmail.com This just adds support to the assembler dumper and allows stream instructions to be generated. Also fix up the stream debugging to add stream info. Signed-off-by: Dave Airlie airl...@redhat.com --- src/gallium/drivers/r600/eg_asm.c | 1 +

[Mesa-dev] [PATCH 2/6] radeon: add streamout status 1-3 queries.

2015-07-09 Thread Dave Airlie
From: Glenn Kennard glenn.kenn...@gmail.com This adds support for queries against the non-0 vertex streams. Signed-off-by: Dave Airlie airl...@redhat.com --- src/gallium/drivers/radeon/r600_query.c | 18 -- src/gallium/drivers/radeon/r600d_common.h | 3 +++ 2 files changed,

[Mesa-dev] [PATCH 5/6] r600g: add streamout support

2015-07-09 Thread Dave Airlie
From: Glenn Kennard glenn.kenn...@gmail.com This adds the main chunk of the geometry shader multiple stream support to the r600 driver. Glenn wrote the original pass, and I took his code and hacked it into a working state. Signed-off-by: Dave Airlie airl...@redhat.com ---

[Mesa-dev] [PATCH 3/6] radeon: add support for streams to the common streamout code.

2015-07-09 Thread Dave Airlie
From: Glenn Kennard glenn.kenn...@gmail.com This just adds to the common radeon streamout code, support for multiple streams. Signed-off-by: Dave Airlie airl...@redhat.com --- src/gallium/drivers/radeon/r600_pipe_common.h | 1 + src/gallium/drivers/radeon/r600_streamout.c | 23

Re: [Mesa-dev] [PATCH 16/78] i965/nir/vec4: Implement store_output intrinsic

2015-07-09 Thread Eduardo Lima Mitev
On 06/30/2015 06:51 PM, Jason Ekstrand wrote: On Fri, Jun 26, 2015 at 1:06 AM, Eduardo Lima Mitev el...@igalia.com wrote: The index into the output_reg array where to store the destination register is fetched from the nir_outputs map built during nir_setup_outputs stage. Bugzilla:

Re: [Mesa-dev] [PATCH] r600g: fix sampler/ubo indexing on cayman

2015-07-09 Thread Glenn Kennard
On Thu, 09 Jul 2015 07:37:59 +0200, Dave Airlie airl...@gmail.com wrote: From: Dave Airlie airl...@redhat.com Cayman needs a different method to upload the CF IDX0/1 This fixes 31 piglits when ARB_gpu_shader5 is forced on with cayman. Signed-off-by: Dave Airlie airl...@redhat.com ---

[Mesa-dev] [PATCH] r600g: move sampler/ubo index registers before temp reg

2015-07-09 Thread Dave Airlie
From: Dave Airlie airl...@redhat.com temp_reg needs to be last, as we increment things away from it, otherwise on cayman some tests were overwriting the index regs. Fixes 2 piglit with ARB_gpu_shader5 forced on cayman. Signed-off-by: Dave Airlie airl...@redhat.com ---

[Mesa-dev] [PATCH 12/19] glsl/ir: add subroutine lowering pass (v2.1)

2015-07-09 Thread Dave Airlie
From: Dave Airlie airl...@redhat.com This lowers the enhanced ir_call using the lookaside table of subroutines into an if ladder. This initially was done at the AST level but it caused some ordering issues so a separate pass was required. v2: clone return value derefs. v2.1: update for

[Mesa-dev] [PATCH 18/19] st/mesa: add subroutine bits (v1.1)

2015-07-09 Thread Dave Airlie
From: Dave Airlie airl...@redhat.com Just add support for the subroutine type to the glsl-tgsi convertor. v1.1: add subroutine to int support. Signed-off-by: Dave Airlie airl...@redhat.com --- src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-)

[Mesa-dev] [PATCH 15/19] program_resource: add subroutine support

2015-07-09 Thread Dave Airlie
From: Dave Airlie airl...@redhat.com This fleshes out the ARB_program_query support for the APIs that ARB_shader_subroutine introduces, leaving some TODOs for later addition. Signed-off-by: Dave Airlie airl...@redhat.com --- src/mesa/main/shader_query.cpp | 46

[Mesa-dev] [PATCH 19/19] st/mesa: enable shader subroutine

2015-07-09 Thread Dave Airlie
From: Dave Airlie airl...@redhat.com I'm not sure if we shouldn't enable this everywhere and rip out the API checks, discuss, Signed-off-by: Dave Airlie airl...@redhat.com --- src/mesa/state_tracker/st_extensions.c | 1 + 1 file changed, 1 insertion(+) diff --git

[Mesa-dev] [PATCH 17/19] mesa: fill out the ARB_shader_subroutine APIs

2015-07-09 Thread Dave Airlie
From: Dave Airlie airl...@redhat.com This fleshes out the APIs, using the program resource APIs where they should match. It also sets the default values to valid subroutines. Signed-off-by: Dave Airlie airl...@redhat.com --- src/mesa/main/shaderapi.c | 457

[Mesa-dev] [PATCH 13/19] mesa/mtypes: add gl_subroutine_function and uniform storage to shader

2015-07-09 Thread Dave Airlie
From: Dave Airlie airl...@redhat.com This adds the necessary storage for subroutine info to gl_shader. Signed-off-by: Dave Airlie airl...@redhat.com --- src/mesa/main/mtypes.h | 15 +++ 1 file changed, 15 insertions(+) diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h

[Mesa-dev] [PATCH 14/19] glsl: add uniform and program resource support

2015-07-09 Thread Dave Airlie
From: Dave Airlie airl...@redhat.com This adds linker support for subroutine uniforms, they have some subtle differences from real uniforms, we also hide them and they are given internal uniform names. This also adds the subroutine locations and subroutine uniforms to the program resource

[Mesa-dev] [PATCH 07/19] glsl/types: add new subroutine type (v3)

2015-07-09 Thread Dave Airlie
From: Dave Airlie airl...@redhat.com This type will be used to store the name of subroutine types as in subroutine void myfunc(void); will store myfunc into a subroutine type. This is required to the parser can identify a subroutine type in a uniform decleration as a valid type, and also for

[Mesa-dev] ARB_shader_subroutine (again)

2015-07-09 Thread Dave Airlie
I've rebased this series, it's in my arb_shader_subroutine branch. I've also implemented Ken's idea for a subroutine-int conversion and put the changes into each patch that it affects. Otherwise not much different from when I last posted. Dave. ___

[Mesa-dev] [PATCH 08/19] mesa: add inline conversion functions for ARB_shader_subroutine

2015-07-09 Thread Dave Airlie
From: Dave Airlie airl...@redhat.com This handles converting the shader stages to the internal prefix along with the program resource interfaces. Signed-off-by: Dave Airlie airl...@redhat.com --- src/mesa/main/shaderobj.h | 84 +++ 1 file changed, 84

[Mesa-dev] [PATCH 04/19] mesa: Add glGet support for ARB_shader_subroutine implementation limits

2015-07-09 Thread Dave Airlie
From: Chris Forbes chr...@ijw.co.nz Reviewed-by: Tapani Pälli tapani.pa...@intel.com Reviewed-by: Kenneth Graunke kenn...@whitecape.org Signed-off-by: Chris Forbes chr...@ijw.co.nz Signed-off-by: Dave Airlie airl...@redhat.com --- src/mesa/main/config.h | 6 ++

[Mesa-dev] [PATCH 02/19] glapi: Add ARB_shader_subroutine functions and enums (v2)

2015-07-09 Thread Dave Airlie
From: Chris Forbes chr...@ijw.co.nz v2: fix output=true and LENGTH typo Reviewed-by: Tapani Pälli tapani.pa...@intel.com Reviewed-by: Kenneth Graunke kenn...@whitecape.org Signed-off-by: Chris Forbes chr...@ijw.co.nz Signed-off-by: Dave Airlie airl...@redhat.com ---

[Mesa-dev] [PATCH 11/19] glsl: add ast/parser support for subroutine parsing storage (v3.1)

2015-07-09 Thread Dave Airlie
From: Dave Airlie airl...@redhat.com This is the guts of the GLSL parser and AST support for shader subroutines. The code creates a subroutine type in the parser, and uses that there to validate the identifiers. The parser also distinguishes between subroutine types/function prototypes /uniforms

[Mesa-dev] [PATCH 06/19] glsl: Make `subroutine` a reserved keyword

2015-07-09 Thread Dave Airlie
From: Chris Forbes chr...@ijw.co.nz Reviewed-by: Tapani Pälli tapani.pa...@intel.com Reviewed-by: Kenneth Graunke kenn...@whitecape.org Signed-off-by: Chris Forbes chr...@ijw.co.nz Signed-off-by: Dave Airlie airl...@redhat.com --- src/glsl/glsl_lexer.ll | 2 +- 1 file changed, 1 insertion(+), 1

[Mesa-dev] [PATCH 03/19] mesa: Add extension tracking for arb_shader_subroutine (v2)

2015-07-09 Thread Dave Airlie
From: Chris Forbes chr...@ijw.co.nz v2: [airlied]: merge version check update. Reviewed-by: Tapani Pälli tapani.pa...@intel.com Reviewed-by: Kenneth Graunke kenn...@whitecape.org Signed-off-by: Chris Forbes chr...@ijw.co.nz Signed-off-by: Dave Airlie airl...@redhat.com ---

[Mesa-dev] [PATCH 09/19] glsl/ir: add subroutine information storage to ir_function (v1.1)

2015-07-09 Thread Dave Airlie
From: Dave Airlie airl...@redhat.com We need to store two sets of info into the ir_function, if this is a function definition with a subroutine list (subroutine_def) or if it a subroutine prototype. v1.1: add some more documentation. Signed-off-by: Dave Airlie airl...@redhat.com ---

[Mesa-dev] [PATCH 01/19] mesa: Add stubs for ARB_shader_subroutine entrypoints

2015-07-09 Thread Dave Airlie
From: Chris Forbes chr...@ijw.co.nz Reviewed-by: Tapani Pälli tapani.pa...@intel.com Reviewed-by: Kenneth Graunke kenn...@whitecape.org Signed-off-by: Chris Forbes chr...@ijw.co.nz Signed-off-by: Dave Airlie airl...@redhat.com --- src/mesa/main/shaderapi.c | 63

[Mesa-dev] [PATCH 05/19] glsl: Add extension plumbing and define for ARB_shader_subroutine

2015-07-09 Thread Dave Airlie
From: Chris Forbes chr...@ijw.co.nz Reviewed-by: Tapani Pälli tapani.pa...@intel.com Reviewed-by: Kenneth Graunke kenn...@whitecape.org Signed-off-by: Chris Forbes chr...@ijw.co.nz Signed-off-by: Dave Airlie airl...@redhat.com --- src/glsl/glcpp/glcpp-parse.y| 3 +++

[Mesa-dev] [PATCH 10/19] glsl/ir: allow ir_call to handle subroutine calling

2015-07-09 Thread Dave Airlie
From: Dave Airlie airl...@redhat.com This adds a ir_variable which contains the subroutine uniform and an array rvalue for the deref of that uniform, these are stored in the ir_call and lowered later. Signed-off-by: Dave Airlie airl...@redhat.com --- src/glsl/ir.h | 21 - 1

[Mesa-dev] [PATCH 16/19] program: add subroutine uniform support (v1.1)

2015-07-09 Thread Dave Airlie
From: Dave Airlie airl...@redhat.com Add support for the subroutine uniform type ir-mesa.cpp v1.1: add subroutine to int to switch Signed-off-by: Dave Airlie airl...@redhat.com --- src/mesa/program/ir_to_mesa.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git

Re: [Mesa-dev] [PATCH 0/4] fence refcnting fixes

2015-07-09 Thread Christian König
On 08.07.2015 22:34, Rob Clark wrote: From: Rob Clark robcl...@freedesktop.org This isn't at all clear for pipe driver writers currently, since it is not documented anywhere. But radeon/nouveau/llvmpipe seem to drop the ref on the **fence passed in to pipe-flush() (if *fence!=NULL).

Re: [Mesa-dev] [PATCH] r600g: move sampler/ubo index registers before temp reg

2015-07-09 Thread Glenn Kennard
On Thu, 09 Jul 2015 08:00:48 +0200, Dave Airlie airl...@gmail.com wrote: From: Dave Airlie airl...@redhat.com temp_reg needs to be last, as we increment things away from it, otherwise on cayman some tests were overwriting the index regs. Fixes 2 piglit with ARB_gpu_shader5 forced on cayman.

Re: [Mesa-dev] [PATCH 0/4] fence refcnting fixes

2015-07-09 Thread Rob Clark
On Thu, Jul 9, 2015 at 4:21 AM, Christian König deathsim...@vodafone.de wrote: On 08.07.2015 22:34, Rob Clark wrote: From: Rob Clark robcl...@freedesktop.org This isn't at all clear for pipe driver writers currently, since it is not documented anywhere. But radeon/nouveau/llvmpipe seem to

Re: [Mesa-dev] [PATCH 02/11] i915; remove unused driFd variable

2015-07-09 Thread Emil Velikov
On 8 July 2015 at 18:08, Matt Turner matts...@gmail.com wrote: On Wed, Jul 8, 2015 at 10:07 AM, Emil Velikov emil.l.veli...@gmail.com wrote: Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- src/mesa/drivers/dri/i915/intel_context.c | 1 - src/mesa/drivers/dri/i915/intel_context.h |

[Mesa-dev] New stable-branch 10.6 candidate pushed

2015-07-09 Thread Emil Velikov
Hello list, The candidate for the Mesa 10.6.2 is now available. Currently we have: - 37 queued - 26 nominated (outstanding) - and 2 rejected/obsolete patches We have a moderate list of fixes this time around, most of which in the glsl, core mesa, and the i965 nouveau. From a users

Re: [Mesa-dev] [PATCH 4/4] vc4: unref old fence

2015-07-09 Thread Emil Velikov
On 9 July 2015 at 01:46, Rob Clark robdcl...@gmail.com wrote: From: Rob Clark robcl...@freedesktop.org Some, but not all, state trackers will explicitly unref (and set to NULL) the previous *fence before calling pipe-flush(). So driver should use fence_ref() which will unref the old fence if

Re: [Mesa-dev] [PATCH] i965: bump libdrm requirement to 2.4.61 and drop in-tree workaround

2015-07-09 Thread Samuel Iglesias Gonsálvez
On 08/07/15 18:57, Emil Velikov wrote: Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- configure.ac | 2 +- src/mesa/drivers/dri/i965/intel_screen.c | 5 - 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac

Re: [Mesa-dev] [PATCH 03/11] radeon: remove dri_mirror state

2015-07-09 Thread Emil Velikov
On 9 July 2015 at 04:45, Michel Dänzer mic...@daenzer.net wrote: On 09.07.2015 02:07, Emil Velikov wrote: Most of the data stored(duplicated) was unused, and for the one that is follow the approach set by other drivers. This eliminates the use of legacy (dri1) types. The commentary below

Re: [Mesa-dev] [PATCH 03/11] radeon: remove dri_mirror state

2015-07-09 Thread Marek Olšák
major != 2 can't occur. You don't have to check the major version at all and you can just assume it's always 2. Marek On Thu, Jul 9, 2015 at 2:55 PM, Emil Velikov emil.l.veli...@gmail.com wrote: On 9 July 2015 at 04:45, Michel Dänzer mic...@daenzer.net wrote: On 09.07.2015 02:07, Emil Velikov

Re: [Mesa-dev] [RFC] loader: libudev vs sysfs vs libdrm

2015-07-09 Thread Emil Velikov
On 8 July 2015 at 18:35, Eric Anholt e...@anholt.net wrote: Emil Velikov emil.l.veli...@gmail.com writes: Hello all, A recent patch by Chris, fixing some libudev fun in our loader, made me think if we can clear it up a bit. Having three different ways of retrieving the vendor/device ID

Re: [Mesa-dev] [PATCH 19/19] st/mesa: enable shader subroutine

2015-07-09 Thread Roland Scheidegger
Should expose that only if hw has glsl 130 support? Roland Am 09.07.2015 um 09:17 schrieb Dave Airlie: From: Dave Airlie airl...@redhat.com I'm not sure if we shouldn't enable this everywhere and rip out the API checks, discuss, Signed-off-by: Dave Airlie airl...@redhat.com ---

[Mesa-dev] [PATCH v2] i965/fs: Don't use the pixel interpolater for centroid interpolation

2015-07-09 Thread Neil Roberts
For centroid interpolation we can just directly use the values set up in the shader payload instead of querying the pixel interpolator. To do this we need to modify brw_compute_barycentric_interp_modes to detect when interpolateAtCentroid is called. v2: Rebase on top of changes to set the pulls

Re: [Mesa-dev] [RFC] loader: libudev vs sysfs vs libdrm

2015-07-09 Thread Emil Velikov
On 8 July 2015 at 18:55, Axel Davy axel.d...@ens.fr wrote: On 08/07/2015 00:15, Emil Velikov wrote : Can anyone shed a light/cast their 2c ? Thanks Emil ___ The DRI3/Wayland/Gallium Nine DRI_PRIME path uses libudev, and I'm not sure it could

Re: [Mesa-dev] [PATCH 03/11] radeon: remove dri_mirror state

2015-07-09 Thread Emil Velikov
On 9 July 2015 at 14:16, Marek Olšák mar...@gmail.com wrote: major != 2 can't occur. You don't have to check the major version at all and you can just assume it's always 2. That's even better than expected. Thanks ! -Emil ___ mesa-dev mailing list

Re: [Mesa-dev] [PATCH 2/2] i965: Support importing R8 and GR88 dma_bufs

2015-07-09 Thread Emil Velikov
On 9 July 2015 at 09:39, Chad Versace chad.vers...@intel.com wrote: EGL_EXT_image_dma_buf_import now supports those formats. Do I have an old version of it (v6) or I simply cannot see those listed ? Thanks Emil ___ mesa-dev mailing list

Re: [Mesa-dev] [RFC] Compatibility between old dri modules and new loaders, and vice verse

2015-07-09 Thread Emil Velikov
On 30 June 2015 at 16:29, Emil Velikov emil.l.veli...@gmail.com wrote: On 22 June 2015 at 23:19, Dave Airlie airl...@gmail.com wrote: On 23 June 2015 at 08:16, Ian Romanick i...@freedesktop.org wrote: On 06/22/2015 11:54 AM, Dave Airlie wrote: As kindly hinted by Marek, currently we do have a

Re: [Mesa-dev] [PATCH] i965/fs: Reimplement nir_op_uadd_carry and _usub_borrow without accumulator.

2015-07-09 Thread Ilia Mirkin
FYI there's already a lowering pass that does this in the GLSL IR (CARRY_TO_ARITH in lower_instructions). Perhaps the right place to do this is NIR though, just wanted to let you know. On Thu, Jul 9, 2015 at 3:51 PM, Francisco Jerez curroje...@riseup.net wrote: This gets rid of two no16()

Re: [Mesa-dev] [RFC] gallium: add interface for writable shader images

2015-07-09 Thread Marek Olšák
I'd like to discuss one more thing that will affect whether image slots will be global (shared by all shaders) or not. Which image unit an image uniform uses is not a compile-time thing, but it's specified later using glUniform1i. That means we need a per-shader table that maps image uniforms to

Re: [Mesa-dev] [PATCH 09/19] glsl/ir: add subroutine information storage to ir_function (v1.1)

2015-07-09 Thread Chris Forbes
Do you really need is_subroutine_def ? It seems redundant with num_subroutine_types0. On Thu, Jul 9, 2015 at 7:17 PM, Dave Airlie airl...@gmail.com wrote: From: Dave Airlie airl...@redhat.com We need to store two sets of info into the ir_function, if this is a function definition with a

Re: [Mesa-dev] [RFC] loader: libudev vs sysfs vs libdrm

2015-07-09 Thread Emil Velikov
On 09/07/15 15:40, Axel Davy wrote: On 09/07/2015 15:33, Emil Velikov wrote : Yakes forgot about that one. From a quick look we can (I know it feels durty) use readlink( /sys/dev/char/$(major):$(minor)). Everything seems to be there - bus type and exact location of the device on the bus.

Re: [Mesa-dev] [RFC] gallium: add interface for writable shader images

2015-07-09 Thread Ilia Mirkin
On Thu, Jul 9, 2015 at 5:05 PM, Marek Olšák mar...@gmail.com wrote: I'd like to discuss one more thing that will affect whether image slots will be global (shared by all shaders) or not. Which image unit an image uniform uses is not a compile-time thing, but it's specified later using

[Mesa-dev] [PATCH 4/4] droi/common: remove unused drm_version variable

2015-07-09 Thread Emil Velikov
As of last commit the only user of it (radeon/r200) no longer uses it. As such let's remove it and cleanup the nasty hacks that we had in place to support this. Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- configure.ac| 21 -

[Mesa-dev] [PATCH v2] configure.ac: do not set HAVE_DRI(23) when libdrm is missing

2015-07-09 Thread Emil Velikov
These conditionals are used to guard both dri modules and loader(s). Currently if we try to build the gallium swrast dri module (without glx) on a system that's missing libdrm the build will fail. v2: Make sure we assign prior to checking the have_libdrm variable. Cc: 10.6

Re: [Mesa-dev] [PATCH 2/2] i965: Support importing R8 and GR88 dma_bufs

2015-07-09 Thread Emil Velikov
On 9 July 2015 at 21:21, Chad Versace chad.vers...@intel.com wrote: On Thu 09 Jul 2015, Emil Velikov wrote: On 9 July 2015 at 09:39, Chad Versace chad.vers...@intel.com wrote: EGL_EXT_image_dma_buf_import now supports those formats. Do I have an old version of it (v6) or I simply cannot see

Re: [Mesa-dev] [PATCH] i965/fs: Reimplement nir_op_uadd_carry and _usub_borrow without accumulator.

2015-07-09 Thread Francisco Jerez
Ilia Mirkin imir...@alum.mit.edu writes: FYI there's already a lowering pass that does this in the GLSL IR (CARRY_TO_ARITH in lower_instructions). Perhaps the right place to do this is NIR though, just wanted to let you know. Ah, I wasn't aware of that flag, that seems even better. I just

Re: [Mesa-dev] [PATCH 04/11] dri_interface: drop __NOT_HAVE_DRM_H magic

2015-07-09 Thread Emil Velikov
On 9 July 2015 at 18:50, Ian Romanick i...@freedesktop.org wrote: On 07/08/2015 10:07 AM, Emil Velikov wrote: Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- include/GL/internal/dri_interface.h | 11 --- 1 file changed, 11 deletions(-) diff --git

Re: [Mesa-dev] [PATCH 4/4] droi/common: remove unused drm_version variable

2015-07-09 Thread Emil Velikov
The title should obviously say dri/common: consider that fixed. Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [HACK] i965/fs: Fix rescale_texcoord() for SIMD16 and remove no16 fall-back.

2015-07-09 Thread Francisco Jerez
Aside from the trivial GRF underallocation problem in the devinfo-gen 6 is_rect if-block, the texrect scale uniform look-up code was assuming a one-to-one mapping between UNIFORM register indices and the param array, which only holds during the SIMD8 run. It seems dubious that this needs to

Re: [Mesa-dev] [HACK] i965/fs: Fix ordering of src0 alpha and oMask in the framebuffer write payload.

2015-07-09 Thread Jason Ekstrand
On Jul 9, 2015 7:57 AM, Francisco Jerez curroje...@riseup.net wrote: We were passing src0 alpha and oMask in reverse order. There seems to be no good way to pass them in the correct order to the new-style LOAD_PAYLOAD (how surprising) because src0 alpha is per-channel while oMask is not.

[Mesa-dev] [PATCH] i965/fs: Reimplement nir_op_uadd_carry and _usub_borrow without accumulator.

2015-07-09 Thread Francisco Jerez
This gets rid of two no16() fall-backs and should allow better scheduling of the generated IR. There are no uses of usubBorrow() or uaddCarry() in shader-db so no changes are expected. However the arb_gpu_shader5/execution/built-in-functions/fs-usubBorrow and

[Mesa-dev] [PATCH 3/4] radeon, r200: allow hyperz for radeon DRM module v2

2015-07-09 Thread Emil Velikov
The original code only half considered hyperz as an option. As per previous commit major != 2 cannot occur we can simply things, and allow users to set the option if they choose to do so. Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- src/mesa/drivers/dri/r200/r200_context.c | 10

[Mesa-dev] [PATCH 1/4] radeon, r200: remove unused variable texmicrotile

2015-07-09 Thread Emil Velikov
Dead since at least 2009 with commit ccf7814a315(radeon: major cleanups removing old dead codepaths.) Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- src/mesa/drivers/dri/r200/r200_context.c | 3 --- src/mesa/drivers/dri/r200/r200_context.h | 1 -

[Mesa-dev] [PATCH 2/4] radeon, r200: remove support for UMS radeon DRM module

2015-07-09 Thread Emil Velikov
As mentioned by Michel Dänzer FWIW though, any code which is specific to radeon DRM major version 1 can be removed, because that's the UMS major version. and Marek Olšák major != 2 can't occur. You don't have to check the major version at all and you can just assume it's always 2.

Re: [Mesa-dev] [PATCH 2/2] i965: Support importing R8 and GR88 dma_bufs

2015-07-09 Thread Chad Versace
On Thu 09 Jul 2015, Emil Velikov wrote: On 9 July 2015 at 09:39, Chad Versace chad.vers...@intel.com wrote: EGL_EXT_image_dma_buf_import now supports those formats. Do I have an old version of it (v6) or I simply cannot see those listed ? I should have been more clear when I said

[Mesa-dev] [PATCH] [v2] i965: Split out gen8 push constant state upload

2015-07-09 Thread Ben Widawsky
While implementing the workaround in the previous patch I noticed things were starting to get a bit messy. Since gen8 works differently enough from gen7, I thought splitting it out with be good. While here, get rid of gen8 MOCS which does nothing and was in the wrong place anyway. This patch is

[Mesa-dev] [Bug 66346] shader_query.cpp:49: error: invalid conversion from 'void*' to 'GLuint'

2015-07-09 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=66346 --- Comment #19 from José Fonseca jfons...@vmware.com --- (In reply to Vinson Lee from comment #18) mesa: 0166b4c165271bd7525a91049e58e390cb596c60 (master 10.7.0-devel) Still see this build error. BUILDING_MESA is only defined for darwin DRI

  1   2   >