Re: [Mesa-dev] [PATCH 06/23] i965: Define common register base class shared between both back-ends.

2013-12-02 Thread Petri Latvala
On 12/02/2013 10:36 PM, Francisco Jerez wrote: Would you prefer 'this->operator=(reg);'? I just remembered... The reason this wouldn't work is that it would trigger an implicit conversion from 'backend_reg' to 'fs_reg', causing infinite recursion into the fs_reg constructor. For the record,

Re: [Mesa-dev] [Mesa-stable] [PATCH v3] egl: add HAVE_LIBDRM define, fix EGL X11 platform

2013-12-02 Thread Tapani Pälli
On 12/02/2013 11:06 PM, Chad Versace wrote: On 12/01/2013 01:53 AM, Tapani Pälli wrote: Commit a594cec broke EGL X11 backend by adding dependency between X11 and DRM backends requiring HAVE_EGL_PLATFORM_DRM defined for X11. This patch fixes the issue by adding additional define for libdrm detec

Re: [Mesa-dev] [PATCH V2 00/17] Newbie Project : Enable ARB_map_buffer_alignment in all drivers

2013-12-02 Thread Siavash Eliasi
Hi again, it's about one week these patches are receiving feedback and they (v2) look fine to reviewers. May I send a v3 for final review? Best regards, Siavash Eliasi. On 11/28/2013 12:26 PM, Siavash Eliasi wrote: Hello, this is V2 series of patches to accomplish *Enable ARB_map_buffer_alig

Re: [Mesa-dev] [PATCH V2 05/17] i915: Modified i915_buffer_create to use memory allocation alignment of 64 instead of 16.

2013-12-02 Thread Siavash Eliasi
Thank you for reviewing these patches, changes to commit messages are done: http://lists.freedesktop.org/archives/mesa-dev/2013-December/049581.html http://lists.freedesktop.org/archives/mesa-dev/2013-December/049582.html Best regards, Siavash Eliasi. On 12/03/2013 06:36 AM, Stéphane Marchesi

[Mesa-dev] [PATCH 06/17] i915g: Modified i915g to return 64 in case of PIPE_CAP_MIN_MAP_BUFFER_ALIGNMENT.

2013-12-02 Thread Siavash Eliasi
Revision 2: - Fixed setting switch cases prior to PIPE_CAP_MIN_MAP_BUFFER_ALIGNMENT incorrectly. --- src/gallium/drivers/i915/i915_screen.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/i915/i915_screen.c b/src/gallium/drivers/i915/i915_screen.c index

[Mesa-dev] [PATCH 05/17] i915g: Modified i915_buffer_create to use memory allocation alignment of 64 instead of 16.

2013-12-02 Thread Siavash Eliasi
--- src/gallium/drivers/i915/i915_resource_buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/i915/i915_resource_buffer.c b/src/gallium/drivers/i915/i915_resource_buffer.c index 80ec43a..fd29524 100644 --- a/src/gallium/drivers/i915/i915_resource_buff

Re: [Mesa-dev] [PATCH V2 05/17] i915: Modified i915_buffer_create to use memory allocation alignment of 64 instead of 16.

2013-12-02 Thread Stéphane Marchesin
5 and 6 look good. One nitpick, please prefix the i915g changes with "i915g" instead of "i915" so it's obvious which driver is being changed from just looking at a git log. Stéphane On Thu, Nov 28, 2013 at 12:56 AM, Siavash Eliasi wrote: > --- > src/gallium/drivers/i915/i915_resource_buffer.c

[Mesa-dev] [PATCH 2/2] r300/compiler/tests: Fix line length check in test parser

2013-12-02 Thread Tom Stellard
From: Tom Stellard CC: "9.2" "10.0" --- src/gallium/drivers/r300/compiler/tests/rc_test_helpers.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/r300/compiler/tests/rc_test_helpers.c b/src/gallium/drivers/r300/compiler/tests/rc_test_helpers.c index a

Re: [Mesa-dev] [PATCH] i965: Emit better code for ir_unop_sign.

2013-12-02 Thread Chris Forbes
Other than that, Reviewed-by: Chris Forbes On Tue, Dec 3, 2013 at 3:45 PM, Chris Forbes wrote: > Where you have the magic 0x3f80u, could you add a comment: > > /* 1.0f */ > > The bit pattern is well-known, but only immediately obvious on a good day :) > > On Tue, Dec 3, 2013 at 2:03 PM, Ken

[Mesa-dev] [PATCH 1/2] r300/compiler/tests: Fix segfault

2013-12-02 Thread Tom Stellard
From: Tom Stellard CC: "9.2" "10.0" --- .../r300/compiler/tests/radeon_compiler_regalloc_tests.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/gallium/drivers/r300/compiler/tests/radeon_compiler_regalloc_tests.c b/src/gallium/drivers/r300/compiler/te

Re: [Mesa-dev] [PATCH] i965: Emit better code for ir_unop_sign.

2013-12-02 Thread Chris Forbes
Where you have the magic 0x3f80u, could you add a comment: /* 1.0f */ The bit pattern is well-known, but only immediately obvious on a good day :) On Tue, Dec 3, 2013 at 2:03 PM, Kenneth Graunke wrote: > On 12/02/2013 01:46 PM, Matt Turner wrote: >> total instructions in shared programs: 15

Re: [Mesa-dev] [PATCH] nouveau: Add lots of comments to the buffer transfer logic

2013-12-02 Thread Ilia Mirkin
On Mon, Dec 2, 2013 at 9:31 PM, Chris Forbes wrote: > + * > + * Also marks vbo/cb dirty if the buffer's binding > > Looks like this stops mid-sentence. Hah, yeah. I kinda trailed off there, didn't I. Not sure how to finish that sentence though -- it's if pipe_resource->bind & PIPE_BIND_INDEX/VERT

Re: [Mesa-dev] [PATCH] nouveau: Add lots of comments to the buffer transfer logic

2013-12-02 Thread Chris Forbes
+ * + * Also marks vbo/cb dirty if the buffer's binding Looks like this stops mid-sentence. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] Anybody still need clear_depth_stencil() or clear_render_target()?

2013-12-02 Thread Roland Scheidegger
Well you could detect if it belongs to the current fb, in which case you wouldn't need to change the fb. And if not (which shouldn't happen with OpenGL state tracker admittedly) then if you wouldn't have that function the state tracker would need to swap out the fb instead, which isn't going to be

Re: [Mesa-dev] [PATCH] i965: Emit better code for ir_unop_sign.

2013-12-02 Thread Kenneth Graunke
On 12/02/2013 01:46 PM, Matt Turner wrote: > total instructions in shared programs: 1519751 -> 1519442 (-0.02%) > instructions in affected programs: 10154 -> 9845 (-3.04%) > --- > src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 23 +++ > src/mesa/drivers/dri/i965/brw_vec4_

[Mesa-dev] [PULL] i965: Removing trailing whitespace, GL types, and weird macros

2013-12-02 Thread Kenneth Graunke
Hello, I'm trying to bring the intel-gpu-tools/assembler and i965 code back in sync. As part of that, I noticed that Damien dropped trailing whitespace, nuked the GL types, and replaced INLINE with inline. I plan to merge the 'whitespace' branch of ~kwg/mesa in a day or so, unless there are stro

Re: [Mesa-dev] Anybody still need clear_depth_stencil() or clear_render_target()?

2013-12-02 Thread Marek Olšák
The glClearBuffer functions don't change the framebuffer state in most cases, but the clear_render_target function does, so using it is out of the question. Yeah, the implementation of glClearBuffer seems to be incomplete. Marek On Tue, Dec 3, 2013 at 12:54 AM, Roland Scheidegger wrote: > Am 02

Re: [Mesa-dev] Anybody still need clear_depth_stencil() or clear_render_target()?

2013-12-02 Thread Roland Scheidegger
Am 02.12.2013 23:08, schrieb Andreas Hartmetz: > Hello, > > I've been lurking for a while, this seems to be my first post. > > While trying to make some "easy" (ha) improvements in radeonsi I > looked around in all the surrounding code to get a good picture of > how things work. So I noticed some

Re: [Mesa-dev] Anybody still need clear_depth_stencil() or clear_render_target()?

2013-12-02 Thread Marek Olšák
clear_render_target and clear_depth_stencil require changing the framebuffer state, which is more costly than just drawing the quad in the state tracker. Also, separate color and depth clear isn't very efficient if you can do both with a single quad. Adding scissor support to the clear function is

Re: [Mesa-dev] Anybody still need clear_depth_stencil() or clear_render_target()?

2013-12-02 Thread Erik Faye-Lund
On Mon, Dec 2, 2013 at 11:08 PM, Andreas Hartmetz wrote: > Hello, > > I've been lurking for a while, this seems to be my first post. > > While trying to make some "easy" (ha) improvements in radeonsi I looked > around in all the surrounding code to get a good picture of how things > work. So I not

Re: [Mesa-dev] [PATCH 0/6] Add support for 'sample' qualifier

2013-12-02 Thread Francisco Jerez
Chris Forbes writes: > This series adds the mesa and glsl compiler support for the new > 'sample in' and 'sample out' qualifiers from GLSL 4.0 / ARB_gpu_shader5. > > Driver support (beyond triggering per-sample fragment shader evaluation) > is not yet implemented. > The series is: Reviewed-by:

Re: [Mesa-dev] [PATCH 03/15] i965/cfg: Rework to make IF & ELSE blocks flow into ENDIF.

2013-12-02 Thread Chris Forbes
Neat -- I was about to mention the dead_control_flow_eliminate interaction, but you beat me to it. On Tue, Dec 3, 2013 at 10:43 AM, Matt Turner wrote: > And since this change makes ENDIF start blocks, I'll squash this > change in as well to make sure dead_control_flow_eliminate continues > workin

[Mesa-dev] Anybody still need clear_depth_stencil() or clear_render_target()?

2013-12-02 Thread Andreas Hartmetz
Hello, I've been lurking for a while, this seems to be my first post. While trying to make some "easy" (ha) improvements in radeonsi I looked around in all the surrounding code to get a good picture of how things work. So I noticed something: All the Gallium drivers need to implement clear_depth_

Re: [Mesa-dev] [PATCH] i965: Emit better code for ir_unop_sign.

2013-12-02 Thread Paul Berry
On 2 December 2013 13:46, Matt Turner wrote: > total instructions in shared programs: 1519751 -> 1519442 (-0.02%) > instructions in affected programs: 10154 -> 9845 (-3.04%) > --- > src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 23 > +++ > src/mesa/drivers/dri/i965/brw

[Mesa-dev] [PATCH] i965: Emit better code for ir_unop_sign.

2013-12-02 Thread Matt Turner
total instructions in shared programs: 1519751 -> 1519442 (-0.02%) instructions in affected programs: 10154 -> 9845 (-3.04%) --- src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 23 +++ src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 23 --- 2 files cha

Re: [Mesa-dev] [PATCH 03/15] i965/cfg: Rework to make IF & ELSE blocks flow into ENDIF.

2013-12-02 Thread Matt Turner
And since this change makes ENDIF start blocks, I'll squash this change in as well to make sure dead_control_flow_eliminate continues working: diff --git a/src/mesa/drivers/dri/i965/brw_dead_control_flow.cpp b/src/mesa/drivers/dri/i965/brw_dead_control_flow.cpp index ad8ed82..63a3e5b 100644 --- a/

Re: [Mesa-dev] [PATCH] automake: include only one copy of VERSION in tarball

2013-12-02 Thread Matt Turner
On Mon, Dec 2, 2013 at 11:53 AM, Emil Velikov wrote: > The VERSION file is tracked by git (git ls-files), thus > adding it to EXTRA_FILES will result in a duplicate copy > within the final tarball. Reviewed-by: Matt Turner Ugh. :( ___ mesa-dev mailing

[Mesa-dev] [PATCH 3/9] i965/vec4: Add support for printing HW_REGs in dump_instruction().

2013-12-02 Thread Matt Turner
--- src/mesa/drivers/dri/i965/brw_vec4.cpp | 60 ++ 1 file changed, 60 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp index fed6e61..551f0a2 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4.cpp +++ b/src/m

[Mesa-dev] [PATCH 8/9] i965: Externalize conditional_modifier for use in dump_instruction().

2013-12-02 Thread Matt Turner
--- src/mesa/drivers/dri/i965/brw_context.h | 1 + src/mesa/drivers/dri/i965/brw_disasm.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h index 0a45f05..d25e145 100644 --- a/src/mesa/drivers/d

[Mesa-dev] [PATCH 7/9] i965: Print argument types in dump_instruction().

2013-12-02 Thread Matt Turner
--- src/mesa/drivers/dri/i965/brw_fs.cpp | 6 +- src/mesa/drivers/dri/i965/brw_vec4.cpp | 6 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index c21239f..f10f5c0 100644 --- a/src/mesa/driver

[Mesa-dev] [PATCH 2/9] i965/fs: Print ARF registers properly in dump_instruction().

2013-12-02 Thread Matt Turner
--- src/mesa/drivers/dri/i965/brw_fs.cpp | 48 ++-- 1 file changed, 46 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index b59ab82..c21239f 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +

[Mesa-dev] [PATCH 5/9] i965/vec4: Don't print swizzles for immediate values.

2013-12-02 Thread Matt Turner
--- src/mesa/drivers/dri/i965/brw_vec4.cpp | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp index 71f5307..13f69f1 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4.cpp +++ b/src/mesa/drive

[Mesa-dev] [PATCH 4/9] i965/vec4: Print negate and absolute value for src args.

2013-12-02 Thread Matt Turner
--- src/mesa/drivers/dri/i965/brw_vec4.cpp | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp index 551f0a2..71f5307 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4

[Mesa-dev] [PATCH 9/9] i965: Print conditional mod in dump_instruction().

2013-12-02 Thread Matt Turner
--- src/mesa/drivers/dri/i965/brw_fs.cpp | 2 +- src/mesa/drivers/dri/i965/brw_vec4.cpp | 6 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index f10f5c0..f3b121a 100644 --- a/src/mesa/drivers/dri

[Mesa-dev] [PATCH 6/9] i965: Externalize reg_encoding for use in dump_instruction().

2013-12-02 Thread Matt Turner
--- src/mesa/drivers/dri/i965/brw_context.h | 1 + src/mesa/drivers/dri/i965/brw_disasm.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h index 97f8906..0a45f05 100644 --- a/src/mesa/drivers/d

[Mesa-dev] [PATCH 1/9] i965: Don't print extra (null) arguments in dump_instruction().

2013-12-02 Thread Matt Turner
--- src/mesa/drivers/dri/i965/brw_fs.cpp | 4 ++-- src/mesa/drivers/dri/i965/brw_vec4.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index 2d41c3f..b59ab82 100644 --- a/src/mesa/drivers/dri

Re: [Mesa-dev] [Mesa-stable] [PATCH v3] egl: add HAVE_LIBDRM define, fix EGL X11 platform

2013-12-02 Thread Chad Versace
On 12/01/2013 01:53 AM, Tapani Pälli wrote: Commit a594cec broke EGL X11 backend by adding dependency between X11 and DRM backends requiring HAVE_EGL_PLATFORM_DRM defined for X11. This patch fixes the issue by adding additional define for libdrm detection independent of which backend is being co

Re: [Mesa-dev] [PATCH 06/23] i965: Define common register base class shared between both back-ends.

2013-12-02 Thread Francisco Jerez
Francisco Jerez writes: > Chris Forbes writes: > >> +fs_reg::fs_reg(const backend_reg ®) >> +{ >> + init(); >> + *static_cast(this) = reg; >> >> This is a bit gross... > > Would you prefer 'this->operator=(reg);'? > I just remembered... The reason this wouldn't work is that it would trigger

Re: [Mesa-dev] [PATCH 06/23] i965: Define common register base class shared between both back-ends.

2013-12-02 Thread Francisco Jerez
Chris Forbes writes: > Ideally, we wouldn't need init() and you could just have a > copy-constructor do the right thing, I think -- currently, all the > backend_reg fields get initialized 3 times: > > - backend_reg ctor > - init() blasting everything to zero > - this assignment > Yeah, I complete

Re: [Mesa-dev] [PATCH 06/23] i965: Define common register base class shared between both back-ends.

2013-12-02 Thread Chris Forbes
Ideally, we wouldn't need init() and you could just have a copy-constructor do the right thing, I think -- currently, all the backend_reg fields get initialized 3 times: - backend_reg ctor - init() blasting everything to zero - this assignment On Tue, Dec 3, 2013 at 9:22 AM, Francisco Jerez wr

Re: [Mesa-dev] [PATCH 06/23] i965: Define common register base class shared between both back-ends.

2013-12-02 Thread Francisco Jerez
Chris Forbes writes: > +fs_reg::fs_reg(const backend_reg ®) > +{ > + init(); > + *static_cast(this) = reg; > > This is a bit gross... Would you prefer 'this->operator=(reg);'? Meh... :) pgphocK2Fll37.pgp Description: PGP signature ___ mesa-dev m

Re: [Mesa-dev] [PATCH 06/23] i965: Define common register base class shared between both back-ends.

2013-12-02 Thread Chris Forbes
+fs_reg::fs_reg(const backend_reg ®) +{ + init(); + *static_cast(this) = reg; This is a bit gross... ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [Bug 72230] Unable to extract MesaLib-10.0.0.tar.{gz, bz2} with bsdtar

2013-12-02 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=72230 --- Comment #2 from Patrick Steinhardt --- I can confirm the attached patch fixes the problem. Thanks. -- You are receiving this mail because: You are the assignee for the bug. ___ mesa-dev mailing li

[Mesa-dev] [PATCH] automake: include only one copy of VERSION in tarball

2013-12-02 Thread Emil Velikov
The VERSION file is tracked by git (git ls-files), thus adding it to EXTRA_FILES will result in a duplicate copy within the final tarball. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=72230 Cc: 10.0 Signed-off-by: Emil Velikov --- Makefile.am | 1 - 1 file changed, 1 deletion(-) diff

[Mesa-dev] [Bug 72230] Unable to extract MesaLib-10.0.0.tar.{gz, bz2} with bsdtar

2013-12-02 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=72230 --- Comment #1 from Emil Velikov --- Created attachment 90116 --> https://bugs.freedesktop.org/attachment.cgi?id=90116&action=edit include only one copy of VERSION in tarball Seems like adding VERSION to EXTRA_FILES was an overkill. Can you g

[Mesa-dev] [PATCH 25/25] i965/gen7: Expose ARB_shader_image_load_store.

2013-12-02 Thread Francisco Jerez
--- src/mesa/drivers/dri/i965/intel_extensions.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/intel_extensions.c b/src/mesa/drivers/dri/i965/intel_extensions.c index ab27d43..5145034 100644 --- a/src/mesa/drivers/dri/i965/intel_extensions.c +++

[Mesa-dev] [PATCH 23/25] i965/gen7: Implement glMemoryBarrier().

2013-12-02 Thread Francisco Jerez
--- src/mesa/drivers/dri/i965/brw_program.c | 30 ++ 1 file changed, 30 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_program.c b/src/mesa/drivers/dri/i965/brw_program.c index 094deeb..44af46f 100644 --- a/src/mesa/drivers/dri/i965/brw_program.c +++ b/src/m

[Mesa-dev] [PATCH 24/25] i965/gen7: Define implementation constants for ARB_shader_image_load_store.

2013-12-02 Thread Francisco Jerez
--- src/mesa/drivers/dri/i965/brw_context.c | 9 + 1 file changed, 9 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c index 6de6759..ce8c311 100644 --- a/src/mesa/drivers/dri/i965/brw_context.c +++ b/src/mesa/drivers/dri/i965/br

[Mesa-dev] [PATCH 21/25] i965: Add missing PIPE_CONTROL invalidate flag to intel_reg.h.

2013-12-02 Thread Francisco Jerez
--- src/mesa/drivers/dri/i965/intel_reg.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/drivers/dri/i965/intel_reg.h b/src/mesa/drivers/dri/i965/intel_reg.h index 13b68cc..23bf0ac 100644 --- a/src/mesa/drivers/dri/i965/intel_reg.h +++ b/src/mesa/drivers/dri/i965/intel_reg.h @@ -70,

[Mesa-dev] [PATCH 22/25] i965/gen6+: Factor out PIPE_CONTROL submission from intel_batchbuffer_emit_mi_flush.

2013-12-02 Thread Francisco Jerez
--- src/mesa/drivers/dri/i965/intel_batchbuffer.c | 54 --- src/mesa/drivers/dri/i965/intel_batchbuffer.h | 2 + 2 files changed, 34 insertions(+), 22 deletions(-) diff --git a/src/mesa/drivers/dri/i965/intel_batchbuffer.c b/src/mesa/drivers/dri/i965/intel_batchbuffer.c

[Mesa-dev] [PATCH 14/25] i965: Update brw_instruction_name() with some recently added opcodes.

2013-12-02 Thread Francisco Jerez
--- src/mesa/drivers/dri/i965/brw_shader.cpp | 20 1 file changed, 20 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_shader.cpp b/src/mesa/drivers/dri/i965/brw_shader.cpp index 26300a6..dc6d35e 100644 --- a/src/mesa/drivers/dri/i965/brw_shader.cpp +++ b/src/mesa/dr

[Mesa-dev] [PATCH 17/25] i965/vec4: Obtain atomic counter locations by recursing through the visitor.

2013-12-02 Thread Francisco Jerez
Until now atomic counter built-ins were handled in a way that prevented the visitor from encountering atomic counter IR variables and dereferences directly. In the new surface lowering code it's going to be more convenient to be able to call back into the visitor to let it handle the ugly details

[Mesa-dev] [PATCH 03/25] i965/gen7: Implement surface state set-up for shader images.

2013-12-02 Thread Francisco Jerez
--- src/mesa/drivers/dri/i965/brw_context.h | 10 ++ src/mesa/drivers/dri/i965/gen7_wm_surface_state.c | 175 ++ 2 files changed, 185 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h index 3f2edcf..0816912

[Mesa-dev] [PATCH 12/25] i965: Add typed surface access messages.

2013-12-02 Thread Francisco Jerez
--- src/mesa/drivers/dri/i965/brw_defines.h| 4 + src/mesa/drivers/dri/i965/brw_eu.h | 25 src/mesa/drivers/dri/i965/brw_eu_emit.c| 166 + src/mesa/drivers/dri/i965/brw_fs.cpp | 3 + src/mesa/drivers/dri/i965/brw_f

[Mesa-dev] [PATCH 10/25] i965: Simplify generator code for untyped surface messages.

2013-12-02 Thread Francisco Jerez
--- src/mesa/drivers/dri/i965/brw_fs.h | 9 -- src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 38 -- src/mesa/drivers/dri/i965/brw_vec4.h | 9 -- src/mesa/drivers/dri/i965/brw_vec4_generator.cpp | 40 4 files chan

[Mesa-dev] [PATCH 09/25] i965/gen7: Fix the untyped surface messages to deal with indirect surface access.

2013-12-02 Thread Francisco Jerez
Change brw_untyped_atomic() and brw_untyped_surface_read() to take the surface index as a register instead of a constant, construct the message descriptor dynamically by OR'ing the surface index and other descriptor bits together and use the non-immediate variant of SEND to submit the surface messa

[Mesa-dev] [PATCH 19/25] i965/fs: Hook up the surface visitor.

2013-12-02 Thread Francisco Jerez
--- src/mesa/drivers/dri/i965/brw_fs.h | 9 -- src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 138 --- 2 files changed, 18 insertions(+), 129 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs.h b/src/mesa/drivers/dri/i965/brw_fs.h index eb71676..ae4a6

[Mesa-dev] [PATCH 16/25] i965/fs: Obtain atomic counter locations by recursing through the visitor.

2013-12-02 Thread Francisco Jerez
Until now atomic counter built-ins were handled in a way that prevented the visitor from encountering atomic counter IR variables and dereferences directly. In the new surface lowering code it's going to be more convenient to be able to call back into the visitor to let it handle the ugly details

[Mesa-dev] [PATCH 15/25] i965: Add visitor support for handling image uniforms.

2013-12-02 Thread Francisco Jerez
--- src/mesa/drivers/dri/i965/brw_fs.cpp | 36 +++-- src/mesa/drivers/dri/i965/brw_fs.h | 4 +++ src/mesa/drivers/dri/i965/brw_shader.cpp | 25 +++ src/mesa/drivers/dri/i965/brw_shader.h | 4 +++ src/mesa/drivers/dri/i965/brw_vec4.h

[Mesa-dev] [PATCH 20/25] i965/vec4: Hook up the surface visitor.

2013-12-02 Thread Francisco Jerez
--- src/mesa/drivers/dri/i965/brw_vec4.h | 9 -- src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 109 + 2 files changed, 19 insertions(+), 99 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_vec4.h b/src/mesa/drivers/dri/i965/brw_vec4.h index 989c1a9..

[Mesa-dev] [PATCH 13/25] i965: Add memory fence opcode.

2013-12-02 Thread Francisco Jerez
--- src/mesa/drivers/dri/i965/brw_defines.h | 2 + src/mesa/drivers/dri/i965/brw_eu.h | 4 ++ src/mesa/drivers/dri/i965/brw_eu_emit.c | 69 src/mesa/drivers/dri/i965/brw_fs.cpp | 2 + src/mesa/drivers/dri/i965/brw_fs_generator

[Mesa-dev] [PATCH 06/25] i965: Hook up image state upload.

2013-12-02 Thread Francisco Jerez
--- src/mesa/drivers/dri/i965/brw_context.h | 2 + src/mesa/drivers/dri/i965/brw_gs_surface_state.c | 24 src/mesa/drivers/dri/i965/brw_state.h| 3 ++ src/mesa/drivers/dri/i965/brw_state_upload.c | 6 +++ src/mesa/drivers/dri/i965/brw_vs_surface_state.c | 2

[Mesa-dev] [PATCH 04/25] i965: Add helper functions to calculate the slice pitch of an array or 3D miptree.

2013-12-02 Thread Francisco Jerez
--- src/mesa/drivers/dri/i965/brw_tex_layout.c| 51 +-- src/mesa/drivers/dri/i965/intel_mipmap_tree.h | 10 ++ 2 files changed, 50 insertions(+), 11 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_tex_layout.c b/src/mesa/drivers/dri/i965/brw_tex_layout.c i

[Mesa-dev] [PATCH 07/25] i965/gen7.5: Poke the 3DSTATE UAV access enable bits.

2013-12-02 Thread Francisco Jerez
--- src/mesa/drivers/dri/i965/brw_defines.h | 3 +++ src/mesa/drivers/dri/i965/gen7_gs_state.c | 4 +++- src/mesa/drivers/dri/i965/gen7_vs_state.c | 13 - src/mesa/drivers/dri/i965/gen7_wm_state.c | 3 +++ 4 files changed, 17 insertions(+), 6 deletions(-) diff --git a/src/mesa/dr

[Mesa-dev] [PATCH 05/25] i965: Define and initialize image meta-data structure.

2013-12-02 Thread Francisco Jerez
This will be used to pass image information to the shader when we cannot use typed surface reads and writes. All entries except surface_idx and size are otherwise unused and will get eliminated by the uniform packing pass. size will be used for bounds checking with some image formats and will be

[Mesa-dev] [PATCH 08/25] i965/gen7: Add missing defines for render cache messages.

2013-12-02 Thread Francisco Jerez
And remove duplicated definition of OWORD_DUAL_BLOCK_WRITE. --- src/mesa/drivers/dri/i965/brw_defines.h | 8 +++- src/mesa/drivers/dri/i965/brw_vec4_generator.cpp | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_defines.h b/src/mesa

[Mesa-dev] [PATCH 02/25] i965/gen7: Factor out texture surface state set-up from gen7_update_texture_surface().

2013-12-02 Thread Francisco Jerez
This moves most of the surface state set-up logic that can be shared between textures and shader images to a separate function. --- src/mesa/drivers/dri/i965/gen7_wm_surface_state.c | 102 +- 1 file changed, 62 insertions(+), 40 deletions(-) diff --git a/src/mesa/drivers/dri/i

[Mesa-dev] [PATCH 11/25] i965: Add the untyped surface write opcode.

2013-12-02 Thread Francisco Jerez
--- src/mesa/drivers/dri/i965/brw_defines.h| 1 + src/mesa/drivers/dri/i965/brw_eu.h | 8 src/mesa/drivers/dri/i965/brw_eu_emit.c| 49 ++ src/mesa/drivers/dri/i965/brw_fs.cpp | 1 + src/mesa/drivers/dri/i965/brw_fs_g

[Mesa-dev] [PATCH 04/23] i965: Move up duplicated fields from stage-specific prog_data to brw_stage_prog_data.

2013-12-02 Thread Francisco Jerez
There doesn't seem to be any reason for nr_params, nr_pull_params, param, and pull_param to be duplicated in the stage-specific subclasses of brw_stage_prog_data. Moving their definition to the common base class will allow some code sharing in a future commit, the removal of brw_vec4_prog_data_com

[Mesa-dev] [PATCH 00/23] i965 compiler fixes in preparation for ARB_shader_image_load_store.

2013-12-02 Thread Francisco Jerez
This is a series of assorted clean-up and refactoring changes in preparation for the actual series implementing shader images. The most important changes in this series are PATCH 06, that defines the register representation class used by the image built-in lowering code, and PATCH 07-08, that add

[Mesa-dev] [PATCH 06/23] i965: Define common register base class shared between both back-ends.

2013-12-02 Thread Francisco Jerez
This defines a backend_reg class that contains most of the common member variables present in the fs and vec4 register classes. It's simply a location in the register file and doesn't know about indirect addressing or funky align1/align16 access modes. Some of the image lowering code coming up is

[Mesa-dev] [PATCH 01/25] i965: Allocate binding table space for shader images.

2013-12-02 Thread Francisco Jerez
--- src/mesa/drivers/dri/i965/brw_context.h | 5 + src/mesa/drivers/dri/i965/brw_shader.cpp | 7 +++ 2 files changed, 12 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h index 1387aa9..3f2edcf 100644 --- a/src/mesa/drivers/dri/

[Mesa-dev] [PATCH 17/23] i965/vec4: Trivial improvements to the with_writemask() function.

2013-12-02 Thread Francisco Jerez
Add assertion that the register is not in the HW_REG or IMM file, calculate the conjunction of the old and new mask instead of replacing the old [consistent with the behavior of brw_writemask(), causes no functional changes right now], make it static inline to let the compiler do a slightly better

[Mesa-dev] [PATCH 21/23] i965: Add helper function to find out the signedness of a register type.

2013-12-02 Thread Francisco Jerez
--- src/mesa/drivers/dri/i965/brw_reg.h | 21 + 1 file changed, 21 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_reg.h b/src/mesa/drivers/dri/i965/brw_reg.h index 37a2ca9..2591cbf 100644 --- a/src/mesa/drivers/dri/i965/brw_reg.h +++ b/src/mesa/drivers/dri/i965/brw_

[Mesa-dev] [PATCH 22/23] i965: Have brw_imm_vf4() take the vector components as integer values.

2013-12-02 Thread Francisco Jerez
--- src/mesa/drivers/dri/i965/brw_clip_util.c | 2 +- src/mesa/drivers/dri/i965/brw_reg.h | 40 +++ 2 files changed, 31 insertions(+), 11 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_clip_util.c b/src/mesa/drivers/dri/i965/brw_clip_util.c index 24d05

[Mesa-dev] [PATCH 23/23] i965: Add polymorphic backend_visitor method to extract the result of a visit.

2013-12-02 Thread Francisco Jerez
This will be used by the generic implementation of the image and atomic counter built-ins to extract the register location of its arguments without having to be aware of the actual visitor type. --- src/mesa/drivers/dri/i965/brw_fs.h | 3 +++ src/mesa/drivers/dri/i965/brw_fs_visitor.cp

[Mesa-dev] [PATCH 20/23] i965/vec4: Use swizzle() in the ARB_vertex_program code.

2013-12-02 Thread Francisco Jerez
--- src/mesa/drivers/dri/i965/brw_reg.h | 2 ++ src/mesa/drivers/dri/i965/brw_vec4_vp.cpp | 33 +-- 2 files changed, 11 insertions(+), 24 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_reg.h b/src/mesa/drivers/dri/i965/brw_reg.h index 66f6aad..37a2ca9

[Mesa-dev] [PATCH 12/23] i965/vec4: Fix off-by-one register class overallocation.

2013-12-02 Thread Francisco Jerez
--- src/mesa/drivers/dri/i965/brw_vec4_reg_allocate.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_vec4_reg_allocate.cpp b/src/mesa/drivers/dri/i965/brw_vec4_reg_allocate.cpp index 951560b..b19b40d 100644 --- a/src/mesa/drivers/dri/i965/brw_v

[Mesa-dev] [PATCH 19/23] i965/fs: Use offset() in the ARB_fragment_program code.

2013-12-02 Thread Francisco Jerez
--- src/mesa/drivers/dri/i965/brw_fs_fp.cpp | 131 +++- 1 file changed, 62 insertions(+), 69 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs_fp.cpp b/src/mesa/drivers/dri/i965/brw_fs_fp.cpp index b537a5a..5433023 100644 --- a/src/mesa/drivers/dri/i965/brw_f

[Mesa-dev] [PATCH 13/23] i965/fs: Take into account reg_offset consistently for MRF regs.

2013-12-02 Thread Francisco Jerez
Until now it was only being taken into account in the VEC4 back-end but not in the FS back-end. Do it in both cases. --- src/mesa/drivers/dri/i965/brw_fs.h | 2 +- src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 10 ++ src/mesa/drivers/dri/i965/brw_shader.h | 7

[Mesa-dev] [PATCH 11/23] i965/vec4: Fix confusion between SWIZZLE and BRW_SWIZZLE macros.

2013-12-02 Thread Francisco Jerez
Most of the VEC4 back-end agrees on src_reg::swizzle being one of the BRW_SWIZZLE macros defined in brw_reg.h, except in two places where we use Mesa's SWIZZLE macros. There is even a doxygen comment saying that Mesa's macros are the right ones. They are incompatible swizzle representations (3 bi

[Mesa-dev] [PATCH 15/23] i965/vec4: Add non-mutating helper functions to modify src_reg::swizzle and ::negate.

2013-12-02 Thread Francisco Jerez
--- src/mesa/drivers/dri/i965/brw_vec4.h | 24 1 file changed, 24 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_vec4.h b/src/mesa/drivers/dri/i965/brw_vec4.h index db1604a..8ce3a5e 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4.h +++ b/src/mesa/drivers/dri/i9

[Mesa-dev] [PATCH 03/23] i965/vec4: Add constructor of src_reg from a fixed hardware reg.

2013-12-02 Thread Francisco Jerez
--- src/mesa/drivers/dri/i965/brw_vec4.cpp | 8 src/mesa/drivers/dri/i965/brw_vec4.h | 1 + 2 files changed, 9 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp index 73f91a0..4458e76 100644 --- a/src/mesa/drivers/dri/i965/brw_v

[Mesa-dev] [PATCH 07/23] i965/fs: Add support for sub-register byte offsets to the FS back-end IR.

2013-12-02 Thread Francisco Jerez
It would be nice if we could have a single 'reg_offset' field expressed in bytes that would serve the purpose of both, but the semantics of 'reg_offset' are quite complex currently (it's measured in units of one, eight or sixteen dwords depending on the register file and the dispatch width) and cha

[Mesa-dev] [PATCH 05/23] i965: Unify fs_generator:: and vec4_generator::mark_surface_used as a free function.

2013-12-02 Thread Francisco Jerez
This way it can be used anywhere. I need it from the visitor. --- src/mesa/drivers/dri/i965/brw_fs.h | 2 -- src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 28 +--- src/mesa/drivers/dri/i965/brw_program.c | 10 + src/mesa/drivers/dri/i965/br

[Mesa-dev] [PATCH 18/23] i965/fs: Remove fs_reg::retype.

2013-12-02 Thread Francisco Jerez
There doesn't seem to be any reason for it to be a method, and it's surprising that the expression 'reg.retype(t)' doesn't retype its object but rather it creates a temporary with the new type. Use 'retype(reg, t)' instead. --- src/mesa/drivers/dri/i965/brw_fs.cpp | 8 src/mesa/

[Mesa-dev] [PATCH 08/23] i965/fs: Add support for specifying register horizontal strides.

2013-12-02 Thread Francisco Jerez
--- src/mesa/drivers/dri/i965/brw_fs.cpp | 29 +++--- src/mesa/drivers/dri/i965/brw_fs.h | 3 +++ .../drivers/dri/i965/brw_fs_copy_propagation.cpp | 7 +- src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 8 +++--- .../drivers/dri/i965/brw_

[Mesa-dev] [PATCH 01/23] i965/fs: Use a separate variable to keep track of the last uniform index seen.

2013-12-02 Thread Francisco Jerez
Like the VEC4 back-end does. It will make dynamic allocation of the param_size array easier in a future commit. --- src/mesa/drivers/dri/i965/brw_fs.cpp | 51 +--- src/mesa/drivers/dri/i965/brw_fs.h | 3 ++ src/mesa/drivers/dri/i965/brw_fs_fp.cpp |

[Mesa-dev] [PATCH 14/23] i965: Add non-mutating helper functions to modify the register offset.

2013-12-02 Thread Francisco Jerez
Yes, we could avoid having four copies of essentially the same code by using templates here. --- src/mesa/drivers/dri/i965/brw_fs.h | 8 src/mesa/drivers/dri/i965/brw_shader.h | 8 src/mesa/drivers/dri/i965/brw_vec4.h | 16 3 files changed, 32 insertions(

[Mesa-dev] [PATCH 02/23] i965/fs: Allocate the param_size array dynamically.

2013-12-02 Thread Francisco Jerez
Useful because the total number of uniform components might exceed MAX_UNIFORMS * 4 in some cases because of the image metadata we'll be passing as push constants. --- src/mesa/drivers/dri/i965/brw_fs.h | 2 +- src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 2 +- src/mesa/drivers/dri/i96

[Mesa-dev] [PATCH 09/23] i965/fs: Remove fs_reg::smear.

2013-12-02 Thread Francisco Jerez
The same effect can be achieved using a combination of ::stride and ::subreg_offset. Remove the less flexible ::smear to keep the data members of fs_reg orthogonal. --- src/mesa/drivers/dri/i965/brw_fs.cpp | 23 +- src/mesa/drivers/dri/i965/brw_fs.h

[Mesa-dev] [PATCH 10/23] i965/fs: Remove fs_reg::sechalf.

2013-12-02 Thread Francisco Jerez
The same effect can be achieved using ::subreg_offset. Remove the less flexible alternative and define a convenience function to keep the fs_reg interface sane. --- src/mesa/drivers/dri/i965/brw_fs.cpp | 9 ++--- src/mesa/drivers/dri/i965/brw_fs.h | 11 ++- src/

[Mesa-dev] [PATCH 16/23] i965: Make sure that backend_reg::type and brw_reg::type are consistent for fixed regs.

2013-12-02 Thread Francisco Jerez
And define non-mutating helper functions to retype fixed and normal regs with a common interface. At some point we may want to get rid of ::fixed_hw_reg completely and have fixed regs use the normal register data members (e.g. backend_reg::reg to select a fixed GRF number, src_reg::swizzle to stor

Re: [Mesa-dev] Spec interpretation question: layered framebuffers with mismatched layer counts

2013-12-02 Thread Paul Berry
On 25 November 2013 11:08, Ian Romanick wrote: > On 11/22/2013 03:08 PM, Paul Berry wrote: > > The ARB_geometry_shader4 spec says, in the list of conditions necessary > > for framebuffer completeness: > > > > * If any framebuffer attachment is layered, all attachments must > have > >

Re: [Mesa-dev] [PATCH 2/2] i965/hsw: Apply non-msrt fast color clear w/a to all HSW GTs

2013-12-02 Thread Chad Versace
On 11/26/2013 09:34 PM, Kenneth Graunke wrote: On 11/26/2013 05:34 PM, Chad Versace wrote: Pre-patch, the workaround was applied to only HSW GT3. However, the workaround also fixes render corruption on the HSW GT1 Chromebook, codenamed Falco. CC: Anuj Phogat CC: Paul Berry OTC-Tracker: CHRMOS

Re: [Mesa-dev] [PATCH 2/2] i965/hsw: Apply non-msrt fast color clear w/a to all HSW GTs

2013-12-02 Thread Chad Versace
On 11/26/2013 07:13 PM, Paul Berry wrote: On 26 November 2013 17:34, Chad Versace wrote: Pre-patch, the workaround was applied to only HSW GT3. However, the workaround also fixes render corruption on the HSW GT1 Chromebook, codenamed Falco. CC: Anuj Phogat CC: Paul Berry OTC-Tracker: CHRMOS-

[Mesa-dev] [PATCH 07/15] i965/cfg: Clean up cfg_t constructors.

2013-12-02 Thread Matt Turner
parent_mem_ctx was unused since db47074a, so remove the two wrappers around create() and make create() the constructor. --- src/mesa/drivers/dri/i965/brw_cfg.cpp | 13 + src/mesa/drivers/dri/i965/brw_cfg.h | 5 + src/mesa/drivers/dri/i965/brw_dead

[Mesa-dev] [PATCH 14/15] i965: Allow commuting the operands of ADDC for const propagation.

2013-12-02 Thread Matt Turner
--- src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp | 2 +- src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp b/src/mesa/drivers/dri/i965/brw_fs_copy_propagat

[Mesa-dev] [PATCH 15/15] glsl: Remove silly OR(..., 0x0) from ldexp() lowering.

2013-12-02 Thread Matt Turner
I translated copysign(0.0f, x) a little too literally. --- src/glsl/lower_instructions.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/glsl/lower_instructions.cpp b/src/glsl/lower_instructions.cpp index d01879c..8f8d448 100644 --- a/src/glsl/lower_instructions.cpp ++

[Mesa-dev] [PATCH 13/15] i965/fs: Rename register_coalesce_2() -> register_coalesce().

2013-12-02 Thread Matt Turner
--- src/mesa/drivers/dri/i965/brw_fs.cpp | 10 +- src/mesa/drivers/dri/i965/brw_fs.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index ad1323c..2d41c3f 100644 --- a/src/mesa/drivers/d

  1   2   >