Re: [Mesa-dev] [PATCH v4 (part2) 39/59] nir: Implement lowered SSBO atomic intrinsics

2015-08-06 Thread Iago Toral
On Wed, 2015-08-05 at 12:24 -0700, Connor Abbott wrote: > On Wed, Aug 5, 2015 at 1:30 AM, Iago Toral Quiroga wrote: > > The original GLSL IR intrinsics have been lowered to an internal > > version that accepts a block index and an offset instead of a > > SSBO reference. > > --- > > src/glsl/nir/g

Re: [Mesa-dev] [PATCH v4 (part2) 29/59] nir: Implement __intrinsic_store_ssbo

2015-08-06 Thread Iago Toral
On Wed, 2015-08-05 at 12:17 -0700, Connor Abbott wrote: > On Wed, Aug 5, 2015 at 1:30 AM, Iago Toral Quiroga wrote: > > --- > > src/glsl/nir/glsl_to_nir.cpp | 36 > > src/glsl/nir/nir_intrinsics.h | 12 ++-- > > 2 files changed, 42 insertions(+), 6 de

Re: [Mesa-dev] [PATCH 14/20] i965: Implement logic to set up and upload an image uniform.

2015-08-06 Thread Pohjolainen, Topi
On Wed, Aug 05, 2015 at 01:47:26PM +0300, Francisco Jerez wrote: > "Pohjolainen, Topi" writes: > > > On Wed, Aug 05, 2015 at 10:36:09AM +0300, Pohjolainen, Topi wrote: > >> On Tue, Jul 21, 2015 at 07:38:49PM +0300, Francisco Jerez wrote: > >> > v2: Move the image_params array back to brw_stage_pr

Re: [Mesa-dev] [PATCH v2 21/21] i965/gen7: Resolve GCC sign-compare warning.

2015-08-06 Thread Thomas Helland
The series looks good. You could probably s/GLuint/unsigned in patch three as it is not "in the API", but that's a nitpick. (You're fixing warnings, and not making things worse) Either way the series is: Reviewed-by: Thomas Helland Someone else needs to push these for you (?). AFAIK you don't ha

Re: [Mesa-dev] [PATCH v2 21/21] i965/gen7: Resolve GCC sign-compare warning.

2015-08-06 Thread Rhys Kidd
That is correct Thomas. I do not have commit access to push these myself. On 6 August 2015 at 18:35, Thomas Helland wrote: > The series looks good. You could probably s/GLuint/unsigned > in patch three as it is not "in the API", but that's a nitpick. > (You're fixing warnings, and not making thi

Re: [Mesa-dev] [PATCHv2 08/14] i965: Define and initialize image parameter structure.

2015-08-06 Thread Pohjolainen, Topi
On Wed, Aug 05, 2015 at 12:51:19PM +0300, Pohjolainen, Topi wrote: > On Mon, Jul 20, 2015 at 07:17:48PM +0300, Francisco Jerez wrote: > > This will be used to pass image meta-data to the shader when we cannot > > use typed surface reads and writes. All entries except surface_idx > > and size are o

Re: [Mesa-dev] [PATCHv2 08/14] i965: Define and initialize image parameter structure.

2015-08-06 Thread Pohjolainen, Topi
On Wed, Aug 05, 2015 at 12:11:02PM +0300, Pohjolainen, Topi wrote: > On Mon, Jul 20, 2015 at 07:17:48PM +0300, Francisco Jerez wrote: > > This will be used to pass image meta-data to the shader when we cannot > > use typed surface reads and writes. All entries except surface_idx > > and size are o

Re: [Mesa-dev] [PATCH] glsl: remove stage ref generation for transform feedback

2015-08-06 Thread Tapani Pälli
Reviewed-by: Tapani Pälli On 08/05/2015 04:13 PM, Timothy Arceri wrote: Stage ref cannot be queried for transform feedback. Also simplify the build_stageref function by passing the correct mode for uniforms. Cc: Tapani Pälli --- No piglit regressions, no program_interface_query CTS regress

Re: [Mesa-dev] [PATCH v3] clover: stub missing CL 1.2 functions

2015-08-06 Thread Francisco Jerez
EdB writes: > As sugested by Tom a long time ago > and in order to be able to create Piglit tests > > v2: > replace NOT_SUPPORTED_BY_CL_1_1 macro with an inline function > remove extra space in clLinkProgram arg > > v3: > use __func__ > Hah! Using __func__ *is* an argument to prefer a macro over

Re: [Mesa-dev] [PATCHv2 08/14] i965: Define and initialize image parameter structure.

2015-08-06 Thread Francisco Jerez
"Pohjolainen, Topi" writes: > On Wed, Aug 05, 2015 at 12:11:02PM +0300, Pohjolainen, Topi wrote: >> On Mon, Jul 20, 2015 at 07:17:48PM +0300, Francisco Jerez wrote: >> > This will be used to pass image meta-data to the shader when we cannot >> > use typed surface reads and writes. All entries ex

[Mesa-dev] [PATCH 1/3] nir: Simplify fne(fneg(a), a) -> fne(a, 0.0)

2015-08-06 Thread Thomas Helland
-NaN != NaN, and -Inf != Inf, so this should be safe. Found while working on my VRP pass. Shader-db results on my IVB: total instructions in shared programs: 1698267 -> 1698067 (-0.01%) instructions in affected programs: 15785 -> 15585 (-1.27%) helped:36 HURT:

[Mesa-dev] [PATCH 0/3] NIR: Simplifications of fne/feq

2015-08-06 Thread Thomas Helland
These where found when going through the mysteriously high gains I got from the VRP pass. My pass was doing bad things, but upon inspection I found these. First patch is benefitial, the rest shows no change on a shader-db run on my system. Thomas Helland (3): nir: Simplify fne(fneg(a), a) -> fne

[Mesa-dev] [PATCH 3/3] nir: Simplify ine/ieq(ineg(a), a) -> ine/ieq(a, 0)

2015-08-06 Thread Thomas Helland
The same rationale as in the other patches. No shader-db changes. Signed-off-by: Thomas Helland --- src/glsl/nir/nir_opt_algebraic.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/glsl/nir/nir_opt_algebraic.py b/src/glsl/nir/nir_opt_algebraic.py index 3e483fb..d005f81 100644 --- a/s

[Mesa-dev] [PATCH 2/3] nir: Simplify feq(fneg(a), a)) -> feq(a, 0.0)

2015-08-06 Thread Thomas Helland
The positive and negative value of a float can only be equal to each other if it is -0.0f and 0.0f. This is safe for Nan and Inf, as -Nan != Nan, and -Inf != Inf This gives no changes in my shader-db Signed-off-by: Thomas Helland --- src/glsl/nir/nir_opt_algebraic.py | 1 + 1 file changed, 1 ins

[Mesa-dev] [Bug 91263] R600 Segfault in finalize_textures

2015-08-06 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=91263 Marek Olšák changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

Re: [Mesa-dev] [PATCHv2 09/14] i965: Reserve enough parameter entries for all image uniforms used in the program.

2015-08-06 Thread Pohjolainen, Topi
On Mon, Jul 20, 2015 at 07:23:00PM +0300, Francisco Jerez wrote: > v2: Add CS support. > --- > src/mesa/drivers/dri/i965/brw_cs.cpp | 3 ++- > src/mesa/drivers/dri/i965/brw_gs.c | 1 + > src/mesa/drivers/dri/i965/brw_vs.c | 3 ++- > src/mesa/drivers/dri/i965/brw_wm.c | 3 ++- > 4 files chang

Re: [Mesa-dev] [PATCHv2 10/14] i965: Hook up image state upload.

2015-08-06 Thread Pohjolainen, Topi
On Mon, Jul 20, 2015 at 07:23:47PM +0300, Francisco Jerez wrote: > v2: Add CS support. Move the image_params array back to > brw_stage_prog_data. Reviewed-by: Topi Pohjolainen > --- > src/mesa/drivers/dri/i965/brw_context.h | 10 +++- > src/mesa/drivers/dri/i965/brw_gs_surface_sta

Re: [Mesa-dev] [PATCH v2] mesa: add missing queries for ARB_direct_state_access

2015-08-06 Thread Brian Paul
On 08/06/2015 07:44 AM, Daniel Scharrer wrote: CC: "10.6" --- v2: added CC for 10.6 renamed _mesa_tex_target_to_index to tex_target_to_index moved declaration of variable before code added missing spaces in ternary operators src/mesa/main/get.c | 93 +

[Mesa-dev] [PATCH v2] mesa: add missing queries for ARB_direct_state_access

2015-08-06 Thread Daniel Scharrer
CC: "10.6" --- v2: added CC for 10.6 renamed _mesa_tex_target_to_index to tex_target_to_index moved declaration of variable before code added missing spaces in ternary operators src/mesa/main/get.c | 93 src/mesa/main/texparam.c

Re: [Mesa-dev] [PATCHv2 09/14] i965: Reserve enough parameter entries for all image uniforms used in the program.

2015-08-06 Thread Francisco Jerez
"Pohjolainen, Topi" writes: > On Mon, Jul 20, 2015 at 07:23:00PM +0300, Francisco Jerez wrote: >> v2: Add CS support. >> --- >> src/mesa/drivers/dri/i965/brw_cs.cpp | 3 ++- >> src/mesa/drivers/dri/i965/brw_gs.c | 1 + >> src/mesa/drivers/dri/i965/brw_vs.c | 3 ++- >> src/mesa/drivers/dri/i9

Re: [Mesa-dev] [PATCHv2 08/14] i965: Define and initialize image parameter structure.

2015-08-06 Thread Francisco Jerez
Francisco Jerez writes: > "Pohjolainen, Topi" writes: > >> On Wed, Aug 05, 2015 at 12:11:02PM +0300, Pohjolainen, Topi wrote: >>> On Mon, Jul 20, 2015 at 07:17:48PM +0300, Francisco Jerez wrote: >>> > This will be used to pass image meta-data to the shader when we cannot >>> > use typed surface

Re: [Mesa-dev] [PATCH 3/3] nir: Simplify ine/ieq(ineg(a), a) -> ine/ieq(a, 0)

2015-08-06 Thread Boyan Ding
But, isn't -INT_MIN == INT_MIN? Regards, Boyan Ding 2015-08-06 19:36 GMT+08:00 Thomas Helland : > The same rationale as in the other patches. > No shader-db changes. > > Signed-off-by: Thomas Helland > --- > src/glsl/nir/nir_opt_algebraic.py | 2 ++ > 1 file changed, 2 insertions(+) > > diff --

Re: [Mesa-dev] [PATCH v3 2/4] i965/vec4: do not predicate scratch writes for BRW_OPCODE_SEL instructions

2015-08-06 Thread Francisco Jerez
Iago Toral Quiroga writes: > The dst is always written, in this case the predicate is only used to select > the value to write, so if we are spilling the dst we always want to write > whatever value we selected to scratch. > --- > src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 3 ++- > 1 file

Re: [Mesa-dev] [PATCH v3 3/4] i965/vec4: Fix indentation in vec4_visitor::evaluate_spill_costs

2015-08-06 Thread Francisco Jerez
Iago Toral Quiroga writes: > --- > .../drivers/dri/i965/brw_vec4_reg_allocate.cpp | 24 > +++--- > 1 file changed, 12 insertions(+), 12 deletions(-) > > diff --git a/src/mesa/drivers/dri/i965/brw_vec4_reg_allocate.cpp > b/src/mesa/drivers/dri/i965/brw_vec4_reg_allocate.cpp

Re: [Mesa-dev] [PATCH v2 3/6] i965/vec4: Don't emit scratch reads for a spilled register we have just written

2015-08-06 Thread Francisco Jerez
Francisco Jerez writes: > Iago Toral writes: > >> On Fri, 2015-07-31 at 13:12 +0300, Francisco Jerez wrote: >>> Iago Toral writes: >>> >>> > On Thu, 2015-07-30 at 17:08 +0300, Francisco Jerez wrote: >>> >> Iago Toral Quiroga writes: >>> >> >>> >> > When we have code such as this: >>> >> > >>

Re: [Mesa-dev] [PATCH] gallium/radeon: add a debug flag not to use write combining

2015-08-06 Thread Marek Olšák
On a related note, can we disable HDP flushes and other flushes for USWC when we don't use write combining and CPU writes to VRAM? Maybe by adding a per-IB flag that would instruct the kernel to flush or not flush HDP? Marek On Wed, Aug 5, 2015 at 4:18 AM, Michel Dänzer wrote: > On 03.08.2015 21

[Mesa-dev] [PATCH] gallium/radeon: add a debug flag not to use write combining (v2)

2015-08-06 Thread Marek Olšák
From: Marek Olšák v2: just clear the flag before the allocation --- src/gallium/drivers/radeon/r600_buffer_common.c | 3 +++ src/gallium/drivers/radeon/r600_pipe_common.c | 1 + src/gallium/drivers/radeon/r600_pipe_common.h | 1 + 3 files changed, 5 insertions(+) diff --git a/src/gallium/dr

Re: [Mesa-dev] [PATCH] gallium/radeon: add a debug flag not to use write combining

2015-08-06 Thread Christian König
can we disable HDP flushes and other flushes for USWC when we don't use write combining and CPU writes to VRAM? Nope, write combining happens in the CPU before the write request is send over the PCIe bus. The HDP is a (rather small) read/write cache in GPUs memory controller as far as I know.

Re: [Mesa-dev] [PATCH 1/3] nir: Simplify fne(fneg(a), a) -> fne(a, 0.0)

2015-08-06 Thread Aaron Watry
On Thu, Aug 6, 2015 at 6:36 AM, Thomas Helland wrote: > -NaN != NaN, and -Inf != Inf, so this should be safe. > What about -0.0 ? Does feq/fne treat both negative and positive zero as equivalent? --Aaron > Found while working on my VRP pass. > > Shader-db results on my IVB: > total instructi

Re: [Mesa-dev] [PATCH 1/3] nir: Simplify fne(fneg(a), a) -> fne(a, 0.0)

2015-08-06 Thread Aaron Watry
Nevermind. Patch 2 answers that question in the commit message. --Aaron On Thu, Aug 6, 2015 at 10:25 AM, Aaron Watry wrote: > > > On Thu, Aug 6, 2015 at 6:36 AM, Thomas Helland > wrote: > >> -NaN != NaN, and -Inf != Inf, so this should be safe. >> > > What about -0.0 ? Does feq/fne treat both

Re: [Mesa-dev] [PATCH v3 4/4] i965/vec4: Don't unspill the same register in consecutive instructions

2015-08-06 Thread Francisco Jerez
Iago Toral Quiroga writes: > If we have spilled/unspilled a register in the current instruction, avoid > emitting unspills for the same register in the same instruction or consecutive > instructions following the current one as long as they keep reading the > spilled > register. This should allo

Re: [Mesa-dev] [PATCH 3/4] tnl: Maintain the _WindowMap matrix in TNLcontext v2.

2015-08-06 Thread Ilia Mirkin
On Thu, Apr 2, 2015 at 12:30 PM, wrote: > From: Mathias Froehlich > > Hi Brian, > > Thanks for the review! > The Patch with unneeded parentheses removed. > Ok, to push? > > Greetings > > Mathias > > > This is the only real user of _WindowMap which has the depth > buffer scaling multiplied in. Ma

[Mesa-dev] [PATCH 2/3] gallium/ttn: Use nir_builder_insert() rather than poking at cf_list.

2015-08-06 Thread Kenneth Graunke
I intend to remove nir_builder::cf_node_list, so I can't have this code poking at it directly. The proper way is to set the insertion point and then simply insert things there. Signed-off-by: Kenneth Graunke --- src/gallium/auxiliary/nir/tgsi_to_nir.c | 32 1 fi

[Mesa-dev] [PATCH 1/3] prog_to_nir: Use nir_builder_insert() rather than poking at cf_list.

2015-08-06 Thread Kenneth Graunke
I intend to remove nir_builder::cf_node_list, so I can't have this code poking at it directly. The proper way is to set the insertion point and then simply insert things there. Signed-off-by: Kenneth Graunke --- src/mesa/program/prog_to_nir.c | 22 +++--- 1 file changed, 11 inse

[Mesa-dev] [RFC][PATCH] nir: Add a value range propagation pass

2015-08-06 Thread Thomas Helland
It is now mostly working, and I've incorporated a bunch of the feedback I got on the last posting. I promised to have it out on the list by american office hours today, so here it goes. There is a massive issue with the compare_entries function. I'm hacking on that atm, trying to come up with a so

[Mesa-dev] [PATCH 3/3] nir: Convert the builder to use the new NIR cursor API.

2015-08-06 Thread Kenneth Graunke
The NIR cursor API is exactly what we want for the builder's insertion point. This simplifies the API, the implementation, and is actually more flexible as well. This required a bit of reworking of TGSI->NIR's if/loop stack handling; we now store cursors instead of cf_node_lists, for better or wo

Re: [Mesa-dev] [PATCH v4 (part2) 39/59] nir: Implement lowered SSBO atomic intrinsics

2015-08-06 Thread Connor Abbott
On Thu, Aug 6, 2015 at 12:23 AM, Iago Toral wrote: > On Wed, 2015-08-05 at 12:24 -0700, Connor Abbott wrote: >> On Wed, Aug 5, 2015 at 1:30 AM, Iago Toral Quiroga wrote: >> > The original GLSL IR intrinsics have been lowered to an internal >> > version that accepts a block index and an offset ins

[Mesa-dev] [PATCH] i965: Rename MIPTREE_LAYOUT_ALLOC_* -> MIPTREE_LAYOUT_TILING_*.

2015-08-06 Thread Matt Turner
Ben suggested that I rename MIPTREE_LAYOUT_ALLOC_ANY_TILED since it needed to include no tiling at all, but the name MIPTREE_LAYOUT_ALLOC_ANY is pretty nondescriptive. We can avoid confusion by replacing "ALLOC" with "TILING" in the identifiers. --- Once reviewed, I plan to land the patches in the

Re: [Mesa-dev] [PATCH] i965: Request a miptree with no tiling intel_miptree_map_blit().

2015-08-06 Thread Ben Widawsky
On Wed, Aug 05, 2015 at 06:54:06PM -0700, Matt Turner wrote: > Regression since commit 3a31876600, when tiling modes were moved into > layout_flags. > --- > src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/mesa/drivers/dri/

[Mesa-dev] [PATCH 1/3] glsl/cs: Add gl_GlobalInvocationID variable

2015-08-06 Thread Jordan Justen
Signed-off-by: Jordan Justen --- src/glsl/builtin_variables.cpp | 2 ++ src/glsl/shader_enums.h| 1 + 2 files changed, 3 insertions(+) diff --git a/src/glsl/builtin_variables.cpp b/src/glsl/builtin_variables.cpp index 8fa7b19..5154b2f 100644 --- a/src/glsl/builtin_variables.cpp +++ b/src

[Mesa-dev] [PATCH 0/3] cs: Add gl_GlobalInvocationID

2015-08-06 Thread Jordan Justen
git://people.freedesktop.org/~jljusten/mesa cs-global-id-v1 http://patchwork.freedesktop.org/bundle/jljusten/cs-global-id-v1 For i965, these also depend on the texture sampling series: http://patchwork.freedesktop.org/bundle/jljusten/cs%20texture%20sampling/ And the gl_LocalInvocationID series: h

[Mesa-dev] [PATCH 2/3] glsl/cs: Lower gl_GlobalInvocationID variable

2015-08-06 Thread Jordan Justen
We lower this based on the extension spec formula: gl_GlobalInvocationID = gl_WorkGroupID * gl_WorkGroupSize + gl_LocalInvocationID Suggested-by: Kenneth Graunke Signed-off-by: Jordan Justen --- src/glsl/Makefile.sources | 1 + src/glsl/ir_optimization.h | 1 + src/gl

[Mesa-dev] [PATCH 3/3] glsl: Mark gl_GlobalInvocationID dependencies as used

2015-08-06 Thread Jordan Justen
gl_GlobalInvocationID = gl_WorkGroupID * gl_WorkGroupSize + gl_LocalInvocationID Therefore, if gl_GlobalInvocationID is used, then we mark these other variables as being used. This prevents them from being considered dead variables and being removed. Signed-off-by: Jordan Justen --- src/glsl/

Re: [Mesa-dev] [PATCH v4 (part2) 29/59] nir: Implement __intrinsic_store_ssbo

2015-08-06 Thread Connor Abbott
On Thu, Aug 6, 2015 at 12:30 AM, Iago Toral wrote: > On Wed, 2015-08-05 at 12:17 -0700, Connor Abbott wrote: >> On Wed, Aug 5, 2015 at 1:30 AM, Iago Toral Quiroga wrote: >> > --- >> > src/glsl/nir/glsl_to_nir.cpp | 36 >> > src/glsl/nir/nir_intrinsics.h | 12

Re: [Mesa-dev] [PATCH 3/3] glsl: Mark gl_GlobalInvocationID dependencies as used

2015-08-06 Thread Ilia Mirkin
Why doesn't the lowering pass do that? Do you need to call it earlier? Or does it rely on some information that only becomes available later? On Thu, Aug 6, 2015 at 2:01 PM, Jordan Justen wrote: > gl_GlobalInvocationID = > gl_WorkGroupID * gl_WorkGroupSize + gl_LocalInvocationID > > Therefore,

Re: [Mesa-dev] [PATCH] i965: Rename MIPTREE_LAYOUT_ALLOC_* -> MIPTREE_LAYOUT_TILING_*.

2015-08-06 Thread Ben Widawsky
On Thu, Aug 06, 2015 at 11:03:55AM -0700, Matt Turner wrote: > Ben suggested that I rename MIPTREE_LAYOUT_ALLOC_ANY_TILED since it > needed to include no tiling at all, but the name > MIPTREE_LAYOUT_ALLOC_ANY is pretty nondescriptive. We can avoid > confusion by replacing "ALLOC" with "TILING" in t

Re: [Mesa-dev] [PATCH 3/3] glsl: Mark gl_GlobalInvocationID dependencies as used

2015-08-06 Thread Ilia Mirkin
By the way, there are a number of these derived system values... instead of creating lowering for all of them, have you considered just starting out *every* CS with the instructions to compute them and then not having any lowering at all? The dead code elim should take care of removing any that are

Re: [Mesa-dev] [PATCH] i965: Rename MIPTREE_LAYOUT_ALLOC_* -> MIPTREE_LAYOUT_TILING_*.

2015-08-06 Thread Matt Turner
On Thu, Aug 6, 2015 at 11:14 AM, Ben Widawsky wrote: > On Thu, Aug 06, 2015 at 11:03:55AM -0700, Matt Turner wrote: >> Ben suggested that I rename MIPTREE_LAYOUT_ALLOC_ANY_TILED since it >> needed to include no tiling at all, but the name >> MIPTREE_LAYOUT_ALLOC_ANY is pretty nondescriptive. We ca

Re: [Mesa-dev] [PATCH] i965: Rename MIPTREE_LAYOUT_ALLOC_* -> MIPTREE_LAYOUT_TILING_*.

2015-08-06 Thread Ben Widawsky
On Thu, Aug 06, 2015 at 11:39:04AM -0700, Matt Turner wrote: > On Thu, Aug 6, 2015 at 11:14 AM, Ben Widawsky wrote: > > On Thu, Aug 06, 2015 at 11:03:55AM -0700, Matt Turner wrote: > >> Ben suggested that I rename MIPTREE_LAYOUT_ALLOC_ANY_TILED since it > >> needed to include no tiling at all, but

Re: [Mesa-dev] [PATCH 3/3] nir: Simplify ine/ieq(ineg(a), a) -> ine/ieq(a, 0)

2015-08-06 Thread Thomas Helland
2015-08-06 16:22 GMT+02:00 Boyan Ding : > But, isn't -INT_MIN == INT_MIN? > > Regards, > Boyan Ding > Yup. That's correct. Thanks for pointing that out. That means this patch is wrong, so I NAK myself on this one. Regards, ThoHel > 2015-08-06 19:36 GMT+08:00 Thomas Helland : >> The same rational

[Mesa-dev] [PATCH 0/5] VDPAU HEVC decoding and other fixes

2015-08-06 Thread Marek Olšák
Hi, These are state tracker patches for HEVC decoding and other stuff. It was all done by Christian König and Leo Liu as part of working on GCN 1.2 hardware support. I'm sending this mainly for non-AMD developers who would like to review it. Marek __

[Mesa-dev] [PATCH 3/5] st/omx/enc: flush after eos handling v2

2015-08-06 Thread Marek Olšák
From: Leo Liu v2 (chk): reorder the flush Signed-off-by: Leo Liu Signed-off-by: Christian König Acked-by: Alex Deucher --- src/gallium/state_trackers/omx/vid_enc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/state_trackers/omx/vid_enc.c b/src/gallium/state_trackers/omx/v

[Mesa-dev] [PATCH 4/5] st/omx/enc: stack frame tasks for the gathering

2015-08-06 Thread Marek Olšák
From: Leo Liu Put tasks to the FIFO queue for results Signed-off-by: Leo Liu Acked-by: Alex Deucher Reviewed-by: Christian König --- src/gallium/state_trackers/omx/vid_enc.c | 20 +++- src/gallium/state_trackers/omx/vid_enc.h | 4 +++- 2 files changed, 22 insertions(+), 2 de

[Mesa-dev] [PATCH 1/5] vl: add cap for stacking frames

2015-08-06 Thread Marek Olšák
From: Leo Liu Signed-off-by: Leo Liu Acked-by: Alex Deucher Reviewed-by: Christian König --- src/gallium/include/pipe/p_video_enums.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/include/pipe/p_video_enums.h b/src/gallium/include/pipe/p_video_enums.h inde

[Mesa-dev] [PATCH 2/5] vl: add HEVC profiles and defines

2015-08-06 Thread Marek Olšák
From: Christian König Signed-off-by: Christian König Reviewed-by: Leo Liu --- src/gallium/auxiliary/util/u_video.h | 7 +++ src/gallium/include/pipe/p_video_enums.h | 10 ++- src/gallium/include/pipe/p_video_state.h | 105 +++ 3 files changed, 120 insertions

[Mesa-dev] [PATCH 5/5] st/vdpau: add HEVC support v2

2015-08-06 Thread Marek Olšák
From: Christian König v2: fix return code Signed-off-by: Christian König Reviewed-by: Leo Liu --- configure.ac | 2 +- src/gallium/state_trackers/vdpau/decode.c| 122 ++- src/gallium/state_trackers/vdpau/vdpau_private.h | 20

Re: [Mesa-dev] [PATCH 3/3] nir: Simplify ine/ieq(ineg(a), a) -> ine/ieq(a, 0)

2015-08-06 Thread Matt Turner
(Don't top quote) On Thu, Aug 6, 2015 at 7:22 AM, Boyan Ding wrote: > But, isn't -INT_MIN == INT_MIN? In C (-INT_MIN) is undefined since it relies on behavior of signed integer overflow. In GLSL though, I think you're right. The spec says that addition subtraction, and shift operations (weird t

Re: [Mesa-dev] [PATCH 3/3] nir: Simplify ine/ieq(ineg(a), a) -> ine/ieq(a, 0)

2015-08-06 Thread Thomas Helland
2015-08-07 0:08 GMT+02:00 Matt Turner : > (Don't top quote) > > On Thu, Aug 6, 2015 at 7:22 AM, Boyan Ding wrote: >> But, isn't -INT_MIN == INT_MIN? > > In C (-INT_MIN) is undefined since it relies on behavior of signed > integer overflow. > > In GLSL though, I think you're right. The spec says th

Re: [Mesa-dev] [PATCH 3/3] nir: Simplify ine/ieq(ineg(a), a) -> ine/ieq(a, 0)

2015-08-06 Thread Ilia Mirkin
On Thu, Aug 6, 2015 at 6:08 PM, Matt Turner wrote: > (Don't top quote) > > On Thu, Aug 6, 2015 at 7:22 AM, Boyan Ding wrote: >> But, isn't -INT_MIN == INT_MIN? > > In C (-INT_MIN) is undefined since it relies on behavior of signed > integer overflow. > > In GLSL though, I think you're right. The

Re: [Mesa-dev] [RFC][PATCH] nir: Add a value range propagation pass

2015-08-06 Thread Thomas Helland
2015-08-06 19:22 GMT+02:00 Thomas Helland : > It is now mostly working, and I've incorporated a bunch > of the feedback I got on the last posting. I promised to > have it out on the list by american office hours today, > so here it goes. > > There is a massive issue with the compare_entries functio

Re: [Mesa-dev] [PATCH 3/3] nir: Convert the builder to use the new NIR cursor API.

2015-08-06 Thread Eric Anholt
Kenneth Graunke writes: > The NIR cursor API is exactly what we want for the builder's insertion > point. This simplifies the API, the implementation, and is actually > more flexible as well. > > This required a bit of reworking of TGSI->NIR's if/loop stack handling; > we now store cursors inste

Re: [Mesa-dev] [PATCH 1/3] nir: Simplify fne(fneg(a), a) -> fne(a, 0.0)

2015-08-06 Thread Matt Turner
On Thu, Aug 6, 2015 at 4:36 AM, Thomas Helland wrote: > -NaN != NaN, and -Inf != Inf, so this should be safe. > Found while working on my VRP pass. > > Shader-db results on my IVB: > total instructions in shared programs: 1698267 -> 1698067 (-0.01%) > instructions in affected programs: 15785 -

Re: [Mesa-dev] [PATCH 2/3] nir: Simplify feq(fneg(a), a)) -> feq(a, 0.0)

2015-08-06 Thread Matt Turner
On Thu, Aug 6, 2015 at 4:36 AM, Thomas Helland wrote: > The positive and negative value of a float can only > be equal to each other if it is -0.0f and 0.0f. > This is safe for Nan and Inf, as -Nan != Nan, and -Inf != Inf > This gives no changes in my shader-db > > Signed-off-by: Thomas Helland >

Re: [Mesa-dev] [PATCH 3/3] nir: Convert the builder to use the new NIR cursor API.

2015-08-06 Thread Kenneth Graunke
On Thursday, August 06, 2015 10:15:24 AM Kenneth Graunke wrote: > -static inline void > -nir_builder_insert_after_instr(nir_builder *build, nir_instr *after_instr) > +nir_builder_instr_insert(nir_builder *build, nir_instr *instr) > { > - build->cf_node_list = NULL; > - build->before_instr = NU

Re: [Mesa-dev] [PATCH 3/3] nir: Convert the builder to use the new NIR cursor API.

2015-08-06 Thread Connor Abbott
So, I was sort of imagining that we'd want to go a little farther with this, and make nir_instr_insert_before/after_* a wrapper around a cursor based API just called "nir_instr_insert". Then nir_builder_instr_insert() would become even simpler, since it would just call nir_instr_insert() and then p

[Mesa-dev] [PATCH 01/13] c11/threads: Assert that mtx is non-NULL and check return values.

2015-08-06 Thread Matt Turner
Passing NULL to C11 threads functions isn't safe, so there's no need for our implementation to handle it. Cuts about 1k of .text. text data bss dec hex filename 5009514 19844026328 5234282 4fde6a i965_dri.so before 5008346 19844026328 5233114 4fd9da i965_

[Mesa-dev] [PATCH 06/13] mesa: Replace sampler object locks with atomic inc/dec.

2015-08-06 Thread Matt Turner
--- src/mesa/main/mtypes.h | 1 - src/mesa/main/samplerobj.c | 16 +++- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 2adfae2..fcc527f 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -1153,

[Mesa-dev] [PATCH 11/13] mesa: Replace uses of Shared->Mutex with hash-table mutexes

2015-08-06 Thread Matt Turner
We were locking the Shared->Mutex and then using calling functions like _mesa_HashInsert that do additional per-hash-table locking internally. Instead just lock each hash-table's mutex and use functions like _mesa_HashInsertLocked and the new _mesa_HashRemoveLocked. In order to do this, we need t

[Mesa-dev] [PATCH 08/13] mesa: Replace renderbuffer object locks with atomic inc/dec.

2015-08-06 Thread Matt Turner
--- src/mesa/main/fbobject.c | 1 - src/mesa/main/mtypes.h | 1 - src/mesa/main/renderbuffer.c | 15 +++ 3 files changed, 3 insertions(+), 14 deletions(-) diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index cc342c2..918889e 100644 --- a/src/mesa/main/fbo

[Mesa-dev] [PATCH 00/13] mesa: Locking improvements and optimizations

2015-08-06 Thread Matt Turner
Patches 1-11 improve performance of SynMark OglBatch7 by 6.29586% +/- 0.277734% (n=337) and OglMultithread by 1.12564% +/- 0.424038% (n=209). I haven't benchmarked individual patches because I'd like to not waste all that time if I get review feedback that requires me to change things. :) Patches

[Mesa-dev] [PATCH 10/13] hash: Add _mesa_HashRemoveLocked() function.

2015-08-06 Thread Matt Turner
--- src/mesa/main/hash.c | 19 +++ src/mesa/main/hash.h | 2 ++ 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/src/mesa/main/hash.c b/src/mesa/main/hash.c index 315b5d6..aa1c6a1 100644 --- a/src/mesa/main/hash.c +++ b/src/mesa/main/hash.c @@ -328,8 +328,8 @@ _mesa

[Mesa-dev] [PATCH 13/13] mesa: Remove deleteFlag pattern.

2015-08-06 Thread Matt Turner
--- src/mesa/main/arrayobj.c| 4 +--- src/mesa/main/framebuffer.c | 4 +--- src/mesa/main/pipelineobj.c | 4 +--- src/mesa/main/shaderobj.c | 8 ++-- 4 files changed, 5 insertions(+), 15 deletions(-) diff --git a/src/mesa/main/arrayobj.c b/src/mesa/main/arrayobj.c index f581e4c..da6757e

[Mesa-dev] [PATCH 02/13] mesa: Remove debugging code from _mesa_reference_*.

2015-08-06 Thread Matt Turner
--- src/mesa/main/arrayobj.c | 8 src/mesa/main/bufferobj.c| 17 - src/mesa/main/renderbuffer.c | 2 -- src/mesa/main/samplerobj.c | 8 src/mesa/main/shaderobj.c| 12 src/mesa/program/program.c | 14 -- 6 files changed,

[Mesa-dev] [PATCH 03/13] mesa: Add locking to sampler objects.

2015-08-06 Thread Matt Turner
--- src/mesa/main/mtypes.h | 1 + src/mesa/main/samplerobj.c | 10 ++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 4e00fb6..962dad9 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -1153,6 +1153

[Mesa-dev] [PATCH 12/13] mesa: Remove unnecessary locking from container objects.

2015-08-06 Thread Matt Turner
"Container objects" like vertex array objects, framebuffer objects, and pipeline objects are not shared between contexts, so they require no locking. --- src/mesa/main/arrayobj.c| 6 -- src/mesa/main/fbobject.c| 9 - src/mesa/main/framebuffer.c | 9 - src/mesa/main/mtyp

[Mesa-dev] [PATCH 07/13] mesa: Replace program locks with atomic inc/dec.

2015-08-06 Thread Matt Turner
--- src/mesa/main/mtypes.h | 1 - src/mesa/program/program.c | 15 +++ 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index fcc527f..c597ccc 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -2095,7

[Mesa-dev] [PATCH 05/13] mesa: Replace buffer object locks with atomic inc/dec.

2015-08-06 Thread Matt Turner
--- src/mesa/main/bufferobj.c | 17 +++-- src/mesa/main/mtypes.h| 1 - 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c index cc035ff..78af229 100644 --- a/src/mesa/main/bufferobj.c +++ b/src/mesa/main/bufferobj.

[Mesa-dev] [PATCH 09/13] mesa: Replace texture buffer object locks with atomic inc/dec.

2015-08-06 Thread Matt Turner
--- src/mesa/main/mtypes.h | 1 - src/mesa/main/texobj.c | 17 +++-- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index b8329a0..43d2f67 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -1180,7 +1180

[Mesa-dev] [PATCH 04/13] mesa: Add locking to programs.

2015-08-06 Thread Matt Turner
--- src/mesa/main/mtypes.h | 1 + src/mesa/program/program.c | 19 +++ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 962dad9..19f65ee 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -20

Re: [Mesa-dev] [PATCH 00/21] NIR control flow modification

2015-08-06 Thread Kenneth Graunke
On Tuesday, July 21, 2015 07:54:14 PM Connor Abbott wrote: > Back when I was getting NIR up and running, I created a bunch of > functions that dealt with modifying control flow; they allowed you to > remove control flow nodes (if's, loops, and basic blocks) as well as > insert newly-created control

[Mesa-dev] [PATCH 2/2] mesa: _mesa_format_convert should be endian agnostic

2015-08-06 Thread Christian Zigotzky
Hi All, Are there any news about the status of the r600g driver for PowerPC? All PowerPC users can only use Radeon HD6XXX graphics cards and lower cards for 3D acceleration. It isn't possible to activate 3D acceleration on Radeon HD7XXX and higher. Rgds, Christian On 05 August 2015 at 08:4

[Mesa-dev] driDriverAPI help

2015-08-06 Thread Daniel Melo Jorge da Cunha
Yes, yes... I know this is an expert group but I searched the whole web, sent a few emails and nothing... this is driving me mad... The point is driDriverAPI is initialized in src/gallium/state_trackers/dri/drm/dri2.c but this variable is only used in src/mesa/drivers... mesa3d web site states th

Re: [Mesa-dev] [PATCH 02/13] mesa: Remove debugging code from _mesa_reference_*.

2015-08-06 Thread Timothy Arceri
Reviewed-by: Timothy Arceri On Thu, 2015-08-06 at 17:10 -0700, Matt Turner wrote: > --- > src/mesa/main/arrayobj.c | 8 > src/mesa/main/bufferobj.c| 17 - > src/mesa/main/renderbuffer.c | 2 -- > src/mesa/main/samplerobj.c | 8 > src/mesa/main/shade

Re: [Mesa-dev] [PATCH 01/13] c11/threads: Assert that mtx is non-NULL and check return values.

2015-08-06 Thread Timothy Arceri
On Thu, 2015-08-06 at 17:10 -0700, Matt Turner wrote: > Passing NULL to C11 threads functions isn't safe, so there's no need for > our implementation to handle it. Cuts about 1k of .text. > >text data bss dec hex filename > 5009514 19844026328 5234282 4fde6a i965_

[Mesa-dev] [PATCH] nir: Delete the nir_function_impl::start_block field.

2015-08-06 Thread Kenneth Graunke
It's simply the first nir_cf_node in the nir_function_impl::body list, which is easy enough to access - we don't to store a pointer to it explicitly. Removing it means we don't need to maintain the pointer when, say, splitting the start block when modifying control flow. Thanks to Connor Abbott f

Re: [Mesa-dev] [PATCH] gallium/radeon: add a debug flag not to use write combining

2015-08-06 Thread Michel Dänzer
On 07.08.2015 00:17, Christian König wrote: >> can we disable HDP flushes and other flushes for USWC What other flushes are you thinking of? If you mean the mb() in the kernel which flushes the write-combining buffers, that's also needed for the register writes regardless of write-combining. >>

Re: [Mesa-dev] [Mesa-dev, 1/9] mesa/es3.1: Allow binding GL_DRAW_INDIRECT_BUFFER with gles 3.1

2015-08-06 Thread Tapani Pälli
On 07/31/2015 04:18 PM, Lofstedt, Marta wrote: Thanks Tapani, However, For patch 9 there is a V3 for which I can't see any new objections: http://patchwork.freedesktop.org/patch/51879/ This looks good to me. If you have any new ones could you please clarify. My interpretation of the comm

Re: [Mesa-dev] [PATCH v4 (part2) 29/59] nir: Implement __intrinsic_store_ssbo

2015-08-06 Thread Iago Toral
On Thu, 2015-08-06 at 11:06 -0700, Connor Abbott wrote: > On Thu, Aug 6, 2015 at 12:30 AM, Iago Toral wrote: > > On Wed, 2015-08-05 at 12:17 -0700, Connor Abbott wrote: > >> On Wed, Aug 5, 2015 at 1:30 AM, Iago Toral Quiroga > >> wrote: > >> > --- > >> > src/glsl/nir/glsl_to_nir.cpp | 36 +

Re: [Mesa-dev] [PATCH v3 4/4] i965/vec4: Don't unspill the same register in consecutive instructions

2015-08-06 Thread Iago Toral
On Thu, 2015-08-06 at 18:27 +0300, Francisco Jerez wrote: > Iago Toral Quiroga writes: > > > If we have spilled/unspilled a register in the current instruction, avoid > > emitting unspills for the same register in the same instruction or > > consecutive > > instructions following the current one

Re: [Mesa-dev] [PATCH 3/4] tnl: Maintain the _WindowMap matrix in TNLcontext v2.

2015-08-06 Thread Mathias Fröhlich
Hi, On Thursday, August 06, 2015 12:32:18 Ilia Mirkin wrote: > > @@ -182,6 +187,13 @@ _tnl_InvalidateState( struct gl_context *ctx, GLuint > > new_state ) > > } > >} > > } > > + > > + if (new_state & (_NEW_VIEWPORT | _NEW_BUFFERS)) { > > + double scale[3], translate[3

Re: [Mesa-dev] [PATCH] gallium/radeon: add a debug flag not to use write combining (v2)

2015-08-06 Thread Michel Dänzer
On 07.08.2015 00:11, Marek Olšák wrote: > From: Marek Olšák > > v2: just clear the flag before the allocation > --- > src/gallium/drivers/radeon/r600_buffer_common.c | 3 +++ > src/gallium/drivers/radeon/r600_pipe_common.c | 1 + > src/gallium/drivers/radeon/r600_pipe_common.h | 1 + > 3 fil