[Mesa-dev] [PATCH] i965: Allow CSE on Gen4-5 unary math.

2014-10-13 Thread Kenneth Graunke
Due to the implicit move-from-GRF, unary math looks a lot like the Gen6+ math instruction: it's a single instruction (SEND) with a GRF source. The difference is that it also implicitly clobbers a message register. The only visible effect is that CSE will remove the MRF-clobbering from later math o

Re: [Mesa-dev] [PATCH] st/gbm: fix arguments to is_format_supported

2014-10-13 Thread Michel Dänzer
On 14.10.2014 11:42, Ilia Mirkin wrote: Reported by Coverity Signed-off-by: Ilia Mirkin --- No idea how to test this, but seems pretty straightforward. src/gallium/state_trackers/gbm/gbm_drm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/state_trackers/gb

[Mesa-dev] [PATCH 04/17] i965/fs: don't use ir->offset in emit_texture_gen5.

2014-10-13 Thread Kenneth Graunke
From: Connor Abbott v2 (Ken): Refactor the Gen7 code separately; rebase. Signed-off-by: Connor Abbott Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_fs.h | 3 ++- src/mesa/drivers/dri/i965/brw_fs_fp.cpp | 2 +- src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 8

[Mesa-dev] [PATCH 02/17] i965: Drop ir->op != ir_txf condition in offset checking.

2014-10-13 Thread Kenneth Graunke
brw_lower_unnormalized_offset sets ir->offset to NULL if it applies the texelFetchOffset workarounds, so there's no need to special case it here---there won't be an offset for ir_txf. Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 5 ++--- src/mesa/drivers/dr

[Mesa-dev] [PATCH 16/17] i965/fs: Refactor the texture emission logic into a single function.

2014-10-13 Thread Kenneth Graunke
Before, we had 3 different emit functions for various different gen's, as well as some ancilliary work that was the same across all gen's which was either contained in functions or duplicated across the GLSL IR and Mesa IR backends. Now, we have a single method, emit_texture(), that takes all the i

[Mesa-dev] [PATCH 17/17] i965/fs: don't make a fake ir_texture in the Mesa IR frontend

2014-10-13 Thread Kenneth Graunke
From: Connor Abbott Now that we've made all the texture emit code mostly independent of GLSL IR, this isn't necessary any more. Signed-off-by: Connor Abbott Reviewed-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_fs_fp.cpp | 19 +-- 1 file changed, 5 insertions(+), 14 d

[Mesa-dev] [PATCH 05/17] i965: Make brw_texture_offset() not use ir_texture.

2014-10-13 Thread Kenneth Graunke
From: Connor Abbott Our new IR won't have ir_texture objects. Signed-off-by: Connor Abbott Reviewed-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 4 +++- src/mesa/drivers/dri/i965/brw_shader.cpp | 13 + src/mesa/drivers/dri/i965/brw_shader.h

[Mesa-dev] [PATCH 14/17] i965/fs: Make swizzle_result() not use ir_texture.

2014-10-13 Thread Kenneth Graunke
From: Connor Abbott Our new IR won't have ir_texture objects. Signed-off-by: Connor Abbott Reviewed-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_fs.h | 3 ++- src/mesa/drivers/dri/i965/brw_fs_fp.cpp | 2 +- src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 12 ++

[Mesa-dev] [PATCH 06/17] i965/fs: Rename "length" to "components" in emit_mcs_fetch().

2014-10-13 Thread Kenneth Graunke
This is slightly clearer. Based on a patch by Connor Abbott. Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp b/src/mesa/drivers/dri/i965

[Mesa-dev] [PATCH 08/17] i965/fs: make rescale_texcoord() not use ir_texture.

2014-10-13 Thread Kenneth Graunke
From: Connor Abbott Our new IR won't have ir_texture objects, but using glsl_type is fine. v2 (Ken): Drop redundant ir->coordinate NULL check; rebase. Signed-off-by: Connor Abbott Reviewed-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_fs.h | 2 +- src/mesa/drivers/dri/i965

[Mesa-dev] [PATCH 09/17] i965/fs: Don't use ir->coordinate in emit_texture_*.

2014-10-13 Thread Kenneth Graunke
From: Connor Abbott This drops a dependency on ir_texture objects. Signed-off-by: Connor Abbott Reviewed-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_fs.h | 9 +++-- src/mesa/drivers/dri/i965/brw_fs_fp.cpp | 9 +++-- src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 52

[Mesa-dev] [PATCH 15/17] i965/fs: Make gather_channel() not use ir_texture.

2014-10-13 Thread Kenneth Graunke
From: Connor Abbott Our new IR won't have ir_texture objects. Signed-off-by: Connor Abbott Reviewed-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_fs.h | 2 +- src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 7 +++ 2 files changed, 4 insertions(+), 5 deletions(-) diff --g

[Mesa-dev] [PATCH 12/17] i965/fs: don't pass in ir_texture to emit_texture_*

2014-10-13 Thread Kenneth Graunke
From: Connor Abbott At this point, the only thing it's used for is the opcode. Signed-off-by: Connor Abbott Reviewed-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_fs.h | 6 ++--- src/mesa/drivers/dri/i965/brw_fs_fp.cpp | 6 ++--- src/mesa/drivers/dri/i965/brw_fs_visit

[Mesa-dev] [PATCH 07/17] i965/fs: Make emit_mcs_fetch() not use ir_texture.

2014-10-13 Thread Kenneth Graunke
From: Connor Abbott Our new IR won't have ir_texture objects. Signed-off-by: Connor Abbott --- src/mesa/drivers/dri/i965/brw_fs.h | 2 +- src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mesa/drivers/dri/i965/

[Mesa-dev] [PATCH 10/17] i965/fs: Don't use ir->lod_info.grad.dPd in emit_texture_*.

2014-10-13 Thread Kenneth Graunke
From: Connor Abbott This drops a dependency on ir_texture objects. v2 (Ken): Rename lod_components to grad_components, as it only has a meaningful value for ir_txd. We could set it to 1 for TXL, but there's no real need. Signed-off-by: Connor Abbott Reviewed-by: Kenneth Gr

[Mesa-dev] [PATCH 13/17] i965/fs: fix integer textures with swizzles

2014-10-13 Thread Kenneth Graunke
From: Connor Abbott This happened to work before, but it would convert the output to a float and then back to an integer which seems bad. Signed-off-by: Connor Abbott Reviewed-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 1 + 1 file changed, 1 insertion(+) diff --gi

[Mesa-dev] [PATCH 03/17] i965/fs: Move texel offset handling to visit(ir_texture *).

2014-10-13 Thread Kenneth Graunke
This moves the handling of non-constant texel offset subexpression trees to the place where we visit other such subtrees. It also removes some uses of ir->offset in emit_texture_gen7, which will be useful when we write the backend for our new upcoming IR. Based on a patch by Connor Abbott. Signe

[Mesa-dev] [PATCH 01/17] i965: Restore a lost comment about TXF offset bugs.

2014-10-13 Thread Kenneth Graunke
Eric's original code to work around TXF offset bugs contained a comment explaining the problem, which was lost when Chris generalized it to an IR transformation (in commit 598ca510b8a118c3c7e18b5d031a2b116120e0a6). This commit adds the original comment to the newer code. Signed-off-by: Kenneth Gr

[Mesa-dev] [PATCH] st/gbm: fix arguments to is_format_supported

2014-10-13 Thread Ilia Mirkin
Reported by Coverity Signed-off-by: Ilia Mirkin --- No idea how to test this, but seems pretty straightforward. src/gallium/state_trackers/gbm/gbm_drm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/state_trackers/gbm/gbm_drm.c b/src/gallium/state_trackers/gb

Re: [Mesa-dev] [PATCH] i965: Initialize grf_used in fs_visitor::emit_repclear_shader().

2014-10-13 Thread Jason Ekstrand
On Mon, Oct 13, 2014 at 5:12 PM, Kenneth Graunke wrote: > fs_visitor::grf_used is used to calculate prog_data->reg_blocks_16, > which was getting populated with an uninitialized value. Normally, > grf_used is set by the register allocator, but emit_repclear_shader > bypasses that; it must set gr

[Mesa-dev] [PATCH] r300/compiler: remove useless check

2014-10-13 Thread David Heidelberger
This code is already in if (!variable->C->is_r500) so no need check twice. Signed-off-by: David Heidelberger --- src/gallium/drivers/r300/compiler/radeon_pair_regalloc.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/gallium/drivers/r300/compiler/radeon_pair_reg

[Mesa-dev] [PATCH] i965: Initialize grf_used in fs_visitor::emit_repclear_shader().

2014-10-13 Thread Kenneth Graunke
fs_visitor::grf_used is used to calculate prog_data->reg_blocks_16, which was getting populated with an uninitialized value. Normally, grf_used is set by the register allocator, but emit_repclear_shader bypasses that; it must set grf_used directly. This bug was well hidden: reg_blocks and reg_blo

Re: [Mesa-dev] [PATCH] meta/msaa-blit: consider weird sample count case unreachable

2014-10-13 Thread Anuj Phogat
On Sat, Oct 11, 2014 at 3:28 PM, Chris Forbes wrote: > Suppresses a bunch of warning noise about sample_map possibly being used > uninitialized. > > Signed-off-by: Chris Forbes > --- > src/mesa/drivers/common/meta_blit.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/src/mesa/drivers/c

Re: [Mesa-dev] [PATCH] gallium: add basevertex and vertexid_zerobase semantics

2014-10-13 Thread Roland Scheidegger
Ah yes that was it. We can't expose that yet though since it would also require baseinstance and not just basevertex shader var support (plus DrawID too actually). So I still don't know what caps should be added... Roland On 10/13/2014 11:52 AM, Ilia Mirkin wrote: Roland, is this the extens

Re: [Mesa-dev] [PATCH] gallium: add basevertex and vertexid_zerobase semantics

2014-10-13 Thread Ilia Mirkin
Roland, is this the extension you were looking for? https://www.opengl.org/registry/specs/ARB/shader_draw_parameters.txt On Mon, Oct 13, 2014 at 2:44 PM, Roland Scheidegger wrote: > Oh I actually thought that BASEVERTEX was available as an vs input in some > gl extension. Looks like that's not th

Re: [Mesa-dev] [PATCH] gallium: add basevertex and vertexid_zerobase semantics

2014-10-13 Thread Roland Scheidegger
Oh I actually thought that BASEVERTEX was available as an vs input in some gl extension. Looks like that's not the case. Still, I guess we'd need some cap bit so we can tell the glsl compiler if it actually should lower vertexid to vertexid_zerobase + basevertex or not. And even then that still

Re: [Mesa-dev] [PATCH] auxilary/os: Add DragonFly BSD support in os_get_total_physical_memory.

2014-10-13 Thread Brian Paul
On 10/10/2014 11:46 PM, Vinson Lee wrote: This patch fixes this build error on DragonFly BSD. CC os/os_misc.lo os/os_misc.c: In function 'os_get_total_physical_memory': os/os_misc.c:132:2: error: #error Unsupported *BSD Signed-off-by: Vinson Lee --- src/gallium/auxiliary/os/os_misc.

Re: [Mesa-dev] Mesa 10.3.1

2014-10-13 Thread Emil Velikov
On 13/10/14 15:11, Julien Cristau wrote: > On Mon, Oct 13, 2014 at 00:38:25 +0100, Emil Velikov wrote: > >> Mesa 10.3.1 has been released. Mesa 10.3.1 is a bug fix release >> fixing bugs since the 10.3 release, (see below for a list of >> changes). >> >> The tag in the git repository for Mesa 10.3

[Mesa-dev] [Bug 84894] Mesa 10.3 Breaks Arch Linux Multiseat

2014-10-13 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=84894 --- Comment #2 from shillshoc...@gmail.com --- Discussion on the solution for LightDM are here: https://bugs.launchpad.net/lightdm/+bug/1380069 -- You are receiving this mail because: You are the assignee for the bug. ___

Re: [Mesa-dev] Mesa 10.3.1

2014-10-13 Thread Julien Cristau
On Mon, Oct 13, 2014 at 00:38:25 +0100, Emil Velikov wrote: > Mesa 10.3.1 has been released. Mesa 10.3.1 is a bug fix release > fixing bugs since the 10.3 release, (see below for a list of > changes). > > The tag in the git repository for Mesa 10.3.1 is 'mesa-10.3.1'. > Hi Emil, I'm not seeing

Re: [Mesa-dev] [PATCH] util: fix blitter/draw module interaction

2014-10-13 Thread Marek Olšák
Actually, util_blitter_cache_all_shaders was supposed to prevent all crashes. Drivers that use the Draw AA stages should call it before the stages are installed, so that no shaders need to be compiled later. I guess some shaders are missing there. Just updating util_blitter_cache_all_shaders would

[Mesa-dev] [Bug 84711] [libva] gallium_drv_video.so ignores --with-dri-driverdir setting

2014-10-13 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=84711 --- Comment #2 from LoneVVolf --- You are right, and libva pkgconfig on arch indeed has /usr/lib/dri as default folder. Thanks for the information. -- You are receiving this mail because: You are the assignee for the bug. _

Re: [Mesa-dev] [PATCH] gallium: add basevertex and vertexid_zerobase semantics

2014-10-13 Thread Marek Olšák
radeonsi supports VERTEXID_ZEROBASE and BASEVERTEX. VERTEXID can be implemented trivially using the two. I don't think we need any cap bits, because this is required by OpenGL. In the worst case, drivers will have to store BASEVERTEX in a constant buffer. Marek On Mon, Oct 13, 2014 at 9:45 AM,

[Mesa-dev] [PATCH] gallium: add basevertex and vertexid_zerobase semantics

2014-10-13 Thread sroland
From: Roland Scheidegger Just like in core mesa, expose a separate vertexid which doesn't include the base vertex (aka d3d10 style). And expose basevertex too (vertexid is basevertex + vertexid_zerobase). This will be needed to fix the piglit vertexid failures in draw due to it following d3d10 se

[Mesa-dev] RFC: basevertex and vertexid handling in gallium

2014-10-13 Thread sroland
From: Roland Scheidegger So, gallium doesn't yet expose basevertex shader semantic. Neither does it really handle the different vertexID options (GL-style including basevertex and d3d10-style not including it). draw currently implements the latter (on purpose) whereas most drivers probably actual