Re: [Mesa-dev] [PATCH 1/2] i965: Combine some dead code elimination NOP'ing code.

2017-01-14 Thread Kenneth Graunke
On Saturday, January 14, 2017 11:09:53 PM PST Francisco Jerez wrote: > Hi Ken! > > Kenneth Graunke writes: > > > In theory we might have incorrectly NOP'd instructions that write the > > flag, but where that flag value isn't used, and yet the instruction > > either writes the accumulator or has

Re: [Mesa-dev] [PATCH 1/2] i965: Combine some dead code elimination NOP'ing code.

2017-01-14 Thread Francisco Jerez
Hi Ken! Kenneth Graunke writes: > In theory we might have incorrectly NOP'd instructions that write the > flag, but where that flag value isn't used, and yet the instruction > either writes the accumulator or has side effects. > > I don't believe any such instructions exist, so this is mostly a

[Mesa-dev] [Bug 97921] Mesa-only glBlitFrameBuffer error

2017-01-14 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=97921 --- Comment #4 from Maxqia --- Possible Fix : https://lists.freedesktop.org/archives/mesa-dev/2016-October/131135.html -- You are receiving this mail because: You are the QA Contact for the bug. You are the assignee for the bug.

Re: [Mesa-dev] [PATCH] i965: Make BLORP disable the NP Z PMA stall fix.

2017-01-14 Thread Jason Ekstrand
I thought I'd fixed this already... In any case Reviewed-by: Jason Ekstrand you should probably cc stable On Sat, Jan 14, 2017 at 4:23 PM, Kenneth Graunke wrote: > This may fix GPU hangs on Gen8. I don't know if it does though. > > Signed-off-by: Kenneth Graunke > --- > src/mesa/drivers/dr

[Mesa-dev] [PATCH] i965: Make BLORP disable the NP Z PMA stall fix.

2017-01-14 Thread Kenneth Graunke
This may fix GPU hangs on Gen8. I don't know if it does though. Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/genX_blorp_exec.c | 4 1 file changed, 4 insertions(+) diff --git a/src/mesa/drivers/dri/i965/genX_blorp_exec.c b/src/mesa/drivers/dri/i965/genX_blorp_exec.c index

[Mesa-dev] [PATCH] gallium/hud: avoid buffer overrun

2017-01-14 Thread Thomas Hindoe Paaboel Andersen
Renaming data sources was added in e8bb97ce30051b999a4a69c9b27884daeb8d71e6 It was possible to use a new name longer than the name array in hud_graph of 128. This patch truncates the name to fit the array. CC: Marek Olšák --- src/gallium/auxiliary/hud/hud_context.c | 6 -- 1 file changed, 4

Re: [Mesa-dev] [PATCH] nir/gcm: fix a bug with metadata handling

2017-01-14 Thread Jason Ekstrand
Reviewed-by: Jason Ekstrand On Sat, Jan 14, 2017 at 3:12 PM, Connor Abbott wrote: > We were using impl->num_blocks, but that isn't guaranteed to be > up-to-date until after the block_index metadata is required. If we were > unlucky, this could lead to overwriting memory. > > Noticed by inspecti

[Mesa-dev] [PATCH] nir/gcm: fix a bug with metadata handling

2017-01-14 Thread Connor Abbott
We were using impl->num_blocks, but that isn't guaranteed to be up-to-date until after the block_index metadata is required. If we were unlucky, this could lead to overwriting memory. Noticed by inspection. Signed-off-by: Connor Abbott --- src/compiler/nir/nir_opt_gcm.c | 6 +++--- 1 file chang

[Mesa-dev] [RFC 3/5] nir/gcm: Use an array for storring the early block

2017-01-14 Thread Jason Ekstrand
We are about to adjust our instruction block assignment algorithm and we will want to know the current block that the instruction lives in. In order to allow for this, we can't overwrite nir_instr::block in the early scheduling pass. --- src/compiler/nir/nir_opt_gcm.c | 43 +++

[Mesa-dev] [Bug 99413] Rust game have wrong colors

2017-01-14 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=99413 Bug ID: 99413 Summary: Rust game have wrong colors Product: Mesa Version: git Hardware: Other OS: All Status: NEW Severity: normal Priority: med

Re: [Mesa-dev] NaN behavior in GLSL (was Re: [PATCH] glsl: always do sqrt(abs()) and inversesqrt(abs()))

2017-01-14 Thread Axel Davy
On 13/01/2017 19:06, Nicolai Hähnle wrote: On 13.01.2017 18:53, Jason Ekstrand wrote: On Fri, Jan 13, 2017 at 8:43 AM, Marek Olšák mailto:mar...@gmail.com>> wrote: On Fri, Jan 13, 2017 at 5:25 PM, Jason Ekstrand mailto:ja...@jlekstrand.net>> wrote: > On Fri, Jan 13, 2017 at 4:05 AM,

[Mesa-dev] [RFC 5/5] nir/gcm: Add a real concept of "progress"

2017-01-14 Thread Jason Ekstrand
Now that the GCM pass is more concervative and only moves instructions to different blocks when it's advantageous to do so, we can have a proper notion of what it means to make progress. --- src/compiler/nir/nir_opt_gcm.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --g

[Mesa-dev] [RFC 4/5] nir/gcm: Rework the block assignment algorithm

2017-01-14 Thread Jason Ekstrand
The new algorithm differs from the classic GCM algorithm in that it will prefer the instruction's original block if there are no better choices. This new algorithm aims to be a bit more conservative and hopefully not have quite as much of an impact on register pressure. --- src/compiler/nir/nir_op

[Mesa-dev] [RFC 2/5] nir/gcm: Loop over blocks in pin_instructions

2017-01-14 Thread Jason Ekstrand
Now that we have the new block iterators, we can simplify things a bit. --- src/compiler/nir/nir_opt_gcm.c | 138 - 1 file changed, 68 insertions(+), 70 deletions(-) diff --git a/src/compiler/nir/nir_opt_gcm.c b/src/compiler/nir/nir_opt_gcm.c index 72ddc54.

[Mesa-dev] [RFC 1/5] nir/gcm: Compute the if-depth of each block

2017-01-14 Thread Jason Ekstrand
--- src/compiler/nir/nir_opt_gcm.c | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/compiler/nir/nir_opt_gcm.c b/src/compiler/nir/nir_opt_gcm.c index cff2315..72ddc54 100644 --- a/src/compiler/nir/nir_opt_gcm.c +++ b/src/compiler/nir/nir_opt_gcm.c @@ -38,6

[Mesa-dev] [RFC 0/5] nir/gcm: Use a more conservative block assignment algorithm

2017-01-14 Thread Jason Ekstrand
Previous attempts to turn on global code motion and value numbering have failed due to regressions in shader-db. Some of these regressions are because GCM is very aggressive about moving instructions between blocks. This series switches the GCM pass over to a different block assignment algorithm t

[Mesa-dev] [RFC 3/5] nir/gcm: Use an array for storring the early block

2017-01-14 Thread Jason Ekstrand
We are about to adjust our instruction block assignment algorithm and we will want to know the current block that the instruction lives in. In order to allow for this, we can't overwrite nir_instr::block in the early scheduling pass. --- src/compiler/nir/nir_opt_gcm.c | 43 +++

[Mesa-dev] [PATCH v2 5/7] gallium: add flags parameter to texture barrier

2017-01-14 Thread Ilia Mirkin
This is so that we can differentiate between flushing any framebuffer reading caches from regular sampler caches. Signed-off-by: Ilia Mirkin Reviewed-by: Nicolai Hähnle --- v1 -> v2: fix FBREAD -> FBFETCH typo src/gallium/docs/source/context.rst | 3 ++- src/gallium/drivers/ddebug

[Mesa-dev] [PATCH v2 2/7] mesa: allow BlendBarrier to be used without support for full fb fetch

2017-01-14 Thread Ilia Mirkin
The extension spec is not currently published, so it's a bit premature to require it for BlendBarrier usage. Signed-off-by: Ilia Mirkin --- src/mesa/main/barrier.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mesa/main/barrier.c b/src/mesa/main/barrier.c index 2f5b45

[Mesa-dev] [PATCH v2 7/7] nvc0: enable FBFETCH with a special slot for color buffer 0

2017-01-14 Thread Ilia Mirkin
We don't need to support all the color buffers for advanced blend, just cb0. For Fermi, we use the special binding slots so that we don't overlap with user textures, while Kepler+ gets a dedicated position for the fb handle in the driver constbuf. This logic is only triggered when a FBFETCH is act

[Mesa-dev] [PATCH v2 3/7] gallium: add FBFETCH opcode to retrieve the current sample value

2017-01-14 Thread Ilia Mirkin
Signed-off-by: Ilia Mirkin --- v1 -> v2: reword FBFETCH opcode to make it more explicit how it is allowed to operate src/gallium/auxiliary/tgsi/tgsi_info.c | 2 +- src/gallium/docs/source/tgsi.rst | 13 + src/gallium/include/pipe/p_shader_tokens.h | 2 +- 3 files ch

[Mesa-dev] [PATCH v2 1/7] glsl: avoid treating fb fetches as output reads to be lowered

2017-01-14 Thread Ilia Mirkin
Signed-off-by: Ilia Mirkin --- src/compiler/glsl/lower_output_reads.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/glsl/lower_output_reads.cpp b/src/compiler/glsl/lower_output_reads.cpp index 851078b..bd3accb 100644 --- a/src/compiler/glsl/lower_output_reads

[Mesa-dev] [PATCH v2 6/7] st/mesa: add support for advanced blend when fb can be fetched from

2017-01-14 Thread Ilia Mirkin
This implements support for emitting FBFETCH ops, using the existing lowering pass for advanced blend logic, and disabling hw blend when advanced blending is enabled. Signed-off-by: Ilia Mirkin Reviewed-by: Nicolai Hähnle --- src/mesa/state_tracker/st_atom_blend.c| 2 +- src/mesa/state

[Mesa-dev] [PATCH v2 4/7] gallium: add PIPE_CAP_TGSI_FS_FBFETCH

2017-01-14 Thread Ilia Mirkin
Signed-off-by: Ilia Mirkin --- v1 -> v2: remove accidental enablement in si_pipe src/gallium/docs/source/screen.rst | 2 ++ src/gallium/drivers/freedreno/freedreno_screen.c | 3 ++- src/gallium/drivers/i915/i915_screen.c | 1 + src/gallium/drivers/ilo/ilo_screen.c

Re: [Mesa-dev] [PATCH v4 2/7] st/dri: ask the driver to update its internal copies on reimport

2017-01-14 Thread Marek Olšák
Reviewed-by: Marek Olšák On Dec 6, 2016 5:17 PM, "Philipp Zabel" wrote: > For imported buffers that can't be used directly as a source to the > texture samplers, the pipe driver might need to create an internal > copy, for example in a different tiling layout. When buffers are > reimported they

Re: [Mesa-dev] [PATCH v4 5/7] mesa: update external textures when (re-)binding

2017-01-14 Thread Marek Olšák
Reviewed-by: Marek Olšák On Dec 6, 2016 5:17 PM, "Philipp Zabel" wrote: > To comply with the requirement from the GL_OES_EGL_image_external > extension that a call to glBindTexture guarantees that all further > sampling will return values that correspond to the values in the > external texture

Re: [Mesa-dev] [PATCH v3 6/6] st/mesa: ask pipe driver to recreate derived internal resources when (re-)binding external textures

2017-01-14 Thread Marek Olšák
Reviewed-by: Marek Olšák On Dec 6, 2016 2:57 PM, "Philipp Zabel" wrote: > Use the resource_changed callback to invalidate internal resources > derived from external textures when they are (re-)bound. This is needed > to comply with the requirement from the GL_OES_EGL_image_external > extension

Re: [Mesa-dev] Subset of patches from wip-high-priority that can be useful v2

2017-01-14 Thread Bas Nieuwenhuizen
Reviewed and pushed the series. Thanks, Bas On Sat, Jan 14, 2017 at 12:44 AM, Andres Rodriguez wrote: > Following are a subset of patches from my wip-high-priority branch that > may be useful outside that context. > > The HW priority debugging may take a little while, so I wanted to make some >

Re: [Mesa-dev] [PATCH 4/4] glsl: Use hash table cloning in copy propagation

2017-01-14 Thread Vladislav Egorov
14.01.2017 02:32, Connor Abbott пишет: On Fri, Jan 13, 2017 at 1:55 PM, Thomas Helland wrote: 2017-01-13 18:41 GMT+01:00 Vladislav Egorov : 13.01.2017 15:31, Tapani Pälli пишет: On 01/12/2017 09:23 PM, Thomas Helland wrote: Walking the whole hash table, inserting entries by hashing them fi

Re: [Mesa-dev] [PATCH] util: import sha1 implementation from OpenBSD

2017-01-14 Thread Timothy Arceri
On Sat, 2017-01-14 at 04:50 +0300, Vladislav Egorov wrote: > 14.01.2017 01:45, Timothy Arceri пишет: > > I'm asking for a chance to test before we jump in, its probably not > > a > > big deal and I may even still be able to reduce my use of hashing > > but > > it would be nice to be given a few day

Re: [Mesa-dev] [PATCH] gallivm: correctly manage MCJIT at run-time

2017-01-14 Thread Jose Fonseca
I suspect this might break builds with LLVM 3.6 or higher. The LLVMLinkInJIT must be inside #if ... #endif, and it must not be expanded when HAVE_LLVM >= 0x0306, since LLVMLinkInJIT(), That is, when HAVE_LLVM >= 0x0306: - USE_MCJIT should be static const - no point claling GALLIVM_MCJIT - must