Re: [Mesa-dev] [PATCH shader-db] run: Add separate shader objects support.

2015-09-17 Thread Tapani Pälli
On 09/17/2015 11:09 PM, Kenneth Graunke wrote: With this patch, if a .shader_test file contains [require] ... GL_ARB_separate_shader_objects then the shader will be compiled using glCreateShaderProgramv, and thus be a proper separate shader object. Drivers may choose to lay ou

Re: [Mesa-dev] [PATCH 1/2] nir: some comment fixups

2015-09-17 Thread Rob Clark
On Thu, Sep 17, 2015 at 8:57 PM, Ilia Mirkin wrote: > On Thu, Sep 17, 2015 at 8:48 PM, Rob Clark wrote: >> On Thu, Sep 17, 2015 at 8:35 PM, Dieter Nützel wrote: >>> Am 18.09.2015 02:27, schrieb Rob Clark: On Thu, Sep 17, 2015 at 8:03 PM, Timothy Arceri wrote: > > On Thu,

Re: [Mesa-dev] [PATCH 1/2] nir: some comment fixups

2015-09-17 Thread Ilia Mirkin
On Thu, Sep 17, 2015 at 8:48 PM, Rob Clark wrote: > On Thu, Sep 17, 2015 at 8:35 PM, Dieter Nützel wrote: >> Am 18.09.2015 02:27, schrieb Rob Clark: >>> >>> On Thu, Sep 17, 2015 at 8:03 PM, Timothy Arceri >>> wrote: On Thu, 2015-09-17 at 18:20 -0400, Rob Clark wrote: > - /** list

Re: [Mesa-dev] [PATCH 1/2] nir: some comment fixups

2015-09-17 Thread Rob Clark
On Thu, Sep 17, 2015 at 8:35 PM, Dieter Nützel wrote: > Am 18.09.2015 02:27, schrieb Rob Clark: >> >> On Thu, Sep 17, 2015 at 8:03 PM, Timothy Arceri >> wrote: >>> >>> On Thu, 2015-09-17 at 18:20 -0400, Rob Clark wrote: From: Rob Clark Signed-off-by: Rob Clark ---

Re: [Mesa-dev] [PATCH 1/2] nir: some comment fixups

2015-09-17 Thread Dieter Nützel
Am 18.09.2015 02:27, schrieb Rob Clark: On Thu, Sep 17, 2015 at 8:03 PM, Timothy Arceri wrote: On Thu, 2015-09-17 at 18:20 -0400, Rob Clark wrote: From: Rob Clark Signed-off-by: Rob Clark --- src/glsl/nir/nir.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/

Re: [Mesa-dev] [PATCH 1/2] nir: some comment fixups

2015-09-17 Thread Rob Clark
On Thu, Sep 17, 2015 at 8:03 PM, Timothy Arceri wrote: > On Thu, 2015-09-17 at 18:20 -0400, Rob Clark wrote: >> From: Rob Clark >> >> Signed-off-by: Rob Clark >> --- >> src/glsl/nir/nir.h | 10 +- >> 1 file changed, 5 insertions(+), 5 deletions(-) >> >> diff --git a/src/glsl/nir/nir.h b

Re: [Mesa-dev] [PATCH 1/2] nir: some comment fixups

2015-09-17 Thread Timothy Arceri
On Thu, 2015-09-17 at 18:20 -0400, Rob Clark wrote: > From: Rob Clark > > Signed-off-by: Rob Clark > --- > src/glsl/nir/nir.h | 10 +- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/src/glsl/nir/nir.h b/src/glsl/nir/nir.h > index 297858a..9d8c3f4 100644 > --- a/src/

Re: [Mesa-dev] [PATCH 3/3] nir: rename nir_lower_samplers.c{pp,}

2015-09-17 Thread Timothy Arceri
On Thu, 2015-09-17 at 16:25 +0100, Emil Velikov wrote: > With the only C++ function having it's own wrapper we can 'demote' > this > file to a normal C one. This allows us to get rid of extern C { > support C99 designated initializers in CPP code. > > This may cause build issue due to the missing

[Mesa-dev] [PATCH 2/2] nir/print: print variable names

2015-09-17 Thread Rob Clark
From: Rob Clark Signed-off-by: Rob Clark --- src/glsl/nir/nir_print.c | 30 ++ 1 file changed, 30 insertions(+) diff --git a/src/glsl/nir/nir_print.c b/src/glsl/nir/nir_print.c index ca8059f..6e86140 100644 --- a/src/glsl/nir/nir_print.c +++ b/src/glsl/nir/nir_print

[Mesa-dev] [PATCH 1/2] nir: some comment fixups

2015-09-17 Thread Rob Clark
From: Rob Clark Signed-off-by: Rob Clark --- src/glsl/nir/nir.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/glsl/nir/nir.h b/src/glsl/nir/nir.h index 297858a..9d8c3f4 100644 --- a/src/glsl/nir/nir.h +++ b/src/glsl/nir/nir.h @@ -1451,13 +1451,13 @@ typedef

Re: [Mesa-dev] mesa: Reduce libGL.so binary size by about 15%

2015-09-17 Thread Arlie Davis
Ok, here's v2 of the change, with the suggested edits. From 5f393faa058f453408dfc640eecae3fe6335dfed Mon Sep 17 00:00:00 2001 From: Arlie Davis Date: Tue, 15 Sep 2015 09:58:34 -0700 Subject: [PATCH] This patch significantly reduces the size of the libGL.so binary. It does not change the (extern

[Mesa-dev] Is there a way to enable shared glapi with scons?

2015-09-17 Thread Yuzhu Lu
I need to build the mangled osmesa for Windows with shared glapi enabled, otherwise functions like glCreateShader will not work(yes, this is a bug.) But I can not find any setting to do that with scons. There is a experimental option gles=yes which will force the shared glapi. But I get build er

[Mesa-dev] [PATCH 2/2] clover: implement clCreateImage?D w/ clCreateImage

2015-09-17 Thread Serge Martin
remplace clCreateImage2D and clCreateImage3D implementation with call to clCreateImage --- src/gallium/state_trackers/clover/api/memory.cpp | 92 +--- 1 file changed, 32 insertions(+), 60 deletions(-) diff --git a/src/gallium/state_trackers/clover/api/memory.cpp b/src/gallium

[Mesa-dev] [PATCH 1/2] clover: implement clCreateImage

2015-09-17 Thread Serge Martin
--- src/gallium/state_trackers/clover/api/memory.cpp | 117 +-- 1 file changed, 107 insertions(+), 10 deletions(-) diff --git a/src/gallium/state_trackers/clover/api/memory.cpp b/src/gallium/state_trackers/clover/api/memory.cpp index 1efb95b..6e95931 100644 --- a/src/gallium/

[Mesa-dev] [PATCH shader-db] run: Add separate shader objects support.

2015-09-17 Thread Kenneth Graunke
With this patch, if a .shader_test file contains [require] ... GL_ARB_separate_shader_objects then the shader will be compiled using glCreateShaderProgramv, and thus be a proper separate shader object. Drivers may choose to lay out the inputs/outputs of SSO programs slightly differen

Re: [Mesa-dev] mesa: Reduce libGL.so binary size by about 15%

2015-09-17 Thread Matt Turner
On Wed, Sep 16, 2015 at 9:42 AM, Arlie Davis wrote: > The null check is safe to remove, for two reasons. First, we're allocating > with calloc, so we know for sure that the entire structure is zero-filled. > Second, we're assigning every byte of the table, so we don't even need to > rely on zero-

Re: [Mesa-dev] [PATCH 3/3] nir: rename nir_lower_samplers.c{pp,}

2015-09-17 Thread Gottfried Haider
Patches 1-3 Tested-by: Gottfried Haider Thanks! On Thu, Sep 17, 2015 at 5:25 PM, Emil Velikov wrote: > With the only C++ function having it's own wrapper we can 'demote' this > file to a normal C one. This allows us to get rid of extern C { > support C99 designated initializers in CPP code. > >

[Mesa-dev] [PATCH 2/2] freedreno/ir3: use nir two-sided-color lowering

2015-09-17 Thread Rob Clark
From: Rob Clark With this, we completely switch over to nir lowering passes instead of tgsi_lowering. So one step closer to supporting direct glsl or spirv to nir support for freedreno a3xx/a4xx. Signed-off-by: Rob Clark --- .../drivers/freedreno/ir3/ir3_compiler_nir.c | 24 +++-

[Mesa-dev] [PATCH 1/2] nir: add two-sided-color lowering pass

2015-09-17 Thread Rob Clark
From: Rob Clark Signed-off-by: Rob Clark --- src/glsl/Makefile.sources| 1 + src/glsl/nir/nir.h | 2 + src/glsl/nir/nir_lower_two_sided_color.c | 209 +++ 3 files changed, 212 insertions(+) create mode 100644 src/glsl/nir/ni

Re: [Mesa-dev] [PATCH 0/6] Updated nir texture lowering

2015-09-17 Thread Rob Clark
On Thu, Sep 17, 2015 at 3:15 PM, Eric Anholt wrote: > Rob Clark writes: > >> From: Rob Clark >> >> Update of the patchset sent yesterday: >> 1) rename to nir_lower_tex since it is no longer just lowering >>projector >> 2) split configuration options out into nir_lower_tex_options >> 3) add R

Re: [Mesa-dev] [PATCH 0/6] Updated nir texture lowering

2015-09-17 Thread Eric Anholt
Rob Clark writes: > From: Rob Clark > > Update of the patchset sent yesterday: > 1) rename to nir_lower_tex since it is no longer just lowering >projector > 2) split configuration options out into nir_lower_tex_options > 3) add RECT lowering (also needed to get coord clamp working >prope

Re: [Mesa-dev] [PATCH] vc4: Try to pair up instructions when only one of them has PM bit

2015-09-17 Thread Eric Anholt
Boyan Ding writes: > 2015-08-30 15:07 GMT+08:00 Boyan Ding : >> Instructions with difference in PM field can actually be paired up if >> the one without PM doesn't do packing/unpacking and non-NOP >> packing/unpacking operations from PM instruction aren't added to the >> other without PM. >> >> t

[Mesa-dev] [PATCH 1/2] i965/vec4: Change types as needed to propagate source modifiers using current instruction

2015-09-17 Thread Alejandro Piñeiro
SEL and MOV instructions, as long as they don't have source modifiers, are just copying bits around. So those kind of instruction could be propagated even if there are type mismatches. This is needed because NIR generates integer SEL and MOV instructions whenever it doesn't know what else to gener

[Mesa-dev] [PATCH 2/2] i965/vec4: Change types as needed to propagate source modifiers using from instruction

2015-09-17 Thread Alejandro Piñeiro
SEL and MOV instructions, as long as they don't have source modifiers, are just copying bits around. So those kind of instruction could be propagated even if there are type mismatches. This is needed because NIR generates integer SEL and MOV instructions whenever it doesn't know what else to gener

Re: [Mesa-dev] [PATCH] mesa: fix errors when reading depth with glReadPixels

2015-09-17 Thread Anuj Phogat
On Thu, Sep 17, 2015 at 3:28 AM, Tapani Pälli wrote: > OpenGL ES 3.0 spec 3.7.2 "Transfer of Pixel Rectangles" specifies > DEPTH_COMPONENT, UNSIGNED_INT as a valid couple, validation for > internal format is checked by is_float_depth(). > > Fix regression caused by 81d2fd91a90e5b2fd9fd74792a7a7c3

[Mesa-dev] [PATCH v2] nv50, nvc0: detect underlying resource changes and update tic

2015-09-17 Thread Ilia Mirkin
When updating texture buffers, we might end up replacing the whole buffer. Check that the tic address matches the resource address, and if not, update the tic and reupload it. This fixes: arb_direct_state_access-texture-buffer arb_texture_buffer_object-data-sync Signed-off-by: Ilia Mirkin Cc

Re: [Mesa-dev] [PATCH v4 0/6] nouveau: add support for vaapi

2015-09-17 Thread Ilia Mirkin
On Wed, Sep 16, 2015 at 8:22 AM, Julien Isorce wrote: > I added below version4 updates. It works for all codecs expect h264. > Video is visible but lot of blockiness. > Can someone with a Radeon confirm that "LIBVA_DRIVER_NAME=gallium mpv > --hwdec=vaapi" > is working on h264 videos ? > I want to

[Mesa-dev] [PATCH 05/12] i965/vec4/skl+: Use lcd2dms_w instead of lcd2dms

2015-09-17 Thread Neil Roberts
In order to support 16x MSAA, skl+ has a wider version of lcd2dms that takes two parameters for the MCS data. The MCS data in the response still fits in a single register so we just need to ensure we copy both values rather than just the lower one. --- src/mesa/drivers/dri/i965/brw_vec4.cpp

[Mesa-dev] [PATCH 08/12] i965: Support allocating the MCS buffer for 16x MSAA

2015-09-17 Thread Neil Roberts
When 16 samples are used the MCS buffer needs 64 bits per pixel. --- src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c index 0cb0632..9faafb4 100644

[Mesa-dev] [PATCH 12/12] i965/skl+: Enable support for 16x multisampling

2015-09-17 Thread Neil Roberts
--- src/mesa/drivers/dri/i965/brw_context.c | 6 ++ src/mesa/drivers/dri/i965/intel_screen.c | 5 - 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c index 7c1c133..c05fb74 100644 --- a/src/mes

[Mesa-dev] [PATCH 07/12] i965: Support calculating the bits needed to set up 16x MSAA

2015-09-17 Thread Neil Roberts
The gen7_surface_msaa_bits function already returns the right values for 16 samples but it just needs its assert to be relaxed. --- src/mesa/drivers/dri/i965/gen7_wm_surface_state.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/gen7_wm_surface_state.

[Mesa-dev] [PATCH 09/12] i965/fs/skl+: Fix calculating gl_SampleID for 16x MSAA

2015-09-17 Thread Neil Roberts
In order to accomodate 16x MSAA, the starting sample pair index is now 3 bits rather than 2 on SKL+. --- src/mesa/drivers/dri/i965/brw_fs.cpp | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp ind

[Mesa-dev] [PATCH 06/12] i965/fs: Add a sampler program key for whether the texture is 16x MSAA

2015-09-17 Thread Neil Roberts
When 16x MSAA is used for sampling with texelFetch the compiler needs to use a different instruction which passes more arguments for the MCS data. Previously on skl+ it was unconditionally using this new instruction. However since 16x MSAA is probably going to be pretty rare, it is probably worthwh

[Mesa-dev] [PATCH 10/12] i965/meta: Support 16x MSAA in the meta stencil blit

2015-09-17 Thread Neil Roberts
The destination rectangle is now drawn at 4x4 the size and the shader code to calculate the sample number is adjusted accordingly. --- src/mesa/drivers/dri/i965/brw_meta_stencil_blit.c | 22 +- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/src/mesa/drivers/dri/

[Mesa-dev] [PATCH 11/12] meta: Support 16x MSAA in the multisample scaled blit shader

2015-09-17 Thread Neil Roberts
I'm not too sure about the expression used to index into sample_map in the shader. It looks like if fract(coord.x) and fract(coord.y) are close to 1.0 then it would index outside of the array. However the code for 4 and 8 has the same problem and the results seems to look reasonable. It might make

[Mesa-dev] [PATCH 04/12] i965/fs/skl+: Use lcd2dms_w instead of lcd2dms

2015-09-17 Thread Neil Roberts
In order to support 16x MSAA, skl+ has a wider version of lcd2dms that takes two parameters for the MCS data. This patch makes it allocate a register that is twice as big for the MCS data and then always use the wider version. --- src/mesa/drivers/dri/i965/brw_defines.h| 4 src/mesa/

[Mesa-dev] [PATCH 03/12] i965/fs: Disable SIMD16 when a sampler message would be too long

2015-09-17 Thread Neil Roberts
The maximum message length for a send message is 11. Some of the sampler message types have more than 5 arguments which means when they are doubled to accomodate the SIMD16 register size then the message is too long. This is important for the ld2dms_w message which will be used in a later patch bec

[Mesa-dev] [PATCH 02/12] i965: Program 16x MSAA sample positions.

2015-09-17 Thread Neil Roberts
This is the standard pattern used by the other 3D graphics API. BDW has slots for these values, but they aren't actually used until SKL. Even though the documentation for BDW says they must be zero, it doesn't seem to cause any harm to program them anyway. The comment above for the 8x sample posi

[Mesa-dev] [PATCH 01/12] i965: Handle 16x MSAA in IMS dimension munging code.

2015-09-17 Thread Neil Roberts
From: Kenneth Graunke Signed-off-by: Kenneth Graunke Reviewed-by: Neil Roberts --- src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_t

[Mesa-dev] [PATCH 00/12] i965: Add support for 16x MSAA on SKL+

2015-09-17 Thread Neil Roberts
I ran the series through Piglit but there are some issues. The texelFetch test appears to be broken for sample counts > 10 and needs this patch to work: http://patchwork.freedesktop.org/patch/59485/ The accuracy tests are failing but I think the problem is just that it is too strict. I've writte

Re: [Mesa-dev] [PATCH 4/6] nir/lower_tex: support for lowering RECT textures

2015-09-17 Thread Ilia Mirkin
On Thu, Sep 17, 2015 at 8:48 AM, Rob Clark wrote: > From: Rob Clark > > Signed-off-by: Rob Clark > --- > src/glsl/nir/nir.h | 7 + > src/glsl/nir/nir_lower_tex.c | 66 > ++-- > 2 files changed, 70 insertions(+), 3 deletions(-) > > diff --g

Re: [Mesa-dev] mesa-10.6: LLVM/Clang v3.7 fixes (gallivm)

2015-09-17 Thread Sedat Dilek
On Thu, Sep 10, 2015 at 4:18 PM, Emil Velikov wrote: > On 4 September 2015 at 19:57, Sedat Dilek wrote: >> Hi, >> >> I compiled a toolchain based on LLVM/Clang v3.7.0 today and tested it >> with an updated version of my Linux Graphics driver stack (see >> attached logs). >> >> Here on Ubuntu/prec

[Mesa-dev] [PATCH v4 1/6] nouveau: split nouveau_vp3_bsp in begin/next/end

2015-09-17 Thread Julien Isorce
It allows to call nouveau_vp3_bsp_next multiple times between one begin/end. It is required to support st/va. https://bugs.freedesktop.org/show_bug.cgi?id=89969 Signed-off-by: Julien Isorce --- src/gallium/drivers/nouveau/nouveau_vp3_video.h| 16 +++- .../drivers/nouveau/nouveau_vp3_video_

Re: [Mesa-dev] Compile error in nir/nir_builder.h in current head

2015-09-17 Thread Gottfried Haider
> Or maybe this is enough? Yes, that seems to make the trick for me. Thanks! ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [PATCH v4 2/6] nvc0: add support for st/va

2015-09-17 Thread Julien Isorce
- split nvc0_decoder_bsp in begin/next/end - preserve content buffer when calling nvc0_decoder_bsp_next - implement pipe_video_codec::begin_frame/end_frame https://bugs.freedesktop.org/show_bug.cgi?id=89969 Signed-off-by: Julien Isorce --- src/gallium/drivers/nouveau/nouveau_vp3_video.h|

[Mesa-dev] LLVM 3.7 / Mesa 11.0.0 on Windows

2015-09-17 Thread Florian Link
Hi, I tried to build Mesa 11.0.0 llvmpipe on Windows using LLVM 3.7. I had to patch the "scons/llvm.py" file and add 'LLVMInstrumentation' to the libraries to be linked. Can someone please add that to llvm.py? Appart from this change, it seems to work fine. best regards, Florian -- --

[Mesa-dev] [PATCH v4 4/6] st/va: properly set max number of ref frames

2015-09-17 Thread Julien Isorce
It fixes asserts like assert(templ->max_references <= 2); in nvc0_video.c::nvc0_create_decoder Signed-off-by: Julien Isorce --- src/gallium/state_trackers/va/context.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gallium/state_trackers/va/context.c b/src/gallium

[Mesa-dev] [PATCH v4 5/6] build: enable st/va with nouveau driver

2015-09-17 Thread Julien Isorce
vainfo fails in vaDriverInit because "dd_create_screen" does not reach strcmp(driver_name, "nouveau") code. Indeed when compiling the va target.c, the macro GALLIUM_NOUVEAU is not defined. This patch define the macro the same it is done for dri and vdpau targets. Tested with: ./autogen.sh --enable

[Mesa-dev] [PATCH v4 3/6] nouveau: fix chunk decoding by updating number of slices

2015-09-17 Thread Julien Isorce
https://bugs.freedesktop.org/show_bug.cgi?id=89969 Signed-off-by: Julien Isorce --- src/gallium/drivers/nouveau/nouveau_vp3_video.h | 3 +++ src/gallium/drivers/nouveau/nouveau_vp3_video_bsp.c | 17 +++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/galliu

[Mesa-dev] [PATCH v4 0/6] nouveau: add support for vaapi

2015-09-17 Thread Julien Isorce
I added below version4 updates. It works for all codecs expect h264. Video is visible but lot of blockiness. Can someone with a Radeon confirm that "LIBVA_DRIVER_NAME=gallium mpv --hwdec=vaapi" is working on h264 videos ? I want to make sure it is not a bug in st/va. v4: Update caps after number

[Mesa-dev] [PATCH v4 0/6] nouveau: add support for vaapi

2015-09-17 Thread Julien Isorce
*** BLURB HERE *** Julien Isorce (6): nouveau: split nouveau_vp3_bsp in begin/next/end nvc0: add support for st/va nouveau: fix chunk decoding by updating number of slices st/va: properly set max number of ref frames build: enable st/va with nouveau driver WIP: implement vaapi export /

Re: [Mesa-dev] Compile error in nir/nir_builder.h in current head

2015-09-17 Thread Emil Velikov
On 17 September 2015 at 14:34, Rob Clark wrote: > On Thu, Sep 17, 2015 at 9:27 AM, Emil Velikov > wrote: >> Hi Gottfried, >> >> On 17 September 2015 at 13:42, Gottfried Haider >> wrote: >>> I am getting this error on 7e286506 - comping mesa used to work fine >>> on this system a couple of weeks

[Mesa-dev] [PATCH 1/3] nir: move stdio.h inclusion before extern C

2015-09-17 Thread Emil Velikov
Cc: Gottfried Haider Signed-off-by: Emil Velikov --- src/glsl/nir/nir_types.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/glsl/nir/nir_types.h b/src/glsl/nir/nir_types.h index a8ff8f2..bf2faf4 100644 --- a/src/glsl/nir/nir_types.h +++ b/src/glsl/nir/nir_types.h @@

[Mesa-dev] [PATCH 2/3] nir: add C wrapper around glsl_type::record_location_offset

2015-09-17 Thread Emil Velikov
This will allow us to convert nir_lower_sampler.cpp to C. Cc: Gottfried Haider Signed-off-by: Emil Velikov --- src/glsl/nir/nir_types.cpp | 7 +++ src/glsl/nir/nir_types.h | 2 ++ 2 files changed, 9 insertions(+) diff --git a/src/glsl/nir/nir_types.cpp b/src/glsl/nir/nir_types.cpp index

[Mesa-dev] [PATCH 3/3] nir: rename nir_lower_samplers.c{pp,}

2015-09-17 Thread Emil Velikov
With the only C++ function having it's own wrapper we can 'demote' this file to a normal C one. This allows us to get rid of extern C { support C99 designated initializers in CPP code. This may cause build issue due to the missing dependency. If doing incremental build run the following: sed -i -

Re: [Mesa-dev] [PATCH v2 4/4] i965/vec4: Use nir_move_vec_src_uses_to_dest

2015-09-17 Thread Jason Ekstrand
On Thu, Sep 17, 2015 at 1:09 AM, Eduardo Lima Mitev wrote: > On 09/15/2015 10:44 PM, Jason Ekstrand wrote: >> The idea here is not that it gives register coalescing a little bit of a >> helping hand. It doesn't actually fix the coalescing problems, but it >> seems to help a good bit. >> >> Shader

Re: [Mesa-dev] [PATCH 2/4] nir/lower_tex_proj: add support projector lowering per sampler type

2015-09-17 Thread Eric Anholt
Rob Clark writes: > From: Rob Clark > > Some hardware, such as adreno a3xx, supports txp on some but not all > sampler types. In this case we want more fine grained control over > which texture projectors get lowered. In the subject, s/add // signature.asc Description: PGP signature

Re: [Mesa-dev] Compile error in nir/nir_builder.h in current head

2015-09-17 Thread Erik Faye-Lund
On Thu, Sep 17, 2015 at 3:27 PM, Emil Velikov wrote: > Hi Gottfried, > > On 17 September 2015 at 13:42, Gottfried Haider > wrote: >> I am getting this error on 7e286506 - comping mesa used to work fine >> on this system a couple of weeks ago >> >> CXXnir/nir_lower_samplers.lo >> CC ni

Re: [Mesa-dev] Compile error in nir/nir_builder.h in current head

2015-09-17 Thread Rob Clark
On Thu, Sep 17, 2015 at 9:27 AM, Emil Velikov wrote: > Hi Gottfried, > > On 17 September 2015 at 13:42, Gottfried Haider > wrote: >> I am getting this error on 7e286506 - comping mesa used to work fine >> on this system a couple of weeks ago >> >> CXXnir/nir_lower_samplers.lo >> CC ni

Re: [Mesa-dev] Compile error in nir/nir_builder.h in current head

2015-09-17 Thread Emil Velikov
Hi Gottfried, On 17 September 2015 at 13:42, Gottfried Haider wrote: > I am getting this error on 7e286506 - comping mesa used to work fine > on this system a couple of weeks ago > > CXXnir/nir_lower_samplers.lo > CC nir/nir_lower_system_values.lo > In file included from nir/nir_lower

[Mesa-dev] [PATCH 5/6] nir/lower_tex: add support to clamp texture coords

2015-09-17 Thread Rob Clark
From: Rob Clark Some hardware needs to clamp texture coordinates to [0.0, 1.0] in the shader to emulate GL_CLAMP. This is added to lower_tex_proj since, in the case of projected coords, the clamping needs to happen *after* projection. Signed-off-by: Rob Clark --- src/glsl/nir/nir.h

[Mesa-dev] [PATCH 2/6] nir/lower_tex: split out project_src() helper

2015-09-17 Thread Rob Clark
From: Rob Clark Split this out to reduce noise in later patches. Signed-off-by: Rob Clark --- src/glsl/nir/nir_lower_tex.c | 146 +++ 1 file changed, 77 insertions(+), 69 deletions(-) diff --git a/src/glsl/nir/nir_lower_tex.c b/src/glsl/nir/nir_lower_te

[Mesa-dev] [PATCH 1/6] nir: rename nir_lower_tex_projector

2015-09-17 Thread Rob Clark
From: Rob Clark Since the following patches will add additional tex-lowering related functionality, which doesn't make sense to split out into a separate pass (as they would require duplication of the projector lowering logic), let's give this pass a more generic name. Signed-off-by: Rob Clark

[Mesa-dev] [PATCH 3/6] nir/lower_tex: add support projector lowering per sampler type

2015-09-17 Thread Rob Clark
From: Rob Clark Some hardware, such as adreno a3xx, supports txp on some but not all sampler types. In this case we want more fine grained control over which texture projectors get lowered. v2: split out nir_lower_tex_options struct to make it easier to add the additional parameters coming in t

[Mesa-dev] [PATCH 4/6] nir/lower_tex: support for lowering RECT textures

2015-09-17 Thread Rob Clark
From: Rob Clark Signed-off-by: Rob Clark --- src/glsl/nir/nir.h | 7 + src/glsl/nir/nir_lower_tex.c | 66 ++-- 2 files changed, 70 insertions(+), 3 deletions(-) diff --git a/src/glsl/nir/nir.h b/src/glsl/nir/nir.h index 04dfc97..a40dbae 10

[Mesa-dev] [PATCH 0/6] Updated nir texture lowering

2015-09-17 Thread Rob Clark
From: Rob Clark Update of the patchset sent yesterday: 1) rename to nir_lower_tex since it is no longer just lowering projector 2) split configuration options out into nir_lower_tex_options 3) add RECT lowering (also needed to get coord clamp working properly for RECT textures Rob Clark (6

[Mesa-dev] [PATCH 6/6] freedreno/ir3: lower txp/clamp in NIR

2015-09-17 Thread Rob Clark
From: Rob Clark Signed-off-by: Rob Clark --- src/gallium/drivers/freedreno/a3xx/fd3_texture.c | 8 +++- src/gallium/drivers/freedreno/a4xx/fd4_texture.c | 8 +++- .../drivers/freedreno/ir3/ir3_compiler_nir.c | 56 -- 3 files changed, 44 insertions(+), 28 deletion

[Mesa-dev] Compile error in nir/nir_builder.h in current head

2015-09-17 Thread Gottfried Haider
I am getting this error on 7e286506 - comping mesa used to work fine on this system a couple of weeks ago CXXnir/nir_lower_samplers.lo CC nir/nir_lower_system_values.lo In file included from nir/nir_lower_samplers.cpp:27:0: nir/nir_builder.h: In function 'nir_ssa_def* nir_imm_float(nir

[Mesa-dev] [PATCH] st/xa: Fixups for PIPE_FORMAT_R8_UNORM A8 usage v2.

2015-09-17 Thread Thomas Hellstrom
Check for PIPE_FORMAT_R8_UNORM when setting up the copy shader. Also re-enable the dest alpha blending with A8 destination that actually turned out to be correct. Verified using rendercheck that the composite operators overreverse, in, out, atop, atopreverse and xor seem to work fine with a8 desti

Re: [Mesa-dev] [PATCH] i965: fix textureGrad for cubemaps

2015-09-17 Thread Tapani Pälli
On 09/17/2015 02:10 PM, Iago Toral wrote: Hi Tapani, Kevin, awesome work! I was curious about how to fix this, at least when I was looking at the specs for this stuff it was not obvious that the Math involved for this was so different, I only recall seeing the reference that texure coordinates

[Mesa-dev] [PATCH] st/xa: Fixups for PIPE_FORMAT_R8_UNORM A8 usage

2015-09-17 Thread Thomas Hellstrom
Check for PIPE_FORMAT_R8_UNORM when setting up the copy shader. Also re-enable the dest alpha blending with A8 destination that actually turned out to be correct. Verified using rendercheck that the composite operators overreverse, in, out, atop, atopreverse and xor seem to work fine with a8 desti

Re: [Mesa-dev] [PATCH] st/xa: Use PIPE_FORMAT_R8_UNORM when available

2015-09-17 Thread Jose Fonseca
On 17/09/15 10:58, Thomas Hellstrom wrote: On 09/17/2015 11:53 AM, Thomas Hellstrom wrote: On 09/17/2015 11:34 AM, Jose Fonseca wrote: On 16/09/15 14:04, Thomas Hellstrom wrote: XA has been using L8_UNORM for a8 and yuv component surfaces. This commit instead makes XA prefer R8_UNORM since it'

Re: [Mesa-dev] [PATCH] mesa: Fix texture compression on big-endian systems

2015-09-17 Thread Dave Airlie
On 16 September 2015 at 21:14, Oded Gabbay wrote: > On Tue, Sep 15, 2015 at 4:23 PM, Ulrich Weigand wrote: >> >> Various pieces of code to create compressed textures will first >> generate an uncompressed RGBA texture into a temporary buffer, >> and then read from that buffer while creating the f

Re: [Mesa-dev] [RFC 0/3] i965: Enable up to 24 MRF registers in gen6

2015-09-17 Thread Iago Toral
On Wed, 2015-09-16 at 12:32 -0700, Kenneth Graunke wrote: > On Wednesday, September 16, 2015 11:17:53 AM Iago Toral Quiroga wrote: > > It seems that we have some bugs where we fail to compile shaders in gen6 > > because we do not having enough MRF registers available (see bugs 86469 and > > 90631 f

Re: [Mesa-dev] [PATCH] i965: fix textureGrad for cubemaps

2015-09-17 Thread Iago Toral
Hi Tapani, Kevin, awesome work! I was curious about how to fix this, at least when I was looking at the specs for this stuff it was not obvious that the Math involved for this was so different, I only recall seeing the reference that texure coordinates had to be normalized to a [-1, 1] space after

[Mesa-dev] [PATCH] mesa: fix errors when reading depth with glReadPixels

2015-09-17 Thread Tapani Pälli
OpenGL ES 3.0 spec 3.7.2 "Transfer of Pixel Rectangles" specifies DEPTH_COMPONENT, UNSIGNED_INT as a valid couple, validation for internal format is checked by is_float_depth(). Fix regression caused by 81d2fd91a90e5b2fd9fd74792a7a7c329f0e4d29 in: ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixel

Re: [Mesa-dev] [PATCH 22/24] glsl: Allow arrays of arrays in GLSL ES 3.10 and GLSL 4.30

2015-09-17 Thread Lofstedt, Marta
Reviewed-by: Marta Lofstedt > -Original Message- > From: mesa-dev [mailto:mesa-dev-boun...@lists.freedesktop.org] On > Behalf Of Timothy Arceri > Sent: Thursday, September 17, 2015 9:03 AM > To: mesa-dev@lists.freedesktop.org > Subject: [Mesa-dev] [PATCH 22/24] glsl: Allow arrays of arra

[Mesa-dev] [Bug 92022] st/va: add initial support for Video Post Processing and Export/Import of VaSurface

2015-09-17 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=92022 Frederic Romagne changed: What|Removed |Added CC||frederic.roma...@gmail.com -- You ar

Re: [Mesa-dev] [PATCH] st/xa: Use PIPE_FORMAT_R8_UNORM when available

2015-09-17 Thread Thomas Hellstrom
On 09/17/2015 11:53 AM, Thomas Hellstrom wrote: > On 09/17/2015 11:34 AM, Jose Fonseca wrote: >> On 16/09/15 14:04, Thomas Hellstrom wrote: >>> XA has been using L8_UNORM for a8 and yuv component surfaces. >>> This commit instead makes XA prefer R8_UNORM since it's assumed to >>> have a >>> higher

Re: [Mesa-dev] [PATCH] st/xa: Use PIPE_FORMAT_R8_UNORM when available

2015-09-17 Thread Thomas Hellstrom
On 09/17/2015 11:34 AM, Jose Fonseca wrote: > On 16/09/15 14:04, Thomas Hellstrom wrote: >> XA has been using L8_UNORM for a8 and yuv component surfaces. >> This commit instead makes XA prefer R8_UNORM since it's assumed to >> have a >> higher availability. >> >> Also neither of these formats are s

Re: [Mesa-dev] [PATCH] st/xa: Use PIPE_FORMAT_R8_UNORM when available

2015-09-17 Thread Jose Fonseca
On 16/09/15 14:04, Thomas Hellstrom wrote: XA has been using L8_UNORM for a8 and yuv component surfaces. This commit instead makes XA prefer R8_UNORM since it's assumed to have a higher availability. Also neither of these formats are suitable as destination formats using destination alpha blendi

Re: [Mesa-dev] [PATCH] Revert "mesa/extensions: restrict GL_OES_EGL_image to GLES"

2015-09-17 Thread Erik Faye-Lund
On Thu, Sep 17, 2015 at 11:15 AM, Erik Faye-Lund wrote: > On Wed, Sep 16, 2015 at 11:00 PM, Dave Airlie wrote: >> This reverts commit 48961fa3ba37999a6f8fd812458b735e39604a95. > >> I also don't have a copy of this patch in my mail archive, which >> seems wierd, did it get posted to mesa-dev? > >

Re: [Mesa-dev] [PATCH] Revert "mesa/extensions: restrict GL_OES_EGL_image to GLES"

2015-09-17 Thread Erik Faye-Lund
On Wed, Sep 16, 2015 at 11:00 PM, Dave Airlie wrote: > This reverts commit 48961fa3ba37999a6f8fd812458b735e39604a95. > I also don't have a copy of this patch in my mail archive, which > seems wierd, did it get posted to mesa-dev? The same applies to 8200793 ("mesa/teximage: restrict GL_ETC1_RGB8

Re: [Mesa-dev] [PATCH v2 2/4] nir: Add comments to nir_index_instrs and nir_index_ssa_defs

2015-09-17 Thread Eduardo Lima Mitev
On 09/15/2015 10:44 PM, Jason Ekstrand wrote: > The provided indices have the very nice property that if A dominates B then > A->index <= B->index. We should document that somewhere. > > Reviewed-by: Kenneth Graunke > --- > src/glsl/nir/nir.c | 8 > 1 file changed, 8 insertions(+) > >

Re: [Mesa-dev] [PATCH v2 4/4] i965/vec4: Use nir_move_vec_src_uses_to_dest

2015-09-17 Thread Eduardo Lima Mitev
On 09/15/2015 10:44 PM, Jason Ekstrand wrote: > The idea here is not that it gives register coalescing a little bit of a > helping hand. It doesn't actually fix the coalescing problems, but it > seems to help a good bit. > > Shader-db results for vec4 programs on Haswell: > >total instructio

[Mesa-dev] [Bug 79783] Distorted output in obs-studio where other vendors "work"

2015-09-17 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=79783 --- Comment #6 from gregory.hain...@gmail.com --- Hum, it could be related to item4 (assign_varying_locations). /* Operate in a total of four passes. * * 1. Sort inputs / outputs into a canonical order. This is necessary so *

[Mesa-dev] [Bug 79783] Distorted output in obs-studio where other vendors "work"

2015-09-17 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=79783 gregory.hain...@gmail.com changed: What|Removed |Added CC||gregory.hain...@gmail.com ---

[Mesa-dev] [PATCH 23/24] i965: enable ARB_arrays_of_arrays

2015-09-17 Thread Timothy Arceri
--- src/mesa/drivers/dri/i965/intel_extensions.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/drivers/dri/i965/intel_extensions.c b/src/mesa/drivers/dri/i965/intel_extensions.c index e6d39e0..9f9c6ed 100644 --- a/src/mesa/drivers/dri/i965/intel_extensions.c +++ b/src/mesa/drivers/

[Mesa-dev] [PATCH 24/24] docs: Mark AoA as done for i965

2015-09-17 Thread Timothy Arceri
Reviewed-by: Ian Romanick --- docs/GL3.txt | 4 ++-- docs/relnotes/11.1.0.html | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/GL3.txt b/docs/GL3.txt index bd44d12..1cb7958 100644 --- a/docs/GL3.txt +++ b/docs/GL3.txt @@ -149,7 +149,7 @@ GL 4.2, GLSL 4.20:

[Mesa-dev] [PATCH 19/24] i965: add arrays of arrays support for varyings

2015-09-17 Thread Timothy Arceri
--- src/mesa/drivers/dri/i965/brw_fs.cpp | 4 ++-- src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index b4d0567..b21c576 100644 --- a/src/mesa/drivers/

[Mesa-dev] [PATCH 18/24] glsl: add AoA support to subroutines

2015-09-17 Thread Timothy Arceri
--- src/glsl/ast_function.cpp | 43 ++- src/glsl/lower_subroutine.cpp | 2 +- 2 files changed, 39 insertions(+), 6 deletions(-) diff --git a/src/glsl/ast_function.cpp b/src/glsl/ast_function.cpp index d003655..42affad 100644 --- a/src/glsl/ast_function

[Mesa-dev] [PATCH 22/24] glsl: Allow arrays of arrays in GLSL ES 3.10 and GLSL 4.30

2015-09-17 Thread Timothy Arceri
V3: use a check_*_allowed style function for requirements checking rather than has_* which doesn't encapsulate the error message V2: add missing 's' to the extension name in error messages and add decimal place in version string --- src/glsl/ast_to_hir.cpp | 7 +-- src/glsl/glsl_parse

[Mesa-dev] [PATCH 20/24] glsl: set image access qualifiers for AoA

2015-09-17 Thread Timothy Arceri
--- src/glsl/link_uniforms.cpp | 77 +- 1 file changed, 49 insertions(+), 28 deletions(-) diff --git a/src/glsl/link_uniforms.cpp b/src/glsl/link_uniforms.cpp index bdc28cc..94161e7 100644 --- a/src/glsl/link_uniforms.cpp +++ b/src/glsl/link_uniforms.cp

[Mesa-dev] [PATCH 21/24] i965: add support for image AoA

2015-09-17 Thread Timothy Arceri
--- src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 45 1 file changed, 29 insertions(+), 16 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp index f8133a5..6ef0703 100644 --- a/src/mesa/drivers/dri/i965/brw

[Mesa-dev] [PATCH 13/24] i965: support atomic counter AoA

2015-09-17 Thread Timothy Arceri
--- src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 22 +- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp index 0465770..733d5ad 100644 --- a/src/mesa/drivers/dri/i

[Mesa-dev] [PATCH 14/24] i965: fix atomic buffer index for bindings other than 0

2015-09-17 Thread Timothy Arceri
Since commit c0cd5b var->data.binding was being used as a replacement for atomic buffer index, but they don't have to be the same value they just happen to end up the same when binding is 0. Now that we store the atomic uniform location in var->data.location we can use this to lookup the atomic bu

[Mesa-dev] [PATCH 15/24] glsl: calculate AoA uniform offset correctly for structs

2015-09-17 Thread Timothy Arceri
This allows the correct offset to be calculated for use in indirect indexing of samplers. --- src/glsl/glsl_types.cpp | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/glsl/glsl_types.cpp b/src/glsl/glsl_types.cpp index 97c79fa..86f0ea5 100644 --- a/src/glsl/

[Mesa-dev] [PATCH 17/24] glsl: disable interface block AoA

2015-09-17 Thread Timothy Arceri
Desktop GL supports interface block AoA however AMD and Nvidia dont support it in their drivers curently so we can get away with disabling it for now. V2: make error message more clear that this is a fault in Mesa and not with the application --- src/glsl/ast_to_hir.cpp | 10 ++ 1 file ch

[Mesa-dev] [PATCH 16/24] glsl: avoid hitting assert for arrays of arrays

2015-09-17 Thread Timothy Arceri
Also add TODO comment about adding proper support Signed-off-by: Timothy Arceri --- src/glsl/ir_set_program_inouts.cpp | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/glsl/ir_set_program_inouts.cpp b/src/glsl/ir_set_program_inouts.cpp index b7a0f6e..d7c29b0 100644 --- a/src/glsl/i

[Mesa-dev] [PATCH 11/24] nir: wrapper for glsl_type arrays_of_arrays_size()

2015-09-17 Thread Timothy Arceri
Reviewed-by: Tapani Pälli Reviewed-by: Ian Romanick --- src/glsl/nir/nir_types.cpp | 6 ++ src/glsl/nir/nir_types.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/src/glsl/nir/nir_types.cpp b/src/glsl/nir/nir_types.cpp index 940c676..da7015b 100644 --- a/src/glsl/nir/nir_types.cpp

  1   2   >