Re: [Mesa-dev] [PATCH] glsl: use set rather than old hash table for ir_validate

2015-07-10 Thread Chris Forbes
Perf data? On Fri, Jul 10, 2015 at 6:41 PM, Timothy Arceri wrote: > This implementation should be faster and there was no > need to store a data field. > --- > src/glsl/ir_validate.cpp | 24 > 1 file changed, 12 insertions(+), 12 deletions(-) > > diff --git a/src/glsl/ir

Re: [Mesa-dev] [PATCH] glsl: use set rather than old hash table for ir_validate

2015-07-10 Thread Timothy Arceri
On Fri, 2015-07-10 at 19:07 +1200, Chris Forbes wrote: > Perf data? I can create some if you like, but wasn't program/hash_table.c meant to die along time ago [1] anyway. [1] http://lists.freedesktop.org/archives/mesa-dev/2013-December/050524.html > > On Fri, Jul 10, 2015 at 6:41 PM, Timothy Ar

Re: [Mesa-dev] [PATCH] glsl: use set rather than old hash table for ir_validate

2015-07-10 Thread Iago Toral
On Fri, 2015-07-10 at 19:07 +1200, Chris Forbes wrote: > Perf data? When the new hash table implementation was added to Mesa by Eric it claimed to be much faster, see commits 35fd61bd99c1 and 72e55bb6888ff. The set implementation seems to follow the same implementation strategy, so I suppose it m

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

2015-07-10 Thread Samuel Iglesias Gonsálvez
Hello Renaud, I am going to comment a few things to improve your patch submission. In the email subject we usually put [PATCH vN] to indicate it is the Nth version of the patch, so the reviewers don't get confused about which version is the more recent. You can do that by editing the .patch file

Re: [Mesa-dev] [PATCH] clover: Implement image attribute getters

2015-07-10 Thread Zoltán Gilián
Sent a new patch with subject [Mesa-dev] [PATCH] clover: Pass image attributes to the kernel. 2015.07.06. 17:58 ezt írta ("Zoltán Gilián" ): > > Hint: you'll need new > > module::argument::semantic enums > > I see. Reworked it a bit. > > On Mon, Jul 6, 2015 at 1:13 PM, Francisco Jerez > wrote: >

[Mesa-dev] [PATCH v3 (part1) 11/26] glsl: shader buffer variables cannot have initializers

2015-07-10 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez Section 4.3.7 "Buffer Variables" of the GLSL 4.30 spec: "Buffer variables cannot have initializers." v2: - Rewrite error message (Jordan) Signed-off-by: Samuel Iglesias Gonsalvez Reviewed-by: Jordan Justen --- src/glsl/ast_to_hir.cpp | 9 + 1 file

[Mesa-dev] [PATCH v3 (part1) 02/26] glsl: Add ir_var_shader_storage

2015-07-10 Thread Iago Toral Quiroga
From: Kristian Høgsberg This will be used to identify buffer variables inside shader storage buffer objects, which are very similar to uniforms except for a few differences, most important of which is that they are writable. Since buffer variables are so similar to uniforms, we will almost alway

[Mesa-dev] [PATCH v3 (part1) 04/26] nir: add nir_var_shader_storage

2015-07-10 Thread Iago Toral Quiroga
Reviewed-by: Jordan Justen --- src/glsl/nir/glsl_to_nir.cpp | 4 src/glsl/nir/nir.h | 1 + src/glsl/nir/nir_lower_atomics.c | 3 ++- src/glsl/nir/nir_lower_io.c | 9 ++--- src/glsl/nir/nir_print.c | 5 +++-- src/glsl/nir/nir_validate.c | 6 -- 6 fi

[Mesa-dev] [PATCH v3 (part1) 03/26] mesa: rename is_in_uniform_block to is_in_buffer_block

2015-07-10 Thread Iago Toral Quiroga
Since this now checks if a variable is inside a uniform or a shader storage block. Reviewed-by: Jordan Justen --- src/glsl/ast_to_hir.cpp| 2 +- src/glsl/ir.h | 5 +++-- src/glsl/link_uniform_block_active_visitor.cpp | 6 +++--- src/glsl/l

[Mesa-dev] [PATCH v3 (part1) 00/26] ARB_shader_storage_buffer_object (mesa)

2015-07-10 Thread Iago Toral Quiroga
As discussed with Jordan, this v3-part1 series contains a good part of the frontend stuff (most of which has already been reviewed). The idea is to get this landed ahead, since some of the remaining patches (specifically the i965 backend stuff) depends on ther patches from Curro that have not lande

[Mesa-dev] [PATCH v3 (part1) 17/26] mesa: Implement _mesa_BindBuffersRange for target GL_SHADER_STORAGE_BUFFER

2015-07-10 Thread Iago Toral Quiroga
v2: - Fix error message (Jordan) Reviewed-by: Jordan Justen --- src/mesa/main/bufferobj.c | 110 ++ 1 file changed, 110 insertions(+) diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c index 27638ca..0a9ffe4 100644 --- a/src/mesa/main/

[Mesa-dev] [PATCH v3 (part1) 20/26] glsl: Don't do tree grafting on buffer variables

2015-07-10 Thread Iago Toral Quiroga
Otherwise we can lose writes into the buffers backing the variables. Reviewed-by: Jordan Justen --- src/glsl/opt_tree_grafting.cpp | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/glsl/opt_tree_grafting.cpp b/src/glsl/opt_tree_grafting.cpp index d47613c..7f2ee6c 1

[Mesa-dev] [PATCH v3 (part1) 01/26] mesa: define ARB_shader_storage_buffer_object extension

2015-07-10 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez Signed-off-by: Samuel Iglesias Gonsalvez Reviewed-by: Jordan Justen --- src/glsl/glcpp/glcpp-parse.y| 3 ++ src/glsl/glsl_parser_extras.cpp | 63 + src/glsl/glsl_parser_extras.h | 7 + src/mesa/main/extensions.

[Mesa-dev] [PATCH v3 (part1) 15/26] mesa: Implement _mesa_DeleteBuffers for target GL_SHADER_STORAGE_BUFFER

2015-07-10 Thread Iago Toral Quiroga
v2: - Remove the extra spaces (Jordan) Reviewed-by: Jordan Justen --- src/mesa/main/bufferobj.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c index 2d70f7b..ee920a9 100644 --- a/src/mesa/main/bufferobj.c +++ b/src/mesa/main

[Mesa-dev] [PATCH v3 (part1) 13/26] glsl: fix error messages in invalid declarations of shader storage blocks

2015-07-10 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez Due to GL_ARB_shader_storage_buffer_object extension, shader storage blocks have the same limitations as uniform blocks. This patch fixes the corresponding error messages. Signed-off-by: Samuel Iglesias Gonsalvez Reviewed-by: Jordan Justen --- src/glsl/ast_to_

[Mesa-dev] [PATCH v3 (part1) 08/26] mesa: Add shader storage buffer support to struct gl_context

2015-07-10 Thread Iago Toral Quiroga
This includes the array of bindings, the current buffer bound to the GL_SHADER_STORAGE_BUFFER target and a set of general limits and default values for shader storage buffers. v2: - Use spec values for the new defined constants (Jordan) Reviewed-by: Jordan Justen --- src/mesa/main/bufferobj.c |

[Mesa-dev] [PATCH v3 (part1) 14/26] mesa: Initialize and free shader storage buffers

2015-07-10 Thread Iago Toral Quiroga
v2: - Fix indention, used tabs instead of whitespaces. (Jordan) Reviewed-by: Jordan Justen --- src/mesa/main/bufferobj.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c index c5d4ada..2d70f7b 100644 --- a/src/mesa/mai

[Mesa-dev] [PATCH v3 (part1) 10/26] glsl: enable binding layout qualifier usage for shader storage buffer objects

2015-07-10 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez See GLSL 4.30 spec, section 4.4.5 "Uniform and Shader Storage Block Layout Qualifiers". v2: - Add whitespace in an error message. Delete period '.' at the end of that error message (Jordan). Signed-off-by: Samuel Iglesias Gonsalvez Reviewed-by: Jordan Justen --

[Mesa-dev] [PATCH v3 (part1) 05/26] glsl: Implement parser support for 'buffer' qualifier

2015-07-10 Thread Iago Toral Quiroga
From: Kristian Høgsberg This is used to identify shader storage buffer interface blocks where buffer variables are declared. Reviewed-by: Jordan Justen --- src/glsl/ast.h | 1 + src/glsl/ast_to_hir.cpp | 14 ++ src/glsl/ast_type.cpp | 3 ++- src

[Mesa-dev] [PATCH v3 (part1) 12/26] glsl: buffer variables cannot be defined outside interface blocks

2015-07-10 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez Section 4.3.7 "Buffer Variables", GLSL 4.30 spec: "Buffer variables may only be declared inside interface blocks (section 4.3.9 “Interface Blocks”), which are then referred to as shader storage blocks. It is a compile-time error to declare buffer variables at glob

[Mesa-dev] [PATCH v3 (part1) 09/26] mesa: add MaxShaderStorageBlocks to struct gl_program_constants

2015-07-10 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez v2: - Set MaxShaderStorageBlocks to 8. Signed-off-by: Samuel Iglesias Gonsalvez Reviewed-by: Jordan Justen --- src/mesa/main/context.c | 2 ++ src/mesa/main/mtypes.h | 3 +++ 2 files changed, 5 insertions(+) diff --git a/src/mesa/main/context.c b/src/mesa/mai

[Mesa-dev] [PATCH v3 (part1) 23/26] glsl: Don't do constant variable on buffer variables

2015-07-10 Thread Iago Toral Quiroga
Since the backing storage for these is shared we cannot ensure that the value won't change by writes from other threads. Normally SSBO accesses are not guaranteed to be syncronized with other threads, except when memoryBarrier is used. So, we might be able to optimize some SSBO accesses, but for no

[Mesa-dev] [PATCH v3 (part1) 24/26] glsl: Don't do copy propagation on buffer variables

2015-07-10 Thread Iago Toral Quiroga
Since the backing storage for these is shared we cannot ensure that the value won't change by writes from other threads. Normally SSBO accesses are not guaranteed to be syncronized with other threads, except when memoryBarrier is used. So, we might be able to optimize some SSBO accesses, but for no

[Mesa-dev] [PATCH v3 (part1) 07/26] glsl: Identify active uniform blocks that are buffer blocks as such.

2015-07-10 Thread Iago Toral Quiroga
Reviewed-by: Jordan Justen --- src/glsl/link_uniform_block_active_visitor.cpp | 1 + src/glsl/link_uniform_block_active_visitor.h | 1 + src/glsl/link_uniform_blocks.cpp | 4 src/mesa/main/mtypes.h | 5 + 4 files changed, 11 insertions(+) diff --g

[Mesa-dev] [PATCH v3 (part1) 21/26] glsl: Do not kill dead assignments to buffer variables or SSBO declarations.

2015-07-10 Thread Iago Toral Quiroga
If we kill dead assignments we lose the buffer writes. Also, we never kill UBO declarations even if they are never referenced by the shader, they are always considered active. Although the spec does not seem say this specifically for SSBOs, it is probably implied since SSBOs are pretty much the sa

[Mesa-dev] [PATCH v3 (part1) 18/26] mesa: Implement _mesa_BindBufferBase for target GL_SHADER_STORAGE_BUFFER

2015-07-10 Thread Iago Toral Quiroga
Reviewed-by: Jordan Justen --- src/mesa/main/bufferobj.c | 56 +++ 1 file changed, 56 insertions(+) diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c index 0a9ffe4..c3548b5 100644 --- a/src/mesa/main/bufferobj.c +++ b/src/mesa/main/buf

[Mesa-dev] [PATCH v3 (part1) 19/26] mesa: Implement _mesa_BindBufferRange for target GL_SHADER_STORAGE_BUFFER

2015-07-10 Thread Iago Toral Quiroga
Reviewed-by: Jordan Justen --- src/mesa/main/bufferobj.c | 37 + 1 file changed, 37 insertions(+) diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c index c3548b5..4e25a72 100644 --- a/src/mesa/main/bufferobj.c +++ b/src/mesa/main/bufferobj.c @

[Mesa-dev] [PATCH v3 (part1) 16/26] mesa: Implement _mesa_BindBuffersBase for target GL_SHADER_STORAGE_BUFFER

2015-07-10 Thread Iago Toral Quiroga
v2: - Add space before const (Jordan) Reviewed-by: Jordan Justen --- src/mesa/main/bufferobj.c | 142 ++ src/mesa/main/mtypes.h| 7 +++ 2 files changed, 149 insertions(+) diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c index e

[Mesa-dev] [PATCH v3 (part1) 06/26] glsl: link buffer variables and shader storage buffer interface blocks

2015-07-10 Thread Iago Toral Quiroga
From: Kristian Høgsberg Reviewed-by: Jordan Justen --- src/glsl/link_interface_blocks.cpp | 15 --- src/glsl/link_uniform_initializers.cpp | 3 ++- src/glsl/link_uniforms.cpp | 8 +--- src/glsl/linker.cpp| 4 ++-- 4 files changed, 21 insert

[Mesa-dev] [PATCH v3 (part1) 25/26] glsl: Lower shader storage buffer object writes to GLSL IR instrinsics

2015-07-10 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez Extend the existing lower_ubo_reference pass to also detect SSBO writes and lower them to __intrinsic_store_ssbo intrinsics. Signed-off-by: Samuel Iglesias Gonsalvez --- src/glsl/lower_ubo_reference.cpp | 441 +++ 1 file chang

[Mesa-dev] [PATCH v3 (part1) 22/26] glsl: Don't do constant propagation on buffer variables

2015-07-10 Thread Iago Toral Quiroga
Since the backing storage for these is shared we cannot ensure that the value won't change by writes from other threads. Normally SSBO accesses are not guaranteed to be syncronized with other threads, except when memoryBarrier is used. So, we might be able to optimize some SSBO accesses, but for no

[Mesa-dev] [PATCH v3 (part1) 26/26] glsl: Lower shader storage buffer object loads to GLSL IR instrinsics

2015-07-10 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez Extend the existing lower_ubo_reference pass to also detect SSBO loads and lower them to __intrinsic_load_ssbo intrinsics. Signed-off-by: Samuel Iglesias Gonsalvez --- src/glsl/lower_ubo_reference.cpp | 73 +++- 1 file changed

Re: [Mesa-dev] [PATCH v3 (part1) 00/26] ARB_shader_storage_buffer_object (mesa)

2015-07-10 Thread Iago Toral
On Fri, 2015-07-10 at 12:13 +0200, Iago Toral Quiroga wrote: > As discussed with Jordan, this v3-part1 series contains a good part of the > frontend stuff (most of which has already been reviewed). The idea is to get > this landed ahead, since some of the remaining patches (specifically the i965 >

Re: [Mesa-dev] [PATCH 1/4] gallium: clarify reference counting for fence

2015-07-10 Thread Marek Olšák
Reviewed-by: Marek Olšák Marek On Wed, Jul 8, 2015 at 10:34 PM, Rob Clark wrote: > From: Rob Clark > > No where was it spelled out that the state tracker may expect the pipe > driver to unref the old fence. > > Signed-off-by: Rob Clark > --- > src/gallium/include/pipe/p_context.h | 8 +++

Re: [Mesa-dev] [PATCH] xa: don't leak fences

2015-07-10 Thread Marek Olšák
I wonder... do we still need XA considering that everybody can just use glamor instead? Marek On Wed, Jul 8, 2015 at 7:39 PM, Rob Clark wrote: > From: Rob Clark > > XA was never unref'ing last_fence in the various call paths to > pipe->flush(). Add this to xa_context_flush() and update the ot

Re: [Mesa-dev] [PATCH] mesa: Implement faster streaming memcpy

2015-07-10 Thread Marek Olšák
Shouldn't this stuff be in src/util? Marek On Wed, Jul 8, 2015 at 11:07 PM, Ben Widawsky wrote: > WARNING: No perf data, please keep reading though) > > This implements the suggestion provided by the paper, "Fast USWC to WB Memory > Copy" > (https://software.intel.com/en-us/articles/copying-acce

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

2015-07-10 Thread Roland Scheidegger
Am 10.07.2015 um 05:44 schrieb Michel Dänzer: > On 10.07.2015 05:13, Emil Velikov wrote: >> The original code only half considered hyperz as an option. As per >> previous commit "major != 2 cannot occur" we can simply things, and >> allow users to set the option if they choose to do so. >> >> Signe

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

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

Re: [Mesa-dev] [PATCH] xa: don't leak fences

2015-07-10 Thread Rob Clark
well, freedreno and vmware ddx still use XA.. they both could probably be ported to use glamor instead, but that hasn't been done yet.. At least for freedreno with upstream drm/kms driver, one can just use -modesetting ddx instead. But that doesn't work w/ android fbdev driver. I need to check a

Re: [Mesa-dev] [PATCH 4/4] gallium: add interface for writable shader buffers

2015-07-10 Thread Roland Scheidegger
This looks all pretty reasonable, though I can't really figure out if we could translate from d3d11 to that. In particular, it's UAVs for all of buffers and images, and I'm not entirely sure if it's actually possible to figure out which UAV entries are a shader buffer and which ones are a shader im

[Mesa-dev] [Bug 91292] glVertexAttribDivisor not working Linux 10.5.8 Intel HD 5500?

2015-07-10 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=91292 Bug ID: 91292 Summary: glVertexAttribDivisor not working Linux 10.5.8 Intel HD 5500? Product: Mesa Version: 10.5 Hardware: x86-64 (AMD64) OS: Linux (All)

[Mesa-dev] [Bug 91292] glVertexAttribDivisor not working Linux 10.5.8 Intel HD 5500?

2015-07-10 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=91292 --- Comment #1 from Hugh Fisher --- Created attachment 117030 --> https://bugs.freedesktop.org/attachment.cgi?id=117030&action=edit Expected output from running program -- You are receiving this mail because: You are the QA Contact for the bu

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

2015-07-10 Thread Marek Olšák
On Thu, Jul 9, 2015 at 8:43 AM, Dave Airlie wrote: > From: Glenn Kennard > > This adds the main chunk of the geometry shader multiple stream > support to the r600 driver. > > Glenn wrote the original pass, and I took his code and hacked > it into a working state. > > Signed-off-by: Dave Airlie >

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

2015-07-10 Thread Ilia Mirkin
On Thu, Jul 9, 2015 at 4:11 PM, Francisco Jerez wrote: > Ilia Mirkin writes: > >> FYI there's already a lowering pass that does this in the GLSL IR >> (CARRY_TO_ARITH in lower_instructions). Perhaps the right place to do >> this is NIR though, just wanted to let you know. >> > Ah, I wasn't aware

Re: [Mesa-dev] [PATCH 4/4] gallium: add interface for writable shader buffers

2015-07-10 Thread Marek Olšák
For Evergreen (the first DX11 radeon), which only supports 12 writable resources, we'll only expose 8 images, 8 shader storage buffers and 8 atomic counter buffers. There will be a CAP saying that only a total of 12 is allowed to be used by a shader and all bindings slots will thus be considered vi

[Mesa-dev] [Bug 91292] [BDW+] glVertexAttribDivisor not working in combination with glPolygonMode

2015-07-10 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=91292 Neil Roberts changed: What|Removed |Added CC||n...@linux.intel.com Summary|g

[Mesa-dev] [Bug 91292] [BDW+] glVertexAttribDivisor not working in combination with glPolygonMode

2015-07-10 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=91292 Neil Roberts changed: What|Removed |Added Status|NEW |ASSIGNED Component|Mesa core

Re: [Mesa-dev] [PATCH 18/78] i965: Take is_scalar_shader_stage() method out to allow reuse

2015-07-10 Thread Eduardo Lima Mitev
On 06/30/2015 06:58 PM, Jason Ekstrand wrote: > On Fri, Jun 26, 2015 at 1:06 AM, Eduardo Lima Mitev wrote: >> This patch makes public the is_scalar_shader_stage() method in brw_shader, >> and >> renames it to brw_compiler_is_scalar_shader_stage(). The plan is to later >> reuse it >> in brw_nir,

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

2015-07-10 Thread Jason Ekstrand
On Fri, Jul 10, 2015 at 5:25 AM, Francisco Jerez wrote: > Jason Ekstrand writes: > >> On Jul 9, 2015 7:57 AM, "Francisco Jerez" wrote: >>> >>> We were passing src0 alpha and oMask in reverse order. There seems to >>> be no good way to pass them in the correct order to the new-style >>> LOAD_PAY

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

2015-07-10 Thread Francisco Jerez
Jason Ekstrand writes: > On Fri, Jul 10, 2015 at 5:25 AM, Francisco Jerez > wrote: >> Jason Ekstrand writes: >> >>> On Jul 9, 2015 7:57 AM, "Francisco Jerez" wrote: We were passing src0 alpha and oMask in reverse order. There seems to be no good way to pass them in the correct

[Mesa-dev] [PATCH] i965/bdw: Fix 3DSTATE_VF_INSTANCING when the edge flag is used

2015-07-10 Thread Neil Roberts
When the edge flag element is enabled then the elements are slightly reordered so that the edge flag is always the last one. This was confusing the code to upload the 3DSTATE_VF_INSTANCING state because that is uploaded with a separate loop which has an instruction for each element. The indices use

[Mesa-dev] [PATCH 1/2] i965: Implement b2f and b2i using negation.

2015-07-10 Thread Francisco Jerez
Booleans are represented as 0/-1 on modern hardware which means we can just negate them to convert them into a numeric type. Negation has the benefit that it can be implemented using a source modifier which can easily be propagated into some other instruction. shader-db results on HSW: total in

[Mesa-dev] [PATCHv2 2/2] i965: Implement nir_op_uadd_carry and _usub_borrow without accumulator.

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

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

2015-07-10 Thread Emil Velikov
On 10 July 2015 at 13:18, Roland Scheidegger wrote: > Am 10.07.2015 um 05:44 schrieb Michel Dänzer: >> On 10.07.2015 05:13, Emil Velikov wrote: >>> The original code only half considered hyperz as an option. As per >>> previous commit "major != 2 cannot occur" we can simply things, and >>> allow u

[Mesa-dev] [PATCH] auxiliary/vl: use the correct screen index

2015-07-10 Thread Emil Velikov
Inspired (copied) from Marek's commit for egl/x11 commit 0b56e23e7f3(egl/dri2: use the correct screen index) Cc: 10.6 Cc: Marek Olšák Signed-off-by: Emil Velikov --- src/gallium/auxiliary/vl/vl_winsys_dri.c | 18 +++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a

[Mesa-dev] [PATCH 1/7] configure.ac: null, android, gdi are not valid egl-platforms

2015-07-10 Thread Emil Velikov
... and update the documentation to reflect reality. null and gdi are gone, and surfaceless is a recent addition. Signed-off-by: Emil Velikov --- configure.ac | 3 --- docs/egl.html | 6 +++--- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac index 9ffd

[Mesa-dev] [PATCH 4/7] egl: remove ifdef $(egl_extension) compile guards

2015-07-10 Thread Emil Velikov
All of these are already defined in the headers provided. Signed-off-by: Emil Velikov --- src/egl/main/eglapi.c | 36 +--- src/egl/main/eglapi.h | 24 src/egl/main/eglfallbacks.c | 6 -- 3 files changed, 1 insertion(+), 65

[Mesa-dev] [PATCH 6/7] egl/wayland: use drmGetNodeTypeFromFd helper instead of opencoding it

2015-07-10 Thread Emil Velikov
Cc: Axel Davy Signed-off-by: Emil Velikov --- configure.ac| 2 +- src/egl/drivers/dri2/platform_wayland.c | 20 ++-- 2 files changed, 3 insertions(+), 19 deletions(-) diff --git a/configure.ac b/configure.ac index e648a8d..e6efa01 100644 --- a/config

[Mesa-dev] [PATCH 7/7] egl/wayland: remove dead code

2015-07-10 Thread Emil Velikov
The macro HAVE_MKOSTEMP was never defined. Cc: Axel Davy Signed-off-by: Emil Velikov --- src/egl/drivers/dri2/platform_wayland.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c index 9005eb7..bdccee3 100

[Mesa-dev] [PATCH 3/7] egl/wayland: libdrm is a hard requirement, treat it as such

2015-07-10 Thread Emil Velikov
Prompt at configure time if it's missing otherwise we'll fail later on in the build. Remove ambiguous HAVE_LIBDRM guard. Cc: 10.6 Signed-off-by: Emil Velikov --- configure.ac| 3 +++ src/egl/drivers/dri2/egl_dri2.c | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) di

[Mesa-dev] [PATCH 2/7] egl: consolidate ifdef HAVE_LIBDRM blocks

2015-07-10 Thread Emil Velikov
Move the code around rather than having it scattered. No functional change. Signed-off-by: Emil Velikov --- src/egl/drivers/dri2/egl_dri2.c | 210 +++- 1 file changed, 102 insertions(+), 108 deletions(-) diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/

[Mesa-dev] [PATCH 1/7] configure.ac: null, android, gdi are not valid egl-platforms

2015-07-10 Thread Emil Velikov
... and update the documentation to reflect reality. null and gdi are gone, and surfaceless is a recent addition. Signed-off-by: Emil Velikov --- configure.ac | 3 --- docs/egl.html | 6 +++--- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac index 9ffd

[Mesa-dev] [PATCH 5/7] egl/wayland: use designated initializers

2015-07-10 Thread Emil Velikov
Signed-off-by: Emil Velikov --- src/egl/drivers/dri2/platform_wayland.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c index 1e12760..0b1adf8 100644 --- a/src/egl/d

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

2015-07-10 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=66346 --- Comment #21 from Emil Velikov --- (In reply to Vinson Lee from comment #20) > (In reply to José Fonseca from comment #19) > > (In reply to Vinson Lee from comment #18) > > > mesa: 0166b4c165271bd7525a91049e58e390cb596c60 (master 10.7.0-devel)

[Mesa-dev] Shader-cache status and transition

2015-07-10 Thread Carl Worth
Hi folks, I've pushed the latest version of my shader-cache work to a branch named "shader-cache" at: git://people.freedesktop.org/~cworth/mesa I've rebased this against the latest master branch and verified that it at least compiles and works with at least some trivial test programs. I

Re: [Mesa-dev] [PATCH] clover: Pass image attributes to the kernel

2015-07-10 Thread Francisco Jerez
Zoltan Gilian writes: > Read-only and write-only image arguments are recognized and > distinguished. > Attributes of the image arguments are passed to the kernel as implicit > arguments. Thanks, this looks much better. One thing that still seems kind of unfortunate is the fact that you've added

Re: [Mesa-dev] [PATCH 1/2] i965: Implement b2f and b2i using negation.

2015-07-10 Thread Matt Turner
On Fri, Jul 10, 2015 at 10:06 AM, Francisco Jerez wrote: > Booleans are represented as 0/-1 on modern hardware which means we can > just negate them to convert them into a numeric type. Negation has > the benefit that it can be implemented using a source modifier which > can easily be propagated

Re: [Mesa-dev] [PATCH 7/7] egl/wayland: remove dead code

2015-07-10 Thread Matt Turner
On Fri, Jul 10, 2015 at 10:49 AM, Emil Velikov wrote: > The macro HAVE_MKOSTEMP was never defined. > > Cc: Axel Davy > Signed-off-by: Emil Velikov > --- > src/egl/drivers/dri2/platform_wayland.c | 6 -- > 1 file changed, 6 deletions(-) > > diff --git a/src/egl/drivers/dri2/platform_wayland.

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

2015-07-10 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=91263 --- Comment #2 from Marek Olšák --- Proposed fix: http://patchwork.freedesktop.org/patch/52969/ -- 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] mesa: Implement faster streaming memcpy

2015-07-10 Thread Matt Turner
On Fri, Jul 10, 2015 at 4:20 AM, Marek Olšák wrote: > Shouldn't this stuff be in src/util? I guess? I'm not opposed to moving it, if other drivers can make use of it, but I don't want this patch to do the move. I wrote it in November 2013 and src/util only came into being in August 2014 if you'r

Re: [Mesa-dev] [PATCH] auxiliary/vl: use the correct screen index

2015-07-10 Thread Marek Olšák
I'm sure this doesn't build. "dri2_dpy" is not declared and "screen" is int. Marek On Fri, Jul 10, 2015 at 7:46 PM, Emil Velikov wrote: > Inspired (copied) from Marek's commit for egl/x11 > commit 0b56e23e7f3(egl/dri2: use the correct screen index) > > Cc: 10.6 > Cc: Marek Olšák > Signed-off-b

Re: [Mesa-dev] [PATCH 1/2] i965: Implement b2f and b2i using negation.

2015-07-10 Thread Francisco Jerez
Matt Turner writes: > On Fri, Jul 10, 2015 at 10:06 AM, Francisco Jerez > wrote: >> Booleans are represented as 0/-1 on modern hardware which means we can >> just negate them to convert them into a numeric type. Negation has >> the benefit that it can be implemented using a source modifier whi

[Mesa-dev] [PATCH 5/5] i965: Optimize batchbuffer macros.

2015-07-10 Thread Matt Turner
Previously OUT_BATCH was just a macro around an inline function which does brw->batch.map[brw->batch.used++] = dword; When making consecutive calls to intel_batchbuffer_emit_dword() the compiler isn't able to recognize that we're writing consecutive memory locations or that it doesn't need to

[Mesa-dev] [PATCH 1/5] i965: Move BEGIN_BATCH() into same control flow as ADVANCE_BATCH().

2015-07-10 Thread Matt Turner
BEGIN_BATCH() and ADVANCE_BATCH() will contain "do {" and "} while (0)" respectively to allow declaring local variables used by intervening OUT_BATCH macros. As such, BEGIN_BATCH() and ADVANCE_BATCH() need to be in the same control flow. --- src/mesa/drivers/dri/i965/brw_draw.c | 4 ++-- 1 file ch

[Mesa-dev] [PATCH 3/5] i965: Turn set_blitter_tiling() into a macro.

2015-07-10 Thread Matt Turner
Its uses of OUT_BATCH will need a local variable defined by BEGIN_BATCH. Increases .text size by 528 bytes. --- src/mesa/drivers/dri/i965/intel_blit.c | 55 -- 1 file changed, 25 insertions(+), 30 deletions(-) diff --git a/src/mesa/drivers/dri/i965/intel_blit.c b

[Mesa-dev] [PATCH 2/5] i965: Turn emit_vertex_buffer_state() into a macro.

2015-07-10 Thread Matt Turner
Its uses of OUT_BATCH will need a local variable defined by BEGIN_BATCH. Increases .text size by 8 bytes. --- src/mesa/drivers/dri/i965/brw_draw_upload.c | 79 + 1 file changed, 36 insertions(+), 43 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_draw_upload.c

[Mesa-dev] [PATCH 4/5] i965: Split batch emission from relocation functions.

2015-07-10 Thread Matt Turner
So that everything writing to the batch between BEGIN_BATCH() and ADVANCE_BATCH() goes through OUT_BATCH. --- src/mesa/drivers/dri/i965/intel_batchbuffer.c | 30 ++- src/mesa/drivers/dri/i965/intel_batchbuffer.h | 34 ++- 2 files changed, 30 insertions(+

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

2015-07-10 Thread Matt Turner
On Thu, Jul 9, 2015 at 11:00 AM, Ben Widawsky wrote: > While implementing the workaround in the previous patch I noticed things were > starting to get a bit messy. Since gen8 works differently enough from gen7, I > thought splitting it out with be good. > > While here, get rid of gen8 MOCS which d

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

2015-07-10 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=91290 Vinson Lee changed: What|Removed |Added Keywords||regression CC|

Re: [Mesa-dev] [PATCH] i965: Replace illegal compacted NOP with valid compact instruction

2015-07-10 Thread Matt Turner
On Wed, Jul 8, 2015 at 10:58 PM, Zhenyu Wang wrote: > NOP actually has no compact version, but we use it for instruction > alignment for compact kernel. Although it seems working on HW, it is > illegal and might not be valid for any future one. > > This trys to get a temporary compact instruction

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

2015-07-10 Thread Jason Ekstrand
On Fri, Jul 10, 2015 at 9:53 AM, Francisco Jerez wrote: > Jason Ekstrand writes: > >> On Fri, Jul 10, 2015 at 5:25 AM, Francisco Jerez >> wrote: >>> Jason Ekstrand writes: >>> On Jul 9, 2015 7:57 AM, "Francisco Jerez" wrote: > > We were passing src0 alpha and oMask in reverse ord

Re: [Mesa-dev] [PATCH 7/7] egl/wayland: remove dead code

2015-07-10 Thread Emil Velikov
On 10/07/15 19:22, Matt Turner wrote: > On Fri, Jul 10, 2015 at 10:49 AM, Emil Velikov > wrote: >> The macro HAVE_MKOSTEMP was never defined. >> >> Cc: Axel Davy >> Signed-off-by: Emil Velikov >> --- >> src/egl/drivers/dri2/platform_wayland.c | 6 -- >> 1 file changed, 6 deletions(-) >> >>

[Mesa-dev] [PATCH v2] auxiliary/vl: use the correct screen index

2015-07-10 Thread Emil Velikov
Inspired (copied) from Marek's commit for egl/x11 commit 0b56e23e7f3(egl/dri2: use the correct screen index) v2: Fix copy/pasta errors. Cc: 10.6 Cc: Marek Olšák Signed-off-by: Emil Velikov --- src/gallium/auxiliary/vl/vl_winsys_dri.c | 17 + 1 file changed, 13 insertions(+), 4

Re: [Mesa-dev] [PATCH] auxiliary/vl: use the correct screen index

2015-07-10 Thread Emil Velikov
On 10 July 2015 at 19:33, Marek Olšák wrote: > I'm sure this doesn't build. "dri2_dpy" is not declared and "screen" is int. > In all honesty I "wrote" it at 3am, but that is no excuse for such a goof-up. A correct version should be out. Thanks, Emil ___

[Mesa-dev] [PATCH] nv50, nvc0: enable at least one color RT if alphatest is enabled

2015-07-10 Thread Ilia Mirkin
Fixes the following piglits: fbo-alphatest-nocolor fbo-alphatest-nocolor-ff Signed-off-by: Ilia Mirkin Cc: mesa-sta...@lists.freedesktop.org --- The nv50 bits need testing, only have a GK208 on-hand. Will be sure to test before pushing. src/gallium/drivers/nouveau/nv50/nv50_state_validate.

Re: [Mesa-dev] [PATCH v3 (part1) 25/26] glsl: Lower shader storage buffer object writes to GLSL IR instrinsics

2015-07-10 Thread Jordan Justen
On 2015-07-10 03:13:44, Iago Toral Quiroga wrote: > From: Samuel Iglesias Gonsalvez > > Extend the existing lower_ubo_reference pass to also detect SSBO writes > and lower them to __intrinsic_store_ssbo intrinsics. > > Signed-off-by: Samuel Iglesias Gonsalvez > --- > src/glsl/lower_ubo_referen

Re: [Mesa-dev] [PATCH v3 (part1) 26/26] glsl: Lower shader storage buffer object loads to GLSL IR instrinsics

2015-07-10 Thread Jordan Justen
Reviewed-by: Jordan Justen On 2015-07-10 03:13:45, Iago Toral Quiroga wrote: > From: Samuel Iglesias Gonsalvez > > Extend the existing lower_ubo_reference pass to also detect SSBO loads > and lower them to __intrinsic_load_ssbo intrinsics. > > Signed-off-by: Samuel Iglesias Gonsalvez > --- >

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

2015-07-10 Thread Roland Scheidegger
Am 10.07.2015 um 19:41 schrieb Emil Velikov: > On 10 July 2015 at 13:18, Roland Scheidegger wrote: >> Am 10.07.2015 um 05:44 schrieb Michel Dänzer: >>> On 10.07.2015 05:13, Emil Velikov wrote: The original code only half considered hyperz as an option. As per previous commit "major != 2

Re: [Mesa-dev] [PATCH 2/5] i965/fs: fix stride and type for hw_reg's in regs_read()

2015-07-10 Thread Matt Turner
On Wed, Jul 1, 2015 at 11:51 AM, Connor Abbott wrote: > sources with file == HW_REG get all their information from the > fixed_hw_reg field, so we need to get the stride and type from there > when computing the size. > > Signed-off-by: Connor Abbott > --- Patches 1 and 2 are Reviewed-by: Matt T

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

2015-07-10 Thread Ben Widawsky
On Fri, Jul 10, 2015 at 12:03:54PM -0700, Matt Turner wrote: > On Thu, Jul 9, 2015 at 11:00 AM, Ben Widawsky > wrote: > > While implementing the workaround in the previous patch I noticed things > > were > > starting to get a bit messy. Since gen8 works differently enough from gen7, > > I > > th

Re: [Mesa-dev] [PATCH 1/2] i965/gs: Move vertex_count != 0 check up a level; skip one caller.

2015-07-10 Thread Matt Turner
On Wed, Jul 1, 2015 at 7:28 PM, Kenneth Graunke wrote: > Paul's original code had emit_control_data_bits() skip the URB write if > vertex_count was 0. This meant wrapping every control data write in a > conditional write. > > We accumulate control data bits in a single UD (32-bit) register. For

Re: [Mesa-dev] [PATCH 2/2] i965: Fix indentation in emit_control_data_bits().

2015-07-10 Thread Matt Turner
Confirmed that git show -w shows only the removal of matching braces. Reviewed-by: Matt Turner ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH v2 33/82] i965: Upload Shader Storage Buffer Object surfaces

2015-07-10 Thread Jordan Justen
On 2015-06-03 00:01:23, Iago Toral Quiroga wrote: > Since these are a special kind of UBOs we emit them together reusing the > same infrastructure, however, we use a RAW surface so we can reuse > existing untyped read/write/atomic messages which include a pixel mask > header that we need to set to

Re: [Mesa-dev] [PATCH v2 34/82] i965: handle visiting of ir_var_shader_storage variables

2015-07-10 Thread Jordan Justen
Reviewed-by: Jordan Justen On 2015-06-03 00:01:24, Iago Toral Quiroga wrote: > --- > src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp > b/src/mesa/drivers/dri/i965/brw_vec

Re: [Mesa-dev] [PATCH] xa: don't leak fences

2015-07-10 Thread Eric Anholt
Rob Clark writes: > well, freedreno and vmware ddx still use XA.. they both could probably > be ported to use glamor instead, but that hasn't been done yet.. > > At least for freedreno with upstream drm/kms driver, one can just use > -modesetting ddx instead. But that doesn't work w/ android fbd

Re: [Mesa-dev] [PATCH v2 35/82] i965/fs: Do not split buffer variables

2015-07-10 Thread Jordan Justen
Reviewed-by: Jordan Justen On 2015-06-03 00:01:25, Iago Toral Quiroga wrote: > Buffer variables are the same as uniforms, only that read/write, so we want > the same treatment. > --- > src/mesa/drivers/dri/i965/brw_fs_vector_splitting.cpp | 1 + > 1 file changed, 1 insertion(+) > > diff --git a

Re: [Mesa-dev] [PATCH] xa: don't leak fences

2015-07-10 Thread Rob Clark
On Fri, Jul 10, 2015 at 6:20 PM, Eric Anholt wrote: > Rob Clark writes: > >> well, freedreno and vmware ddx still use XA.. they both could probably >> be ported to use glamor instead, but that hasn't been done yet.. >> >> At least for freedreno with upstream drm/kms driver, one can just use >> -m

Re: [Mesa-dev] [Mesa-stable] [PATCH] i965/bdw: Fix 3DSTATE_VF_INSTANCING when the edge flag is used

2015-07-10 Thread Chris Forbes
Surely the *right* thing would be to have the correct order expressed in brw->vb.*, instead so you don't have this workaround in multiple places. As a minimal fix for stable though, this seems OK, so - Reviewed-by: Chris Forbes On Sat, Jul 11, 2015 at 5:04 AM, Neil Roberts wrote: > When the

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

2015-07-10 Thread Chris Forbes
s/interpolater/interpolator/g On Fri, Jul 10, 2015 at 1:31 AM, Neil Roberts wrote: > For centroid interpolation we can just directly use the values set up > in the shader payload instead of querying the pixel interpolator. To > do this we need to modify brw_compute_barycentric_interp_modes to > d

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

2015-07-10 Thread Chris Forbes
Nitpicks aside, I don't think this is a great idea now that you've got the SKL PI working. I also think it's broken -- you need to arrange to have the centroid barycentric coords delivered to the FS thread, which won't be happening if this is the *only* use of them. Masked in the tests, because th

  1   2   >