Re: [Mesa-dev] [PATCH] i965/vec4: select predicate based on writemask for sel emissions

2015-11-05 Thread Alejandro Piñeiro
On 04/11/15 23:49, Matt Turner wrote: > On Wed, Nov 4, 2015 at 1:01 PM, Alejandro Piñeiro > wrote: >> On 04/11/15 20:13, Matt Turner wrote: >>> On Fri, Oct 23, 2015 at 7:17 AM, Alejandro Piñeiro >>> wrote: Equivalent to commit 4eebeb but with sel operations. In this case >>> That commit

[Mesa-dev] [PATCH 2/4] st/va: fix memory leak on error in vlVaCreateSurfaces2

2015-11-05 Thread Julien Isorce
Found by coverity: CID #1337953 Signed-off-by: Julien Isorce --- src/gallium/state_trackers/va/surface.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/gallium/state_trackers/va/surface.c b/src/gallium/state_trackers/va/surface.c index 59815aa..3db21c3 1006

[Mesa-dev] [PATCH 4/4] st/va: add support for RGBX and BGRX in VPP

2015-11-05 Thread Julien Isorce
Before it was only possible to convert a NV12 surface to RGBA or BGRA. This patch uses the same post processing function, "handleVAProcPipelineParameterBufferType", but add definitions for RGBX and BGRX. This patch also makes vlVaQuerySurfaceAttributes more generic. Signed-off-by: Julien Isorce

[Mesa-dev] [PATCH 0/4] st/va: indent, leak fix and RGBx/BGRx for vpp

2015-11-05 Thread Julien Isorce
A few fixes and small improvement from recent changes in st/va: * Indentation was wrong for some functions. * Coverity reported a memory leak. (thx to Ilia for pointing this) * More color formats convertion for Video Post Processing Julien Isorce (4): st/va: indent vlVaQuerySurfaceAttributes and

[Mesa-dev] [PATCH 1/4] st/va: indent vlVaQuerySurfaceAttributes and vlVaCreateSurfaces2

2015-11-05 Thread Julien Isorce
Some lines were using 4 indentation spaces instead of 3. Signed-off-by: Julien Isorce --- src/gallium/state_trackers/va/surface.c | 566 1 file changed, 283 insertions(+), 283 deletions(-) diff --git a/src/gallium/state_trackers/va/surface.c b/src/gallium/state

[Mesa-dev] [PATCH 3/4] st/va: properly indent buffer.c, config.c, image.c and picture.c

2015-11-05 Thread Julien Isorce
Some lines were using 4 indentation spaces instead of 3. The switch in vlVaAcquireBufferHandle actually had wrong brackets surrounding case+default. Signed-off-by: Julien Isorce --- src/gallium/state_trackers/va/buffer.c | 23 + src/gallium/state_trackers/va/config.c | 12 ++--- src/g

Re: [Mesa-dev] [PATCH] st/mesa: account for texture views when doing CopyImageSubData

2015-11-05 Thread Marek Olšák
Reviewed-by: Marek Olšák Marek On Thu, Nov 5, 2015 at 6:34 AM, Ilia Mirkin wrote: > Signed-off-by: Ilia Mirkin > --- > src/mesa/state_tracker/st_cb_copyimage.c | 8 > 1 file changed, 8 insertions(+) > > diff --git a/src/mesa/state_tracker/st_cb_copyimage.c > b/src/mesa/state_tracker

Re: [Mesa-dev] [PATCH 1/3] glsl: Drop exec_list argument to lower_ubo_reference

2015-11-05 Thread Timothy Arceri
On Wed, 2015-11-04 at 15:33 -0800, Kristian Høgsberg Kristensen wrote: > We always pass in shader->ir and we already pass in the shader, so just > drop the exec_list. Most passes either take just a exec_list or a > shader, so this seems more consistent. > > Signed-off-by: Kristian Høgsberg Kristen

[Mesa-dev] ARB_enhanced_layout compile-time-constants

2015-11-05 Thread Timothy Arceri
This series adds support for compile time constants and also adds subroutine index qualifier support which was missing for ARB_explicit_uniform_location it doesn't add the missing subroutine location qualifier I'll add that in a follow-up. Piglit tests have been reviewed and pushed to master, the

[Mesa-dev] [PATCH 2/6] glsl: add helper to check for enhanced layouts support

2015-11-05 Thread Timothy Arceri
From: Timothy Arceri --- src/glsl/glsl_parser_extras.h | 5 + 1 file changed, 5 insertions(+) diff --git a/src/glsl/glsl_parser_extras.h b/src/glsl/glsl_parser_extras.h index 684b917..1d8c1b8 100644 --- a/src/glsl/glsl_parser_extras.h +++ b/src/glsl/glsl_parser_extras.h @@ -209,6 +209,11 @@

[Mesa-dev] [PATCH 1/6] mesa: add ARB_enhanced_layouts

2015-11-05 Thread Timothy Arceri
From: Timothy Arceri Set to dummy_false until the remaining features are added. --- src/glsl/glcpp/glcpp-parse.y| 1 + src/glsl/glsl_parser_extras.cpp | 1 + src/glsl/glsl_parser_extras.h | 2 ++ src/mesa/main/extensions.c | 1 + 4 files changed, 5 insertions(+) diff --git a/src/glsl

[Mesa-dev] [PATCH 6/6] docs: mark compile-time constant expressions as done

2015-11-05 Thread Timothy Arceri
From: Timothy Arceri --- docs/GL3.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/GL3.txt b/docs/GL3.txt index 7abdcd8..416b734 100644 --- a/docs/GL3.txt +++ b/docs/GL3.txt @@ -179,7 +179,7 @@ GL 4.4, GLSL 4.40: GL_ARB_buffer_storage

[Mesa-dev] [PATCH 4/6] glsl: add support for complie-time constant expressions

2015-11-05 Thread Timothy Arceri
From: Timothy Arceri In this patch we introduce a new ast type for holding the new compile-time constant expressions. The main reason for this is that we can no longer do merging of layout qualifiers before they have been converted into GLSL IR. The remainder of the patch replaces all the old in

[Mesa-dev] [PATCH 5/6] glsl: add subroutine index qualifier support

2015-11-05 Thread Timothy Arceri
From: Timothy Arceri ARB_explicit_uniform_location allows the index for subroutine functions to be explicitly set in the shader. This patch reduces the restriction on the index qualifier in validate_layout_qualifiers() to allow it to be applied to subroutines and adds the new subroutine qualifie

[Mesa-dev] [PATCH 3/6] glsl: move layout qualifier validation out of the parser

2015-11-05 Thread Timothy Arceri
From: Timothy Arceri This is in preperation for compile-time constant support. Also fix up the locations for some of the extension checking error messages in the parser. We now correctly give the location of the layout qualifier identifier rather than the integer constant. The validation is mov

Re: [Mesa-dev] [PATCH 1/2] i965: Don't include missing components in the fast clear color

2015-11-05 Thread Neil Roberts
Ben Widawsky writes: > It seems reasonable to me, but since you touch the same code I touch > in fast clears, and since I always screw up rebases, any chance I > could persuade you to wait until I land fast clears? Sure, I don't mind waiting. I did have a go at rebasing the patch on top of your

[Mesa-dev] [PATCH 3/7] glsl: Add user-defined default precision qualifiers to the symbol table

2015-11-05 Thread Tapani Pälli
From: Iago Toral Quiroga Notice that the spec requires that a default precision has been set for every type used by a shader that can use a precision qualifier and does not have a predefined precision, however, at the moment, Mesa only checks this for floats in the fragment shader. This is probab

[Mesa-dev] [PATCH 2/7] glsl: Add default precision qualifiers to the symbol table

2015-11-05 Thread Tapani Pälli
From: Iago Toral Quiroga The GLSL ES spec specifies default precision qualifiers for certain types, so populate the symbol table with these. Notice that the desktop GLSL spec also indicates defaults for some types but this is not really useful since precision qualifiers are completely ignored in

[Mesa-dev] [PATCH 0/7] precision qualifiers for ir_variable

2015-11-05 Thread Tapani Pälli
Hi; I rebased Iago's patches and fixed some issues that I saw. On top of it is 2 patches that fix precision related ES 3.1 CTS errors. Any comments appreciated. What should be included in validation seems a bit vague in the specs and I did not include anything else than precision since this is wh

[Mesa-dev] [PATCH 1/7] glsl: Add API to put default precision qualifiers in the symbol table

2015-11-05 Thread Tapani Pälli
From: Iago Toral Quiroga These have scoping rules that match the ones defined for other things such as variables, so we want them in the symbol table. --- src/glsl/glsl_symbol_table.cpp | 24 src/glsl/glsl_symbol_table.h | 2 ++ 2 files changed, 26 insertions(+) diff

[Mesa-dev] [PATCH 5/7] glsl: Add precision information to ir_variable

2015-11-05 Thread Tapani Pälli
From: Iago Toral Quiroga We will need this later on when we implement proper support for precision qualifiers in the drivers and also to do link time checks for uniforms as indicated by the spec. This patch also adds compile-time checks for variables without precision information (currently, Mes

[Mesa-dev] [PATCH 7/7] mesa: validate precision of varyings during ValidateProgramPipeline

2015-11-05 Thread Tapani Pälli
Fixes following failing ES3.1 CTS tests: ES31-CTS.sepshaderobjs.InterfacePrecisionMatchingFloat ES31-CTS.sepshaderobjs.InterfacePrecisionMatchingInt ES31-CTS.sepshaderobjs.InterfacePrecisionMatchingUInt Signed-off-by: Tapani Pälli --- src/mesa/main/pipelineobj.c| 15 s

[Mesa-dev] [PATCH 6/7] glsl: do not loose precision information when packing varyings

2015-11-05 Thread Tapani Pälli
This information will be used by cross stage validation of varyings for pipeline objects. Signed-off-by: Tapani Pälli --- src/glsl/lower_packed_varyings.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/glsl/lower_packed_varyings.cpp b/src/glsl/lower_packed_varyings.cpp index 5d66ca9.

[Mesa-dev] [PATCH 4/7] glsl: Move the definition of precision_qualifier_allowed

2015-11-05 Thread Tapani Pälli
From: Iago Toral Quiroga We will need this to build later patches --- src/glsl/ast_to_hir.cpp | 71 - 1 file changed, 35 insertions(+), 36 deletions(-) diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp index d20be0b..b6d662b 100644 --

Re: [Mesa-dev] [PATCH 6/7] glsl: do not loose precision information when packing varyings

2015-11-05 Thread Martin Peres
I believe you meant "do not lose ..." :) On 05/11/15 13:33, Tapani Pälli wrote: This information will be used by cross stage validation of varyings for pipeline objects. Signed-off-by: Tapani Pälli --- src/glsl/lower_packed_varyings.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/sr

Re: [Mesa-dev] [PATCH 2/7] glsl: Add default precision qualifiers to the symbol table

2015-11-05 Thread Tapani Pälli
On 11/05/2015 01:33 PM, Tapani Pälli wrote: From: Iago Toral Quiroga The GLSL ES spec specifies default precision qualifiers for certain types, so populate the symbol table with these. Notice that the desktop GLSL spec also indicates defaults for some types but this is not really useful sinc

[Mesa-dev] [PATCH v4 5/7] glsl: Add precision information to ir_variable

2015-11-05 Thread Tapani Pälli
From: Iago Toral Quiroga We will need this later on when we implement proper support for precision qualifiers in the drivers and also to do link time checks for uniforms as indicated by the spec. This patch also adds compile-time checks for variables without precision information (currently, Mes

[Mesa-dev] [PATCH v3 2/7] glsl: Add default precision qualifiers to the symbol table

2015-11-05 Thread Tapani Pälli
From: Iago Toral Quiroga The GLSL ES spec specifies default precision qualifiers for certain types, so populate the symbol table with these. Notice that the desktop GLSL spec also indicates defaults for some types but this is not really useful since precision qualifiers are completely ignored in

Re: [Mesa-dev] [PATCH 00/10] i965: always mark used surfaces in the visitors

2015-11-05 Thread Iago Toral
On Tue, 2015-11-03 at 09:19 -0800, Mark Janes wrote: > Francisco Jerez writes: > > > Iago Toral writes: > > > >> On Tue, 2015-11-03 at 15:28 +0200, Francisco Jerez wrote: > >>> Iago Toral writes: > >>> > >>> > On Fri, 2015-10-30 at 16:19 +0200, Francisco Jerez wrote: > >>> >> Iago Toral Quirog

Re: [Mesa-dev] [PATCH 00/10] i965: always mark used surfaces in the visitors

2015-11-05 Thread Francisco Jerez
Iago Toral writes: > On Tue, 2015-11-03 at 09:19 -0800, Mark Janes wrote: >> Francisco Jerez writes: >> >> > Iago Toral writes: >> > >> >> On Tue, 2015-11-03 at 15:28 +0200, Francisco Jerez wrote: >> >>> Iago Toral writes: >> >>> >> >>> > On Fri, 2015-10-30 at 16:19 +0200, Francisco Jerez wr

Re: [Mesa-dev] [Mesa-stable] [PATCH] glsl: fix stream qualifier for blocks with an instance name

2015-11-05 Thread Emil Velikov
On 17 October 2015 at 10:51, Timothy Arceri wrote: > This also removes the validation from the parser as it is not required > and once arb_enhanced_layouts comes along we wont be able to do validation > on the stream qualifier in the parser anyway as it adds constant expression > support to the st

[Mesa-dev] [PATCH mesa 0/5] nouveau: codegen: Make use of double immediates

2015-11-05 Thread Hans de Goede
Hi All, This series implements using double immediates in the nouveau codegen code. This turns the following (nvc0) code: 1: mov u32 $r2 0x (8) 2: mov u32 $r3 0x3fe0 (8) 3: add f64 $r0d $r0d $r2d (8) Into: 1: add f64 $r0d $r0d 0.50 (8) This has been t

[Mesa-dev] [PATCH mesa 2/5] nouveau: codegen: emit_gm107: Add support for double immediates

2015-11-05 Thread Hans de Goede
Add support for encoding double immediates (up to 20 bits of precision) into the generated gm107 machine-code. Signed-off-by: Hans de Goede --- src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gm107.cpp | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/n

[Mesa-dev] [PATCH mesa 1/5] nouveau: codegen: emit_nvc0: Add support for double immediates

2015-11-05 Thread Hans de Goede
Add support for encoding double immediates (up to 20 bits of precision) into the generated nvc0 machine-code. Signed-off-by: Hans de Goede --- src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp | 8 1 file changed, 8 insertions(+) diff --git a/src/gallium/drivers/nouveau/codegen

[Mesa-dev] [PATCH mesa 4/5] nouveau: codegen: Teach insnCanLoad about double immediates

2015-11-05 Thread Hans de Goede
Teach insnCanLoad about double immediates, together with the "Add support for merge-s to the ConstantFolding pass" This turns the following (nvc0) code: 1: mov u32 $r2 0x (8) 2: mov u32 $r3 0x3fe0 (8) 3: add f64 $r0d $r0d $r2d (8) Into: 1: add f64 $r0d $r0d 0.50 (8) Signe

[Mesa-dev] [PATCH mesa 3/5] nouveau: codegen: Add support for merge-s to the ConstantFolding pass

2015-11-05 Thread Hans de Goede
This allows later passes like LoadPropagation to properly deal with 64 bit immediates. If the new 64 bit load this introduces does not get optimized away then split64BitOpPostRA() will split this into 2 instructions again. Signed-off-by: Hans de Goede --- src/gallium/drivers/nouveau/codegen/nv5

[Mesa-dev] [PATCH mesa 5/5] nouveau: codegen: Add support for 64bit immediates to checkSwapSrc01

2015-11-05 Thread Hans de Goede
Now that we support 64 bit immediates in insnCanLoad, we need to swap 64 bit immediate sources too for optimal effect. Signed-off-by: Hans de Goede --- src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/gal

Re: [Mesa-dev] [PATCH 3/3] i965/nir/fs: Implement new barrier functions for compute shaders

2015-11-05 Thread Francisco Jerez
Jordan Justen writes: > For these nir intrinsics, we emit the same code as > nir_intrinsic_memory_barrier: > > * nir_intrinsic_memory_barrier_atomic_counter > * nir_intrinsic_memory_barrier_buffer > * nir_intrinsic_memory_barrier_image > > We treat these nir intrinsics as no-ops: > > * nir_in

Re: [Mesa-dev] [PATCH v2 1/3] glsl: Add new barrier functions for compute shaders

2015-11-05 Thread Francisco Jerez
Jordan Justen writes: > When these functions are called in GLSL code, we create an intrinsic > function call: > > * groupMemoryBarrier => __intrinsic_group_memory_barrier > * memoryBarrierAtomicCounter => __intrinsic_memory_barrier_atomic_counter > * memoryBarrierBuffer => __intrinsic_memory_b

Re: [Mesa-dev] [PATCH 04/24] i965: Make 'dw1' and 'bits' unnamed structures in brw_reg.

2015-11-05 Thread Francisco Jerez
Matt Turner writes: > On Tue, Nov 3, 2015 at 5:48 AM, Francisco Jerez wrote: >> Matt Turner writes: >> >>> Generated by >>> >>>sed -i -e 's/\.bits\././g' *.c *.h *.cpp >>>sed -i -e 's/dw1\.//g' *.c *.h *.cpp >>> >>> and then reverting changes to comments in gen7_blorp.cpp and >>> brw_fs

Re: [Mesa-dev] [PATCH 0/4] st/va: indent, leak fix and RGBx/BGRx for vpp

2015-11-05 Thread Christian König
Patches #1-#3 are Reviewed-by: Christian König Please split patch #4 in two with first adding the new vl_video_buffer formats and then using them in the state tracker. Should I commit that for you as well or do you now have an account? Regards, Christian. On 05.11.2015 09:24, Julien Isorce

[Mesa-dev] [PATCH 02/13] fixup! i965: Combine register file field.

2015-11-05 Thread Emil Velikov
From: Emil Velikov Signed-off-by: Emil Velikov --- src/mesa/drivers/dri/i965/brw_vec4.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp index e2f8a0a..6975a19 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4.c

[Mesa-dev] [PATCH 0/13] i965: do not use memset in *_reg() ctors

2015-11-05 Thread Emil Velikov
Hi all, This is a series that builds on top of Matts "i965: Refactor register classes". As Matt's branch has some additional changes, the first two patches are fixups that could be merged directly. The follow-up four patches removes/reworks some of the constructors, in order to avoid reworking

[Mesa-dev] [PATCH 03/13] i965/fs: remove unneeded fs_reg(...) ctor

2015-11-05 Thread Emil Velikov
From: Emil Velikov By using a default value for brw_reg_type the compiler will reuse the existing constructor. Signed-off-by: Emil Velikov --- src/mesa/drivers/dri/i965/brw_fs.cpp | 9 - src/mesa/drivers/dri/i965/brw_ir_fs.h | 4 ++-- 2 files changed, 2 insertions(+), 11 deletions(-)

[Mesa-dev] [PATCH 01/13] fixup! i965: Combine register file field.

2015-11-05 Thread Emil Velikov
From: Emil Velikov Remove unneeded this->file assignment in dst_reg(const src_reg &f) ctor Signed-off-by: Emil Velikov --- src/mesa/drivers/dri/i965/brw_vec4.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp

[Mesa-dev] [PATCH 04/13] i965/vec4: kill off the final possible dst_reg ctor

2015-11-05 Thread Emil Velikov
From: Emil Velikov By providing default values for type and writemask, the compiler will 'create' the constructor for us. The values chosen are the exact same ones, used in the default ctor - dst_reg(), as such the compiler should be smart enough to optimise the duplicated (identical) assignment.

[Mesa-dev] [PATCH 08/13] i965: do not memcmp to check if brw_regs are equal

2015-11-05 Thread Emil Velikov
From: Emil Velikov As of last commit one can easily the whole brw_reg as two unsigned values. Lets use that and avoid the nastylooking memcmp + casts. XXX: reladdr looks a bit strange. we tend to do dst_reg<>src_reg and in some cases this might cause someheadaches. should we zero it in the respe

[Mesa-dev] [PATCH 10/13] i965/fs: properly construct fs_reg

2015-11-05 Thread Emil Velikov
From: Emil Velikov Rather than doing memset(), implicitly use the backend_reg ctor(s) which will initialise its variables. For the fs_reg ones, set them manually. Signed-off-by: Emil Velikov --- src/mesa/drivers/dri/i965/brw_fs.cpp | 18 +++--- src/mesa/drivers/dri/i965/brw_ir_fs.

[Mesa-dev] [PATCH 05/13] i965/vec4: one dst_reg() constructor less

2015-11-05 Thread Emil Velikov
From: Emil Velikov Just fold the brw_type_for_base_type() and use a delegated constructor. Note this is a c++11 feature and the compiler will warn us if it's set/defaults to an earlier version of the standard. XXX: Should we just toggle c++11 on ? We seem to be using some of its functionality a

[Mesa-dev] [PATCH 12/13] i965/vec4: sort dst_reg ctors like the src_reg ones

2015-11-05 Thread Emil Velikov
From: Emil Velikov Signed-off-by: Emil Velikov --- src/mesa/drivers/dri/i965/brw_ir_vec4.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_ir_vec4.h b/src/mesa/drivers/dri/i965/brw_ir_vec4.h index b70dca5..2c7293d 100644 --- a/src/mesa/driv

[Mesa-dev] [PATCH 06/13] i965/vec4: remove the explicitly sized vec4_visitor src_reg ctor

2015-11-05 Thread Emil Velikov
From: Emil Velikov Just default the size to 1, and let the compiler do its magic. XXX: Not 100% sure this is correct. Signed-off-by: Emil Velikov --- src/mesa/drivers/dri/i965/brw_ir_vec4.h| 3 +-- src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 19 +++ 2 files chang

[Mesa-dev] [PATCH 13/13] i965/fs_visitor: do not explicitly set outputs[x].file

2015-11-05 Thread Emil Velikov
From: Emil Velikov This commits partially reverts "i965: Initialize registers' file to BAD_FILE." No longer needed as of commit "i965/fs: properly construct fs_reg" which removes the memset(...0...), and correctly sets BAD_FILE. Signed-off-by: Emil Velikov --- src/mesa/drivers/dri/i965/brw_fs

[Mesa-dev] [PATCH 09/13] i965: initialise the backend_reg members in the ctor

2015-11-05 Thread Emil Velikov
From: Emil Velikov Step one towards having a normal constructors for the *_reg primitives, and removing a handful of somewhat ugly code. Signed-off-by: Emil Velikov --- src/mesa/drivers/dri/i965/brw_fs.cpp | 2 +- src/mesa/drivers/dri/i965/brw_shader.h | 11 +-- src/mesa/drivers/dri

[Mesa-dev] [PATCH 07/13] i965: make brw_reg imm attibs accessible as a value

2015-11-05 Thread Emil Velikov
From: Emil Velikov Will allow us an easy once-off get/set of the attribs. Thus we can drop all the memset/memcmp + magic casting. XXX: alternative name(s) are welcome Signed-off-by: Emil Velikov --- src/mesa/drivers/dri/i965/brw_reg.h | 21 + 1 file changed, 13 insertions(

[Mesa-dev] [PATCH 11/13] i965/vec4: rework the src_reg/dst_reg constructors

2015-11-05 Thread Emil Velikov
From: Emil Velikov Analogous to the previous (fs) commit - drop the explicit memset and set the non-inherited variables (reladdr) manually. Signed-off-by: Emil Velikov --- src/mesa/drivers/dri/i965/brw_ir_vec4.h| 13 +++ src/mesa/drivers/dri/i965/brw_vec4.cpp | 48 -

Re: [Mesa-dev] [PATCH 12/24] i965: Initialize registers' file to BAD_FILE.

2015-11-05 Thread Emil Velikov
On 3 November 2015 at 18:02, Matt Turner wrote: > On Tue, Nov 3, 2015 at 8:05 AM, Emil Velikov wrote: >> On 3 November 2015 at 00:29, Matt Turner wrote: >>> The test (file == BAD_FILE) works on registers for which the constructor >>> has not run because BAD_FILE is zero. The next commit will mo

Re: [Mesa-dev] [PATCH 08/24] i965: Remove fixed_hw_reg field from backend_reg.

2015-11-05 Thread Emil Velikov
On 3 November 2015 at 16:04, Emil Velikov wrote: >> @@ -1596,8 +1586,7 @@ vec4_visitor::lower_attributes_to_hw_regs(const int >> *attribute_map, >> reg.type = inst->dst.type; >> reg.writemask = inst->dst.writemask; >> >> -inst->dst.file = HW_REG; >> -inst->dst.f

Re: [Mesa-dev] [PATCH 4/4] st/va: add support for RGBX and BGRX in VPP

2015-11-05 Thread Emil Velikov
Hi Julien, On 5 November 2015 at 08:24, Julien Isorce wrote: > Before it was only possible to convert a NV12 surface to > RGBA or BGRA. This patch uses the same post processing > function, "handleVAProcPipelineParameterBufferType", but > add definitions for RGBX and BGRX. > > This patch also make

Re: [Mesa-dev] [PATCH 3/4] st/va: properly indent buffer.c, config.c, image.c and picture.c

2015-11-05 Thread Emil Velikov
On 5 November 2015 at 08:24, Julien Isorce wrote: > Some lines were using 4 indentation spaces instead of 3. > > The switch in vlVaAcquireBufferHandle actually had wrong brackets > surrounding case+default. > Please don't mix whitespace (trivial) patches and bugfixes. -Emil __

Re: [Mesa-dev] [PATCH 13/13] i965/fs_visitor: do not explicitly set outputs[x].file

2015-11-05 Thread Emil Velikov
On 5 November 2015 at 16:18, Emil Velikov wrote: > From: Emil Velikov > > This commits partially reverts "i965: Initialize registers' file to > BAD_FILE." > > No longer needed as of commit "i965/fs: properly construct fs_reg" which > removes the memset(...0...), and correctly sets BAD_FILE. > > S

[Mesa-dev] [PATCH] Implement EXT_blend_func_extended

2015-11-05 Thread Ryan Houdek
This is a very new extension to ES that gives you dual source blending just like in desktop OpenGL. This works with the piglits that I've written, which are in the process of being cleaned up so they can be pushed, and this also works great with the Dolphin emulator. --- src/glsl/ast_to_hir.cpp

[Mesa-dev] [PATCH 4/8] Add a parse check to check for the index layout qualifier

2015-11-05 Thread Ryan Houdek
This can only be used if EXT_blend_func_extended is enabled --- src/glsl/glsl_parser.yy | 5 + 1 file changed, 5 insertions(+) diff --git a/src/glsl/glsl_parser.yy b/src/glsl/glsl_parser.yy index 4636435..40e60e5 100644 --- a/src/glsl/glsl_parser.yy +++ b/src/glsl/glsl_parser.yy @@ -1463,6 +1

[Mesa-dev] [PATCH 7/8] Add EXT_blend_func_extended functions to the dispatch_sanity test

2015-11-05 Thread Ryan Houdek
--- src/mesa/main/tests/dispatch_sanity.cpp | 8 1 file changed, 8 insertions(+) diff --git a/src/mesa/main/tests/dispatch_sanity.cpp b/src/mesa/main/tests/dispatch_sanity.cpp index abe0f43..97f81f9 100644 --- a/src/mesa/main/tests/dispatch_sanity.cpp +++ b/src/mesa/main/tests/dispatch_

[Mesa-dev] [PATCH 8/8] Enable EXT_blend_func_extended if the driver supports the ARB version

2015-11-05 Thread Ryan Houdek
--- src/mesa/main/extensions.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c index bdc6817..f1692ba 100644 --- a/src/mesa/main/extensions.c +++ b/src/mesa/main/extensions.c @@ -221,6 +221,7 @@ static const struct extension extension_tab

[Mesa-dev] [PATCH 6/8] Allow MAX_DUAL_SOURCE_DRAW_BUFFERS to be available to ES

2015-11-05 Thread Ryan Houdek
--- src/mesa/main/get_hash_params.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mesa/main/get_hash_params.py b/src/mesa/main/get_hash_params.py index fbc7b8f..9b22b91 100644 --- a/src/mesa/main/get_hash_params.py +++ b/src/mesa/main/get_hash_params.py @@ -330,6 +330

[Mesa-dev] [PATCH 3/8] Add support for the new builtins that EXT_blend_func_extended provides.

2015-11-05 Thread Ryan Houdek
gl_MaxDualSourceDrawBuffersEXT - Maximum DS draw buffers supported Only for ESSL 1.0 it provides two builtins since you can't have user-defined color output variables gl_SecondaryFragColorEXT and gl_SecondaryFragDataEXT[MaxDSDrawBuffers] --- src/glsl/ast_to_hir.cpp| 16 +++ src/gl

[Mesa-dev] [PATCH 2/8] Add required variables to _mesa_glsl_parse_state for EXT_blend_func_extended

2015-11-05 Thread Ryan Houdek
This adds a state for the maximum dual source draw variables available and the variable for determining if the extension has been enabled in the program shaders. --- src/glsl/glsl_parser_extras.cpp | 3 +++ src/glsl/glsl_parser_extras.h | 5 + 2 files changed, 8 insertions(+) diff --git a/s

[Mesa-dev] [PATCH 5/8] Enable usage of blend_func_extended blend factors

2015-11-05 Thread Ryan Houdek
--- src/mesa/main/blend.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesa/main/blend.c b/src/mesa/main/blend.c index 20aa498..8da81ee 100644 --- a/src/mesa/main/blend.c +++ b/src/mesa/main/blend.c @@ -67,7 +67,7 @@ legal_src_factor(const struct gl_context *ctx, GLe

[Mesa-dev] [PATCH 1/8] Add EXT_blend_func_extended XML definitions

2015-11-05 Thread Ryan Houdek
--- src/mapi/glapi/gen/EXT_gpu_shader4.xml | 3 ++- src/mapi/glapi/gen/es_EXT.xml | 38 ++ 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/src/mapi/glapi/gen/EXT_gpu_shader4.xml b/src/mapi/glapi/gen/EXT_gpu_shader4.xml index b1f7eae..b4120b

[Mesa-dev] [PATCH 0/8] Implement support for EXT_blend_func_extended

2015-11-05 Thread Ryan Houdek
This implements support for a very new extension to ES, which allows you to do dual source blending just like in desktop OpenGL. This works with the piglits that I am writing that just need to be cleaned before they are pushed, and it also works fantastically with the Dolphin emulator (Only known a

Re: [Mesa-dev] [PATCH 2/8] Add required variables to _mesa_glsl_parse_state for EXT_blend_func_extended

2015-11-05 Thread Ilia Mirkin
subject: glsl: ... On Thu, Nov 5, 2015 at 12:16 PM, Ryan Houdek wrote: > This adds a state for the maximum dual source draw variables available > and the variable for determining if the extension has been enabled > in the program shaders. > --- > src/glsl/glsl_parser_extras.cpp | 3 +++ > src/gl

Re: [Mesa-dev] [PATCH 1/8] Add EXT_blend_func_extended XML definitions

2015-11-05 Thread Ilia Mirkin
subject: glapi: add ... On Thu, Nov 5, 2015 at 12:16 PM, Ryan Houdek wrote: > --- > src/mapi/glapi/gen/EXT_gpu_shader4.xml | 3 ++- > src/mapi/glapi/gen/es_EXT.xml | 38 > ++ > 2 files changed, 40 insertions(+), 1 deletion(-) > > diff --git a/src/mapi/g

Re: [Mesa-dev] [PATCH 3/8] Add support for the new builtins that EXT_blend_func_extended provides.

2015-11-05 Thread Ilia Mirkin
On Thu, Nov 5, 2015 at 12:16 PM, Ryan Houdek wrote: subject: glsl: ... > gl_MaxDualSourceDrawBuffersEXT - Maximum DS draw buffers supported > > Only for ESSL 1.0 it provides two builtins since you can't have user-defined > color output variables > gl_SecondaryFragColorEXT and gl_SecondaryFragDat

Re: [Mesa-dev] [PATCH 7/8] Add EXT_blend_func_extended functions to the dispatch_sanity test

2015-11-05 Thread Ilia Mirkin
This need to be done along with the patch which adds these to the xml On Thu, Nov 5, 2015 at 12:16 PM, Ryan Houdek wrote: > --- > src/mesa/main/tests/dispatch_sanity.cpp | 8 > 1 file changed, 8 insertions(+) > > diff --git a/src/mesa/main/tests/dispatch_sanity.cpp > b/src/mesa/main/te

Re: [Mesa-dev] [PATCH 0/8] Implement support for EXT_blend_func_extended

2015-11-05 Thread Ilia Mirkin
You appear to be missing a patch to add this to glcpp: A new preprocessor #define is added to the OpenGL ES Shading Language: #define GL_EXT_blend_func_extended 1 On Thu, Nov 5, 2015 at 12:16 PM, Ryan Houdek wrote: > This implements support for a very new extension to ES, which allows

Re: [Mesa-dev] [PATCH 5/8] Enable usage of blend_func_extended blend factors

2015-11-05 Thread Ilia Mirkin
On Thu, Nov 5, 2015 at 12:16 PM, Ryan Houdek wrote: > --- > src/mesa/main/blend.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/src/mesa/main/blend.c b/src/mesa/main/blend.c > index 20aa498..8da81ee 100644 > --- a/src/mesa/main/blend.c > +++ b/src/mesa/main/blend.c

Re: [Mesa-dev] [PATCH v2 1/3] glsl: Add new barrier functions for compute shaders

2015-11-05 Thread Jordan Justen
On 2015-11-05 06:07:02, Francisco Jerez wrote: > Jordan Justen writes: > > > When these functions are called in GLSL code, we create an intrinsic > > function call: > > > > * groupMemoryBarrier => __intrinsic_group_memory_barrier > > * memoryBarrierAtomicCounter => __intrinsic_memory_barrier_at

Re: [Mesa-dev] [PATCH 8/8] Enable EXT_blend_func_extended if the driver supports the ARB version

2015-11-05 Thread Ilia Mirkin
Add a note to release notes as well? Please fix up the subjects throughout the series to conform to other patches going to those areas. Generally glsl: or mesa: or glapi: depending on the area (for the bits you're touching). On Thu, Nov 5, 2015 at 12:16 PM, Ryan Houdek wrote: > --- > src/mesa/ma

Re: [Mesa-dev] [PATCH v2 1/3] glsl: Add new barrier functions for compute shaders

2015-11-05 Thread Francisco Jerez
Jordan Justen writes: > On 2015-11-05 06:07:02, Francisco Jerez wrote: >> Jordan Justen writes: >> >> > When these functions are called in GLSL code, we create an intrinsic >> > function call: >> > >> > * groupMemoryBarrier => __intrinsic_group_memory_barrier >> > * memoryBarrierAtomicCounter

Re: [Mesa-dev] [PATCH 6/7] nir: add shader reference counting

2015-11-05 Thread Jason Ekstrand
On Sat, Oct 24, 2015 at 10:07 AM, Rob Clark wrote: > From: Rob Clark > > For gallium, at least, we'll need this to manage shader's lifetimes, > since in some cases both the driver and the state tracker will need > to hold on to a reference for variant managing. > > Use nir_shader_mutable() before

[Mesa-dev] [PATCH 1/4] st/va: fix build fails with pipe loader

2015-11-05 Thread Leo Liu
There is no dev in drv, and dev should be from vl_screen here --- src/gallium/state_trackers/va/context.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gallium/state_trackers/va/context.c b/src/gallium/state_trackers/va/context.c index ec9e048..25fa905 100644 --- a/

Re: [Mesa-dev] [PATCH 6/7] nir: add shader reference counting

2015-11-05 Thread Rob Clark
On Thu, Nov 5, 2015 at 1:13 PM, Jason Ekstrand wrote: > On Sat, Oct 24, 2015 at 10:07 AM, Rob Clark wrote: >> From: Rob Clark >> >> For gallium, at least, we'll need this to manage shader's lifetimes, >> since in some cases both the driver and the state tracker will need >> to hold on to a refer

Re: [Mesa-dev] [PATCH] radeonsi: add basic glClearBufferSubData acceleration

2015-11-05 Thread Nicolai Hähnle
On 04.11.2015 00:47, Marek Olšák wrote: From: Marek Olšák --- src/gallium/drivers/radeonsi/si_blit.c | 55 ++ 1 file changed, 55 insertions(+) diff --git a/src/gallium/drivers/radeonsi/si_blit.c b/src/gallium/drivers/radeonsi/si_blit.c index fce014a..e934146

[Mesa-dev] [PATCH 2/4] vl: add drm support for vl_screen

2015-11-05 Thread Leo Liu
This will allow the state trackers to use render nodes with screen creation Signed-off-by: Leo Liu --- src/gallium/auxiliary/Makefile.sources | 3 +- src/gallium/auxiliary/vl/vl_winsys.h | 6 +++ src/gallium/auxiliary/vl/vl_winsys_drm.c | 76 3 files chan

[Mesa-dev] [PATCH 3/4] st/va: move vl screen drm support to vl_wys_drm

2015-11-05 Thread Leo Liu
--- src/gallium/state_trackers/va/context.c | 20 +++- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/src/gallium/state_trackers/va/context.c b/src/gallium/state_trackers/va/context.c index 25fa905..845b547 100644 --- a/src/gallium/state_trackers/va/context.c +++ b

Re: [Mesa-dev] [PATCH 05/13] i965/vec4: one dst_reg() constructor less

2015-11-05 Thread Matt Turner
On Thu, Nov 5, 2015 at 8:17 AM, Emil Velikov wrote: > From: Emil Velikov > > Just fold the brw_type_for_base_type() and use a delegated > constructor. > > Note this is a c++11 feature and the compiler will warn us if it's > set/defaults to an earlier version of the standard. > > XXX: Should we ju

Re: [Mesa-dev] [PATCH 13/13] i965/fs_visitor: do not explicitly set outputs[x].file

2015-11-05 Thread Matt Turner
On Thu, Nov 5, 2015 at 8:18 AM, Emil Velikov wrote: > From: Emil Velikov > > This commits partially reverts "i965: Initialize registers' file to > BAD_FILE." > > No longer needed as of commit "i965/fs: properly construct fs_reg" which > removes the memset(...0...), and correctly sets BAD_FILE. I

[Mesa-dev] [PATCH 4/4] st/omx: add headless support

2015-11-05 Thread Leo Liu
This will allow dec/enc/transcode without X Signed-off-by: Leo Liu --- src/gallium/state_trackers/omx/entrypoint.c | 39 + 1 file changed, 29 insertions(+), 10 deletions(-) diff --git a/src/gallium/state_trackers/omx/entrypoint.c b/src/gallium/state_trackers/omx/ent

Re: [Mesa-dev] [PATCH 2/4] vl: add drm support for vl_screen

2015-11-05 Thread Christian König
+/** + * + * Copyright 2009 Younes Manton. + * All Rights Reserved. You probably want to change the copyright here. With that fixed the whole series is Reviewed-by: Christian König Regards, Christian. On 05.11.2015 19:

[Mesa-dev] [PATCH v3 2/3] nir: Add new barrier functions for compute shaders

2015-11-05 Thread Jordan Justen
When these functions are called in glsl-ir, we create a corresponding nir intrinsic function call. Signed-off-by: Jordan Justen Reviewed-by: Francisco Jerez --- src/glsl/nir/glsl_to_nir.cpp | 15 +++ src/glsl/nir/nir_intrinsics.h | 11 +++ 2 files changed, 26 insertions(+)

[Mesa-dev] [PATCH v3 1/3] glsl: Add new barrier functions for compute shaders

2015-11-05 Thread Jordan Justen
When these functions are called in GLSL code, we create an intrinsic function call: * groupMemoryBarrier => __intrinsic_group_memory_barrier * memoryBarrierAtomicCounter => __intrinsic_memory_barrier_atomic_counter * memoryBarrierBuffer => __intrinsic_memory_barrier_buffer * memoryBarrierImage

[Mesa-dev] [PATCH v3 3/3] i965/nir/fs: Implement new barrier functions for compute shaders

2015-11-05 Thread Jordan Justen
For these nir intrinsics, we emit the same code as nir_intrinsic_memory_barrier: * nir_intrinsic_memory_barrier_atomic_counter * nir_intrinsic_memory_barrier_buffer * nir_intrinsic_memory_barrier_image We treat these nir intrinsics as no-ops: * nir_intrinsic_group_memory_barrier * nir_intrin

Re: [Mesa-dev] [PATCH] radeonsi: add basic glClearBufferSubData acceleration

2015-11-05 Thread Marek Olšák
On Thu, Nov 5, 2015 at 7:58 PM, Nicolai Hähnle wrote: > On 04.11.2015 00:47, Marek Olšák wrote: >> >> From: Marek Olšák >> >> --- >> src/gallium/drivers/radeonsi/si_blit.c | 55 >> ++ >> 1 file changed, 55 insertions(+) >> >> diff --git a/src/gallium/drivers/rad

Re: [Mesa-dev] [PATCH 1/2] main: Don't restrict several KHR_debug enum to desktop GL

2015-11-05 Thread Emil Velikov
Hi Boyan, On 4 November 2015 at 15:25, Boyan Ding wrote: > In preparation for supporting GL_KHR_debug in OpenGL ES > > Signed-off-by: Boyan Ding > --- > src/mesa/main/enable.c| 5 + > src/mesa/main/getstring.c | 5 + > 2 files changed, 2 insertions(+), 8 deletions(-) > > diff --git

[Mesa-dev] [PATCH] mesa: use the correct string for the ES GL_KHR_debug functions

2015-11-05 Thread Emil Velikov
As defined in the spec when implemented in an OpenGL ES context, all entry points defined by this extension must have a "KHR" suffix. Signed-off-by: Emil Velikov --- The final piece afaict for KHR_debug + ES contexts. Mildly related - the enum tests seems somewhat busted/incomplete. Ext

[Mesa-dev] [PATCHv2] mesa: use the correct string for the ES GL_KHR_debug functions

2015-11-05 Thread Emil Velikov
As defined in the spec when implemented in an OpenGL ES context, all entry points defined by this extension must have a "KHR" suffix. Signed-off-by: Emil Velikov --- Actually build tested this time. src/mesa/main/errors.c | 40 --- src/mesa/mai

Re: [Mesa-dev] [PATCH 13/13] i965/fs_visitor: do not explicitly set outputs[x].file

2015-11-05 Thread Emil Velikov
On 5 November 2015 at 19:15, Matt Turner wrote: > On Thu, Nov 5, 2015 at 8:18 AM, Emil Velikov wrote: >> From: Emil Velikov >> >> This commits partially reverts "i965: Initialize registers' file to >> BAD_FILE." >> >> No longer needed as of commit "i965/fs: properly construct fs_reg" which >> re

Re: [Mesa-dev] [PATCH 05/13] i965/vec4: one dst_reg() constructor less

2015-11-05 Thread Emil Velikov
On 5 November 2015 at 19:04, Matt Turner wrote: > On Thu, Nov 5, 2015 at 8:17 AM, Emil Velikov wrote: >> From: Emil Velikov >> >> Just fold the brw_type_for_base_type() and use a delegated >> constructor. >> >> Note this is a c++11 feature and the compiler will warn us if it's >> set/defaults to

[Mesa-dev] [PATCH] st/va: add mpeg4 startcode workaround

2015-11-05 Thread Leo Liu
From: Boyuan Zhang Signed-off-by: Boyuan Zhang Reviewed-by: Christian König --- src/gallium/state_trackers/va/buffer.c | 24 +- src/gallium/state_trackers/va/context.c| 7 ++ src/gallium/state_trackers/va/picture.c| 117 + src/gallium/state_tracke

Re: [Mesa-dev] [PATCH 13/13] i965/fs_visitor: do not explicitly set outputs[x].file

2015-11-05 Thread Matt Turner
On Thu, Nov 5, 2015 at 12:24 PM, Emil Velikov wrote: > On 5 November 2015 at 19:15, Matt Turner wrote: >> On Thu, Nov 5, 2015 at 8:18 AM, Emil Velikov >> wrote: >>> From: Emil Velikov >>> >>> This commits partially reverts "i965: Initialize registers' file to >>> BAD_FILE." >>> >>> No longer n

  1   2   >