Re: [Mesa-dev] [PATCH 2/2] i965/fs: Silence uninitialized variable warning.

2014-10-02 Thread Jason Ekstrand
On Tue, Sep 30, 2014 at 5:00 PM, Matt Turner matts...@gmail.com wrote: On Tue, Sep 30, 2014 at 4:24 PM, Matt Turner matts...@gmail.com wrote: The compiler isn't privy to the knowledge that we're doing at least one framebuffer write. --- src/mesa/drivers/dri/i965/brw_fs.cpp | 1 + 1

[Mesa-dev] [PATCH 1/3] util: Use reg_belongs_to_class instead of BITSET_TEST

2014-10-03 Thread Jason Ekstrand
This shouldn't be a functional change since reg_belongs_to_class is just a wrapper around BITSET_TEST. It just makes the code a little easier to read. Signed-off-by: Jason Ekstrand jason.ekstr...@intel.com --- src/util/register_allocate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[Mesa-dev] [PATCH 3/3] i965/fs: Compute q-values for register allocation manually

2014-10-03 Thread Jason Ekstrand
. This patch should make generating the ra_set much faster and melt the piglit run times. Signed-off-by: Jason Ekstrand jason.ekstr...@intel.com --- src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp | 52 ++- 1 file changed, 50 insertions(+), 2 deletions(-) diff --git a/src

[Mesa-dev] [PATCH 2/3] i965/fs: Add another use of MAX_VGRF_SIZE

2014-10-03 Thread Jason Ekstrand
Signed-off-by: Jason Ekstrand jason.ekstr...@intel.com --- src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp b/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp index 32669f6

Re: [Mesa-dev] [PATCH 3/3] i965/fs: Compute q-values for register allocation manually

2014-10-04 Thread Jason Ekstrand
On Oct 3, 2014 11:06 PM, Connor Abbott cwabbo...@gmail.com wrote: On Fri, Oct 3, 2014 at 10:03 PM, Jason Ekstrand ja...@jlekstrand.net wrote: Previously, we were allowing the register allocation code to do the computation for us in ra_set_finalize. However, the runtime

[Mesa-dev] [PATCH 1/4] util: Use reg_belongs_to_class instead of BITSET_TEST

2014-10-07 Thread Jason Ekstrand
This shouldn't be a functional change since reg_belongs_to_class is just a wrapper around BITSET_TEST. It just makes the code a little easier to read. Signed-off-by: Jason Ekstrand jason.ekstr...@intel.com --- src/util/register_allocate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[Mesa-dev] [PATCH 2/4] i965/fs: Add another use of MAX_VGRF_SIZE

2014-10-07 Thread Jason Ekstrand
Signed-off-by: Jason Ekstrand jason.ekstr...@intel.com --- src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp b/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp index 32669f6

[Mesa-dev] [PATCH 3/4] i965/fs: Don't interfere with too many base registers

2014-10-07 Thread Jason Ekstrand
is concerned, we only have 64. We were accidentally adding way too much interference. Signed-off-by: Jason Ekstrand jason.ekstr...@gmail.com Cc: Connor Abbot cwabbo...@gmail.com --- src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

Re: [Mesa-dev] [PATCH] mesa/main: Fix unpack_R5G6B5_UNORM.

2014-10-07 Thread Jason Ekstrand
On Oct 7, 2014 12:04 PM, Iago Toral Quiroga ito...@igalia.com wrote: There is a comment warning about the fact that this is not doing what we expect, so fix it. This should be doing the same as unpack_B5G6R5_UNORM but swapping B and R. --- Jason started some work to auto-generate the

Re: [Mesa-dev] [PATCH] mesa/main: Fix unpack_R5G6B5_UNORM.

2014-10-07 Thread Jason Ekstrand
On Oct 8, 2014 6:36 AM, Iago Toral ito...@igalia.com wrote: El 2014-10-07 21:46, Jason Ekstrand escribió: On Oct 7, 2014 12:04 PM, Iago Toral Quiroga ito...@igalia.com wrote: There is a comment warning about the fact that this is not doing what we expect, so fix it. This should

Re: [Mesa-dev] [PATCH 3/4] i965/fs: Don't interfere with too many base registers

2014-10-08 Thread Jason Ekstrand
On Oct 8, 2014 11:39 AM, Connor Abbott cwabbo...@gmail.com wrote: On Tue, Oct 7, 2014 at 4:33 AM, Jason Ekstrand ja...@jlekstrand.net wrote: On older GENs in SIMD16 mode, we were accidentally building too much interference into our register classes. Since everything is divided by 2

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

2014-10-13 Thread Jason Ekstrand
, we make more mistakes when guessing the key, which is how I spotted the bug. It is reproducible on Haswell by making precompile choose daft values for fields. Cc: Jason Ekstrand ja...@jlekstrand.net Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/drivers/dri/i965

[Mesa-dev] [PATCH 2.9/4] i965/fs: Properly precolor payload registers on GEN5 in SIMD16

2014-10-14 Thread Jason Ekstrand
. This will be fixed in the next commit. Signed-off-by: Jason Ekstrand jason.ekstr...@intel.com --- src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp b/src/mesa/drivers/dri/i965

[Mesa-dev] [PATCH] i965/fs: Use the correct regs_written on unspill instructions

2014-10-14 Thread Jason Ekstrand
Signed-off-by: Jason Ekstrand jason.ekstr...@intel.com --- src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp b/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp index 28a7483..46e465f 100644

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

2014-10-14 Thread Jason Ekstrand
On Mon, Oct 13, 2014 at 9:54 PM, Kenneth Graunke kenn...@whitecape.org wrote: From: Connor Abbott connor.abb...@intel.com At this point, the only thing it's used for is the opcode. Signed-off-by: Connor Abbott connor.abb...@intel.com Reviewed-by: Kenneth Graunke kenn...@whitecape.org ---

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

2014-10-14 Thread Jason Ekstrand
On Tue, Oct 14, 2014 at 3:03 PM, Jason Ekstrand ja...@jlekstrand.net wrote: On Mon, Oct 13, 2014 at 9:54 PM, Kenneth Graunke kenn...@whitecape.org wrote: From: Connor Abbott connor.abb...@intel.com At this point, the only thing it's used for is the opcode. Signed-off-by: Connor Abbott

Re: [Mesa-dev] [PATCH] i965: Fix an off-by-1 error in the draw upload code's size calculation.

2014-10-15 Thread Jason Ekstrand
On Tue, Oct 14, 2014 at 4:42 PM, Kenneth Graunke kenn...@whitecape.org wrote: According to INTEL_DEBUG=perf, Borderlands: The Pre-Sequel was stalling on nearly every glBufferSubData call, with very slightly overlapping busy ranges. It turns out the draw upload code was accidentally including

Re: [Mesa-dev] [WIP 05/25] i965/fs: Prepare virtual registers for double precision floats

2014-10-16 Thread Jason Ekstrand
not just make type_size return 2 for doubles? --Jason Ekstrand + this-width = v-dispatch_width; assert(this-width == 8 || this-width == 16); } -- 1.8.3.1 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org

[Mesa-dev] [PATCH] i965/fs: Change the type of booleans to UD and emit correct immediates

2014-10-16 Thread Jason Ekstrand
instructions. total instructions in shared programs: 5473519 - 5465864 (-0.14%) instructions in affected programs: 432849 - 425194 (-1.77%) GAINED:27 LOST: 0 Signed-off-by: Jason Ekstrand jason.ekstr...@intel.com --- src/mesa/drivers/dri

[Mesa-dev] [PATCH 4/5] i965/fs: Use correct spill offsets

2014-10-24 Thread Jason Ekstrand
--- src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp b/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp index d4b72d8..49b50ee 100644 ---

[Mesa-dev] [PATCH 1/5] i965/fs: Use instruction execution sizes when generating scratch reads/writes

2014-10-24 Thread Jason Ekstrand
--- src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp index c2010c0..c95beb6 100644 ---

[Mesa-dev] [PATCH 2/5] i965/fs: Don't [un]spill multiple registers at a time in SIMD8 mode

2014-10-24 Thread Jason Ekstrand
I thought this would be a clever way to make spilling less expensive. However, it appears that the oword read/write messages we are using for spilling ignore the execution size and assume SIMD16 whenever working with more than one register. --- src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp |

[Mesa-dev] [PATCH 3/5] i965: Use the spill destination for the message header on GEN = 7

2014-10-24 Thread Jason Ekstrand
--- src/mesa/drivers/dri/i965/brw_eu_emit.c | 19 +-- 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_eu_emit.c b/src/mesa/drivers/dri/i965/brw_eu_emit.c index 92f19e2..bb6334b 100644 --- a/src/mesa/drivers/dri/i965/brw_eu_emit.c +++

[Mesa-dev] [PATCH 5/5] i965/fs: Make scratch write instructions use the correct execution size

2014-10-24 Thread Jason Ekstrand
--- src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp b/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp index 49b50ee..3dedfa7 100644 ---

Re: [Mesa-dev] [PATCH 2/5] i965/fs: Don't [un]spill multiple registers at a time in SIMD8 mode

2014-10-24 Thread Jason Ekstrand
On Oct 24, 2014 12:51 PM, Matt Turner matts...@gmail.com wrote: On Fri, Oct 24, 2014 at 12:25 PM, Jason Ekstrand ja...@jlekstrand.net wrote: I thought this would be a clever way to make spilling less expensive. However, it appears that the oword read/write messages we are using

Re: [Mesa-dev] [PATCH 4/5] i965/fs: Use correct spill offsets

2014-10-24 Thread Jason Ekstrand
On Fri, Oct 24, 2014 at 12:25 PM, Jason Ekstrand ja...@jlekstrand.net wrote: --- src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp b/src/mesa/drivers/dri/i965

Re: [Mesa-dev] [PATCH 2/5] i965/fs: Don't [un]spill multiple registers at a time in SIMD8 mode

2014-10-24 Thread Jason Ekstrand
On Fri, Oct 24, 2014 at 1:00 PM, Matt Turner matts...@gmail.com wrote: On Fri, Oct 24, 2014 at 12:55 PM, Jason Ekstrand ja...@jlekstrand.net wrote: On Oct 24, 2014 12:51 PM, Matt Turner matts...@gmail.com wrote: On Fri, Oct 24, 2014 at 12:25 PM, Jason Ekstrand ja...@jlekstrand.net wrote

[Mesa-dev] [PATCH 4/4] i965/fs: Compute q-values for register allocation manually

2014-10-24 Thread Jason Ekstrand
. This patch should make generating the ra_set much faster and melt the piglit run times. v2: Fixed a couple of bugs. I have now verified that the same q-values are generated both ways. Signed-off-by: Jason Ekstrand jason.ekstr...@intel.com Cc: Connor Abbot cwabbo...@gmail.com --- src/mesa

Re: [Mesa-dev] [PATCH 3/5] mesa: Handle clip control in meta operations.

2014-10-24 Thread Jason Ekstrand
This patch breaks a lot of piglit on my HSW. https://bugs.freedesktop.org/show_bug.cgi?id=85425 On Fri, Oct 24, 2014 at 12:26 AM, mathias.froehl...@gmx.net wrote: From: Mathias Fröhlich mathias.froehl...@gmx.net Restore clip control to the default state if MESA_META_VIEWPORT or

Re: [Mesa-dev] [PATCH] meta: Only use _mesa_ClipControl if the extension is supported

2014-10-24 Thread Jason Ekstrand
Fixes it for me. Also, Reviewed-by: Jason Ekstrand jason.ekstr...@intel.com Push it! On Fri, Oct 24, 2014 at 6:08 PM, Ian Romanick i...@freedesktop.org wrote: From: Ian Romanick ian.d.roman...@intel.com Fixes many piglit failures on IVB since 85edaa8. Signed-off-by: Ian Romanick

Re: [Mesa-dev] [PATCH V2] mesa: add SSE optimisation for glDrawElements

2014-10-25 Thread Jason Ekstrand
On Fri, Oct 24, 2014 at 10:38 AM, Daniel Stone dan...@fooishbar.org wrote: Hi, On 24 October 2014 18:51, Emil Velikov emil.l.veli...@gmail.com wrote: Sigh... why can't everyone be like Gentoo - set compiler flags and rebuild for your machine/cpu :P Apart from the Makefile.sources change

Re: [Mesa-dev] [PATCH 4/5] i965/fs: Use correct spill offsets

2014-10-27 Thread Jason Ekstrand
On Mon, Oct 27, 2014 at 10:36 AM, Kristian Høgsberg hoegsb...@gmail.com wrote: On Fri, Oct 24, 2014 at 12:25:06PM -0700, Jason Ekstrand wrote: --- src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/mesa

[Mesa-dev] [PATCH] i965/fs: Don't set dependency hints on instructions with spilled destinations

2014-10-27 Thread Jason Ekstrand
--- src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp | 8 1 file changed, 8 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp b/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp index da6da16..e48a4c6 100644 ---

Re: [Mesa-dev] [PATCH] i965/fs: Change the type of booleans to UD and emit correct immediates

2014-10-28 Thread Jason Ekstrand
On Oct 28, 2014 11:57 AM, Matt Turner matts...@gmail.com wrote: On Thu, Oct 16, 2014 at 3:40 PM, Jason Ekstrand ja...@jlekstrand.net wrote: Before, we used the a signed d-word for booleans and the immedates we emitted varried between signed and unsigned. This commit changes the type

Re: [Mesa-dev] [PATCH] i965/fs: Change the type of booleans to UD and emit correct immediates

2014-10-28 Thread Jason Ekstrand
On Tue, Oct 28, 2014 at 12:29 PM, Matt Turner matts...@gmail.com wrote: On Tue, Oct 28, 2014 at 12:10 PM, Jason Ekstrand ja...@jlekstrand.net wrote: On Oct 28, 2014 11:57 AM, Matt Turner matts...@gmail.com wrote: On Thu, Oct 16, 2014 at 3:40 PM, Jason Ekstrand ja...@jlekstrand.net

Re: [Mesa-dev] [PATCH] i965/fs: Change the type of booleans to UD and emit correct immediates

2014-10-28 Thread Jason Ekstrand
On Tue, Oct 28, 2014 at 5:23 PM, Jason Ekstrand ja...@jlekstrand.net wrote: On Tue, Oct 28, 2014 at 12:29 PM, Matt Turner matts...@gmail.com wrote: On Tue, Oct 28, 2014 at 12:10 PM, Jason Ekstrand ja...@jlekstrand.net wrote: On Oct 28, 2014 11:57 AM, Matt Turner matts...@gmail.com

Re: [Mesa-dev] [PULL] i965: rename brw_gs - brw_ff_gs; rename brw_vec4_gs - brw_gs.

2014-10-28 Thread Jason Ekstrand
Ack On Oct 28, 2014 7:24 PM, Kenneth Graunke kenn...@whitecape.org wrote: Hello, I'd like to rename some files in i965: - brw_gs.c - brw_ff_gs.c - brw_gs.h - brw_ff_gs.h - brw_gs_emit.c - brw_ff_gs_emit.c - brw_vec4_gs.c - brw_gs.c - brw_vec4_gs.h - brw_gs.h The current

[Mesa-dev] [PATCH 2/2] util: Move bitset to the util/ folder

2014-10-29 Thread Jason Ekstrand
--- .../drivers/dri/i965/brw_fs_copy_propagation.cpp | 2 +- src/mesa/drivers/dri/i965/brw_fs_live_variables.h | 2 +- .../drivers/dri/i965/brw_performance_monitor.c | 2 +- .../drivers/dri/i965/brw_vec4_live_variables.h | 2 +- src/mesa/drivers/dri/nouveau/nouveau_context.h

[Mesa-dev] [PATCH 1/2] util: Move ffs, _mesa_bitcount, and friends to the util folder

2014-10-29 Thread Jason Ekstrand
--- src/gallium/state_trackers/glx/xlib/glx_api.c | 6 +- src/gallium/state_trackers/glx/xlib/xm_api.c | 10 +- src/mesa/drivers/common/meta.c| 3 +- src/mesa/drivers/dri/i965/brw_blorp_blit.cpp | 4 +- src/mesa/drivers/dri/i965/brw_curbe.c |

Re: [Mesa-dev] [PATCH 1/2] util: Move ffs, _mesa_bitcount, and friends to the util folder

2014-10-29 Thread Jason Ekstrand
and build it on MSVC and let me know if anything needs to be squashed in so we don't break the build. Roland Am 29.10.2014 um 19:27 schrieb Jason Ekstrand: --- src/gallium/state_trackers/glx/xlib/glx_api.c | 6 +- src/gallium/state_trackers/glx/xlib/xm_api.c | 10 +- src/mesa

[Mesa-dev] [PATCH 1/2] util: Add a bitcount.h file and move stuff from both mesa and gallium to it

2014-10-29 Thread Jason Ekstrand
--- configure.ac | 1 + src/gallium/auxiliary/tgsi/tgsi_exec.c | 1 + src/gallium/auxiliary/tgsi/tgsi_scan.c | 2 +- src/gallium/auxiliary/util/u_helpers.c | 1 + src/gallium/auxiliary/util/u_math.h|

Re: [Mesa-dev] [PATCH 1/2] util: Add a bitcount.h file and move stuff from both mesa and gallium to it

2014-10-29 Thread Jason Ekstrand
On Wed, Oct 29, 2014 at 3:51 PM, Matt Turner matts...@gmail.com wrote: On Wed, Oct 29, 2014 at 3:42 PM, Jason Ekstrand ja...@jlekstrand.net wrote: diff --git a/configure.ac b/configure.ac index 03f1bca..e2258eb 100644 --- a/configure.ac +++ b/configure.ac @@ -131,6 +131,7 @@ dnl Check

[Mesa-dev] [prefix=PATCH v3 1/3] util: Add a bitcount.h file and move stuff from both mesa and gallium to it

2014-10-29 Thread Jason Ekstrand
--- configure.ac | 1 + scons/gallium.py | 2 + src/gallium/auxiliary/tgsi/tgsi_exec.c | 1 + src/gallium/auxiliary/tgsi/tgsi_scan.c | 2 +- src/gallium/auxiliary/util/u_helpers.c |

[Mesa-dev] [prefix=PATCH v3 3/3] util: Move bitset to the util/ folder

2014-10-29 Thread Jason Ekstrand
--- .../drivers/dri/i965/brw_fs_copy_propagation.cpp | 2 +- src/mesa/drivers/dri/i965/brw_fs_live_variables.h | 2 +- .../drivers/dri/i965/brw_performance_monitor.c | 2 +- .../drivers/dri/i965/brw_vec4_live_variables.h | 2 +- src/mesa/drivers/dri/nouveau/nouveau_context.h

[Mesa-dev] [prefix=PATCH v3 2/3] util: Move ALIGN from mesa/main/macros.h to util/macros.h

2014-10-29 Thread Jason Ekstrand
--- src/mesa/main/bitset.h | 1 + src/mesa/main/macros.h | 27 --- src/util/macros.h | 27 +++ 3 files changed, 28 insertions(+), 27 deletions(-) diff --git a/src/mesa/main/bitset.h b/src/mesa/main/bitset.h index f50b14f..dbf1af9 100644 ---

Re: [Mesa-dev] [PATCH 3/3] i965/fs: Remove force uncompressed stack.

2014-10-31 Thread Jason Ekstrand
Yes, please! I can't really comment on patch 1, but 2 and 3 are Reviewed-by: Jason Ekstrand jason.ekstr...@intel.com On Fri, Oct 31, 2014 at 12:05 PM, Matt Turner matts...@gmail.com wrote: Last use was in shader_time. --- src/mesa/drivers/dri/i965/brw_fs.cpp | 17

Re: [Mesa-dev] [PATCH] mesa: Don't call _mesa_ClipControl from glPopAttrib when unsupported.

2014-11-03 Thread Jason Ekstrand
Reviewed-by: Jason Ekstrand jason.ekstr...@intel.com On Mon, Nov 3, 2014 at 6:18 PM, Kenneth Graunke kenn...@whitecape.org wrote: Otherwise, calling glPopAttrib on drivers that don't support ARB_clip_control gives you a GL error, which is surprising at best. Signed-off-by: Kenneth Graunke

[Mesa-dev] [PATCH] glsl/list: Add an exec_list_validate function

2014-11-05 Thread Jason Ekstrand
This can be very useful for trying to debug list corruptions. Signed-off-by: Jason Ekstrand jason.ekstr...@intel.com Cc: Ian Romanick i...@freedesktop.org --- src/glsl/list.h | 14 ++ 1 file changed, 14 insertions(+) diff --git a/src/glsl/list.h b/src/glsl/list.h index aac13fd

Re: [Mesa-dev] [PATCH] glsl/list: Add an exec_list_validate function

2014-11-05 Thread Jason Ekstrand
On Wed, Nov 5, 2014 at 2:46 PM, Matt Turner matts...@gmail.com wrote: On Wed, Nov 5, 2014 at 2:00 PM, Jason Ekstrand ja...@jlekstrand.net wrote: This can be very useful for trying to debug list corruptions. Signed-off-by: Jason Ekstrand jason.ekstr...@intel.com Cc: Ian Romanick i

Re: [Mesa-dev] [PATCH 3/4] i965: Add code to verify the CFG is sane.

2014-11-06 Thread Jason Ekstrand
In general, it seems as if this can miss several things. For instance, it checks that all the predicessors are valid but never that we have all the predecessors. Same for successors. If we really want to be able to validate a CFG, maybe a stack-based approach like calculate_cfg would work

Re: [Mesa-dev] [PATCH 1/4] i965/cfg: Add functions to get first and last non-CF instructions.

2014-11-06 Thread Jason Ekstrand
1 and 4 are Reviewed-by: Jason Ekstrand jason.ekstr...@intel.com On Wed, Nov 5, 2014 at 4:13 PM, Matt Turner matts...@gmail.com wrote: --- src/mesa/drivers/dri/i965/brw_cfg.h | 74 + 1 file changed, 74 insertions(+) diff --git a/src/mesa/drivers/dri

Re: [Mesa-dev] [PATCH 2/4] i965/fs: Wire up control flow correctly in predicated break pass.

2014-11-06 Thread Jason Ekstrand
-parents.make_empty(); + } I *think* this is correct. I didn't really understand it before and I don't 100% now. Acked-by: Jason Ekstrand jason.ekstr...@intel.com jump_block-add_successor(cfg-mem_ctx, later_block); if (earlier_block-can_combine_with(jump_block

[Mesa-dev] [PATCH] glsl/list: Add a foreach_list_typed_safe_reverse macro

2014-11-07 Thread Jason Ekstrand
--- src/glsl/list.h | 9 + 1 file changed, 9 insertions(+) diff --git a/src/glsl/list.h b/src/glsl/list.h index 1d18ec9..1fb9178 100644 --- a/src/glsl/list.h +++ b/src/glsl/list.h @@ -673,4 +673,13 @@ inline void exec_node::insert_before(exec_list *before) __node = __next,

Re: [Mesa-dev] [PATCH] glsl/list: Add a foreach_list_typed_safe_reverse macro

2014-11-07 Thread Jason Ekstrand
at the same time, or neither until NIR gets merged... Fair enough. This at least gets it on the list for review. Connor On Fri, Nov 7, 2014 at 9:32 PM, Jason Ekstrand ja...@jlekstrand.net wrote: --- src/glsl/list.h | 9 + 1 file changed, 9 insertions(+) diff --git a/src

Re: [Mesa-dev] [PATCH 2/2] i965/cfg: Remove if_block/else_block.

2014-11-11 Thread Jason Ekstrand
Both patches are Reviewed-by: Jason Ekstrand jason.ekstr...@intel.com On Nov 10, 2014 11:37 PM, Matt Turner matts...@gmail.com wrote: I used these in the SEL peephole, but they require extra tracking and fix ups. The SEL peephole can pretty easily find the blocks it needs without

Re: [Mesa-dev] [PATCH 2/2] i965/cfg: Remove if_block/else_block.

2014-11-11 Thread Jason Ekstrand
Two questions: Does it fix the bug? And did you ever figure out what was going on there? On Nov 11, 2014 6:58 AM, Jason Ekstrand ja...@jlekstrand.net wrote: Both patches are Reviewed-by: Jason Ekstrand jason.ekstr...@intel.com On Nov 10, 2014 11:37 PM, Matt Turner matts...@gmail.com wrote: I

Re: [Mesa-dev] [PATCH 2/2] i965/cfg: Remove if_block/else_block.

2014-11-11 Thread Jason Ekstrand
One more comment: These and the other two CFG fixes should probably be promoted to stable. On Tue, Nov 11, 2014 at 7:37 AM, Jason Ekstrand ja...@jlekstrand.net wrote: Two questions: Does it fix the bug? And did you ever figure out what was going on there? On Nov 11, 2014 6:58 AM, Jason

Re: [Mesa-dev] [PATCH 1/2] i965: Combine offset/texture_offset fields.

2014-11-12 Thread Jason Ekstrand
These too are Reviewed-by: Jason Ekstrand jason.ekstr...@intel.com On Wed, Nov 12, 2014 at 11:28 AM, Matt Turner matts...@gmail.com wrote: texture_offset was only used by some texturing operations, and offset was only used by spill/unspill and some URB operations. These fields are never used

Re: [Mesa-dev] [PATCH] mesa/main: Fix tmp_row memory leak in texstore_rgba_integer.

2014-11-15 Thread Jason Ekstrand
Good catch! Reviewed-by: Jason Ekstrand jason.ekstr...@intel.com Can you push or do you need me to? On Sat, Nov 15, 2014 at 11:02 AM, Siavash Eliasi siavashser...@gmail.com wrote: --- src/mesa/main/texstore.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mesa

Re: [Mesa-dev] [PATCH 00/20] Auto-generate pack/unpack functions

2014-11-18 Thread Jason Ekstrand
that base and they should be correct fixes to the currently existing code. Iago Toral Quiroga (1): swrast: Remove unused variable. Jason Ekstrand (9): mesa/format_utils: Fix a bug in one of the format helper functions mesa: Fix packing/unpacking of MESA_FORMAT_R5G6B5_UNORM mesa

Re: [Mesa-dev] [PATCH 06/20] mesa: Fix _mesa_swizzle_and_convert integer conversions to clamp properly

2014-11-18 Thread Jason Ekstrand
In general, I like this patch. However, if we are going to claim to follow the GL rule of Colors are clampped to their representable range, then there still seem to be quite a few cases missing. For instance, when going from signed to unsigned 8-bit formats, we should should take a min with 0

Re: [Mesa-dev] [PATCH 09/20] mesa: Add a concept of an array format

2014-11-18 Thread Jason Ekstrand
On Tue, Nov 18, 2014 at 12:43 AM, Iago Toral Quiroga ito...@igalia.com wrote: From: Jason Ekstrand jason.ekstr...@intel.com An array format is a 32-bit integer format identifier that can represent any format that can be represented as an array of standard GL datatypes. While the MESA_FORMAT

Re: [Mesa-dev] [PATCH 11/20] mesa: Autogenerate most of format_pack.c

2014-11-18 Thread Jason Ekstrand
On Tue, Nov 18, 2014 at 12:43 AM, Iago Toral Quiroga ito...@igalia.com wrote: From: Jason Ekstrand jason.ekstr...@intel.com We were auto-generating it before. The problem was that the autogeneration tool we were using was called copy, paste, and edit. Let's use a more sensible solution

Re: [Mesa-dev] [PATCH 13/20] mesa: Add _mesa_pack_uint_rgba_row() format conversion function

2014-11-18 Thread Jason Ekstrand
On Tue, Nov 18, 2014 at 12:44 AM, Iago Toral Quiroga ito...@igalia.com wrote: From: Samuel Iglesias Gonsalvez sigles...@igalia.com We will use this later on to handle uint conversion scenarios in a master convert function. Signed-off-by: Samuel Iglesias Gonsalvez sigles...@igalia.com ---

Re: [Mesa-dev] [PATCH 14/20] mesa: Add non-normalized formats support for ubyte packing functions

2014-11-18 Thread Jason Ekstrand
On Tue, Nov 18, 2014 at 12:44 AM, Iago Toral Quiroga ito...@igalia.com wrote: From: Samuel Iglesias Gonsalvez sigles...@igalia.com Signed-off-by: Samuel Iglesias Gonsalvez sigles...@igalia.com --- src/mesa/main/format_pack.c.mako | 10 +- 1 file changed, 9 insertions(+), 1

Re: [Mesa-dev] [PATCH 16/20] mesa/formats: add new mesa formats and their pack/unpack functions.

2014-11-18 Thread Jason Ekstrand
On Tue, Nov 18, 2014 at 12:44 AM, Iago Toral Quiroga ito...@igalia.com wrote: From: Samuel Iglesias Gonsalvez sigles...@igalia.com This will be used to refactor code in pack.c and support conversion to/from these types in a master convert function that will be added later. Signed-off-by:

Re: [Mesa-dev] [PATCH 00/20] Auto-generate pack/unpack functions

2014-11-18 Thread Jason Ekstrand
this. This is based on initial work by Jason Ekstrand. Tested on i965, classic swrast and gallium (radeon, nouveau, llvmpipe) without regressions. For software drivers we worked with a trimmed set of piglit tests (related to format conversion), ~5700 tests selected with the following filter: -t

Re: [Mesa-dev] [PATCH 00/20] Auto-generate pack/unpack functions

2014-11-18 Thread Jason Ekstrand
On Tue, Nov 18, 2014 at 1:42 PM, Jose Fonseca jfons...@vmware.com wrote: On 18/11/14 17:10, Jason Ekstrand wrote: Jose, I haven't had time to fully review Iago and Samuel's code, so I can't 100% comment on it right now. However, let me make a few comments on the overarching plan as it were

Re: [Mesa-dev] [PATCH] mesa/main: Fix tmp_row memory leak in texstore_rgba_integer.

2014-11-18 Thread Jason Ekstrand
Pushed. Thanks! --Jason On Sat, Nov 15, 2014 at 7:07 PM, Siavash Eliasi siavashser...@gmail.com wrote: Please push it, I don't have write access. Best regards, Siavash Eliasi. On 11/15/2014 11:06 PM, Jason Ekstrand wrote: Good catch! Reviewed-by: Jason Ekstrand jason.ekstr

Re: [Mesa-dev] [PATCH 06/16] glsl: Add sin, cos and sign to get_range

2014-11-19 Thread Jason Ekstrand
On Wed, Nov 19, 2014 at 10:43 AM, Ian Romanick i...@freedesktop.org wrote: On 11/16/2014 05:51 PM, Thomas Helland wrote: They are bound between -1 and 1, so report that. --- src/glsl/opt_minmax.cpp | 13 + 1 file changed, 13 insertions(+) diff --git

Re: [Mesa-dev] [PATCH 01/29] mesa: Add an implementation of a master convert function.

2014-11-19 Thread Jason Ekstrand
...@igalia.com wrote: From: Jason Ekstrand jason.ekstr...@intel.com v2 by Iago Toral ito...@igalia.com: - When testing if we can directly pack we should use the src format to check if we are packing from an RGBA format. The original code used the dst format for the ubyte case by mistake. - Fixed

Re: [Mesa-dev] [PATCH 02/29] mesa: Set normalized=true for float array formats.

2014-11-19 Thread Jason Ekstrand
I'm not sure what I think about this. Does it make a functional change other than consistancy? --Jason On Tue, Nov 18, 2014 at 1:23 AM, Iago Toral Quiroga ito...@igalia.com wrote: In order to check if a format is normalized Mesa does something like this: normalized =

Re: [Mesa-dev] [PATCH 05/29] mesa: Consider internal base format in _mesa_format_convert

2014-11-19 Thread Jason Ekstrand
A couple of specific comments are below. More generally, why are you only considering the base format on two cases? Do we never use it for anything else? On Tue, Nov 18, 2014 at 1:23 AM, Iago Toral Quiroga ito...@igalia.com wrote: Add a dst_internal_format parameter to _mesa_format_convert,

Re: [Mesa-dev] [PATCH 06/29] mesa: Avoid pack/unpack fast paths if base internal format != base format

2014-11-19 Thread Jason Ekstrand
A couple of general comments on this patch: 1) The prerequisites should be moved to before the first patch in the series and it should be squashed into the patch that introduces the function. There are one or two more patches which also modify it and those should also be squashed in. 2) I

Re: [Mesa-dev] [PATCH 09/29] mesa: Add _mesa_swap2_copy and _mesa_swap4_copy

2014-11-19 Thread Jason Ekstrand
Any reason why you added 2 new functions, instead of just altering the ones we have and updating where they are used? On Tue, Nov 18, 2014 at 1:23 AM, Iago Toral Quiroga ito...@igalia.com wrote: We have _mesa_swap{2,4} but these do in-place byte-swapping only. The new functions receive an

Re: [Mesa-dev] [PATCH 03/29] mesa: Do not assert on integer-non-integer direct pack/unpack fast paths

2014-11-19 Thread Jason Ekstrand
Can you remind me again as to what formats hit these paths? I remember you hitting them, but I'm still not really seeing how it happens. --Jason On Tue, Nov 18, 2014 at 1:23 AM, Iago Toral Quiroga ito...@igalia.com wrote: We can have conversions from non-integer types to integer types, so

Re: [Mesa-dev] [PATCH 07/29] mesa: Add helper to convert a GL format and type to a mesa (array) format.

2014-11-19 Thread Jason Ekstrand
General comment: Maybe this would be better in gltypes rather than in mesa_formats On Tue, Nov 18, 2014 at 1:23 AM, Iago Toral Quiroga ito...@igalia.com wrote: --- src/mesa/main/formats.c | 285 src/mesa/main/formats.h | 3 + 2 files

Re: [Mesa-dev] [PATCH 02/29] mesa: Set normalized=true for float array formats.

2014-11-20 Thread Jason Ekstrand
this shouldn't be strictly needed. It may still be a good idea for consistency, but I want to make sure we're doing the right thing in mesa_format_convert --Jason Iago On Wed, 2014-11-19 at 11:31 -0800, Jason Ekstrand wrote: I'm not sure what I think about this. Does it make a functional change

Re: [Mesa-dev] [PATCH 06/29] mesa: Avoid pack/unpack fast paths if base internal format != base format

2014-11-20 Thread Jason Ekstrand
On Wed, Nov 19, 2014 at 11:58 PM, Iago Toral ito...@igalia.com wrote: On Wed, 2014-11-19 at 11:57 -0800, Jason Ekstrand wrote: A couple of general comments on this patch: 1) The prerequisites should be moved to before the first patch in the series and it should be squashed

Re: [Mesa-dev] [PATCH 09/29] mesa: Add _mesa_swap2_copy and _mesa_swap4_copy

2014-11-20 Thread Jason Ekstrand
On Thu, Nov 20, 2014 at 12:48 AM, Iago Toral ito...@igalia.com wrote: On Wed, 2014-11-19 at 14:15 -0600, Patrick Baggett wrote: On Tue, Nov 18, 2014 at 3:23 AM, Iago Toral Quiroga ito...@igalia.com wrote: We have _mesa_swap{2,4} but these do in-place byte-swapping

Re: [Mesa-dev] [PATCH 05/29] mesa: Consider internal base format in _mesa_format_convert

2014-11-20 Thread Jason Ekstrand
On Wed, Nov 19, 2014 at 11:42 PM, Iago Toral ito...@igalia.com wrote: On Wed, 2014-11-19 at 11:43 -0800, Jason Ekstrand wrote: A couple of specific comments are below. More generally, why are you only considering the base format on two cases? Do we never use it for anything else? I

Re: [Mesa-dev] [PATCH 01/29] mesa: Add an implementation of a master convert function.

2014-11-20 Thread Jason Ekstrand
On Thu, Nov 20, 2014 at 1:48 AM, Iago Toral ito...@igalia.com wrote: On Wed, 2014-11-19 at 11:28 -0800, Jason Ekstrand wrote: By and large, this looks good to me. Most of my comments are cosmetic or suggestions for added documentation. There is one issue that I think is subtly wrong

Re: [Mesa-dev] [PATCH 03/29] mesa: Do not assert on integer-non-integer direct pack/unpack fast paths

2014-11-20 Thread Jason Ekstrand
to indicate that that combination should result in GL_INVALID_OPERATION. Iago On Wed, 2014-11-19 at 12:04 -0800, Jason Ekstrand wrote: Can you remind me again as to what formats hit these paths? I remember you hitting them, but I'm still not really seeing how it happens. --Jason

Re: [Mesa-dev] [PATCH 03/29] mesa: Do not assert on integer-non-integer direct pack/unpack fast paths

2014-11-20 Thread Jason Ekstrand
On Thu, Nov 20, 2014 at 9:33 PM, Jason Ekstrand ja...@jlekstrand.net wrote: On Thu, Nov 20, 2014 at 12:29 AM, Iago Toral ito...@igalia.com wrote: It is explained here: https://bugs.freedesktop.org/show_bug.cgi?id=84566#c35 So one example of this was a glReadPixels where we want to store

Re: [Mesa-dev] [PATCH 02/29] mesa: Set normalized=true for float array formats.

2014-11-21 Thread Jason Ekstrand
On Thu, Nov 20, 2014 at 11:33 PM, Iago Toral ito...@igalia.com wrote: On Thu, 2014-11-20 at 10:40 -0800, Jason Ekstrand wrote: On Wed, Nov 19, 2014 at 11:24 PM, Iago Toral ito...@igalia.com wrote: Hi Jason, we discussed this some weeks ago actually, the detailed

Re: [Mesa-dev] [PATCH] i965/fs: Clarify and optimize register coalescing interference check.

2014-11-22 Thread Jason Ekstrand
On Nov 21, 2014 1:06 PM, Matt Turner matts...@gmail.com wrote: With bblock_t::end_ip, we can skip entire blocks rather than checking every instruction in them. Also by making the loops nested (explicitly, it already was a nested loop), the continue seen at the end of the first hunk (when

[Mesa-dev] [PATCH] util/hash_table: Rework the API to know about hashing

2014-11-24 Thread Jason Ekstrand
the option for you to do your own hashing if it's more efficient, but it's no longer needed. Also, if you do do your own hashing, the hash table will assert that your hash matches what it expects out of the hashing function. This should make it harder to mess up your hashing. Signed-off-by: Jason

Re: [Mesa-dev] [PATCH] util/hash_table: Rework the API to know about hashing

2014-11-24 Thread Jason Ekstrand
If people like this change, I'll do the same thing to the hash set implementation. --Jason On Mon, Nov 24, 2014 at 10:19 PM, Jason Ekstrand ja...@jlekstrand.net wrote: Previously, the hash_table API required the user to do all of the hashing of keys as it passed them in. Since the hashing

Re: [Mesa-dev] [PATCH] util/hash_table: Rework the API to know about hashing

2014-11-25 Thread Jason Ekstrand
On Tue, Nov 25, 2014 at 3:40 PM, Eric Anholt e...@anholt.net wrote: Jason Ekstrand ja...@jlekstrand.net writes: Previously, the hash_table API required the user to do all of the hashing of keys as it passed them in. Since the hashing function is intrinsicly tied to the comparison

Re: [Mesa-dev] [PATCH 4/5] ra: Don't use regs as the ralloc context.

2014-11-26 Thread Jason Ekstrand
On Wed, Nov 26, 2014 at 10:39 AM, Matt Turner matts...@gmail.com wrote: The i965 backends pass something out of 'screen', which is allocated per-process, making using this as a ralloc context not thread-safe. All callers ra_alloc_interference_graph() already ralloc_free() its return value.

Re: [Mesa-dev] [PATCH 2/5] i965: Initialize compaction tables once per process.

2014-11-26 Thread Jason Ekstrand
On Wed, Nov 26, 2014 at 10:39 AM, Matt Turner matts...@gmail.com wrote: --- src/mesa/drivers/dri/i965/brw_eu_compact.c | 5 + 1 file changed, 5 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_eu_compact.c b/src/mesa/drivers/dri/i965/brw_eu_compact.c index 7117890..8e33bcb

Re: [Mesa-dev] [PATCH 4/5] ra: Don't use regs as the ralloc context.

2014-11-26 Thread Jason Ekstrand
On Wed, Nov 26, 2014 at 10:59 AM, Matt Turner matts...@gmail.com wrote: On Wed, Nov 26, 2014 at 10:56 AM, Jason Ekstrand ja...@jlekstrand.net wrote: On Wed, Nov 26, 2014 at 10:39 AM, Matt Turner matts...@gmail.com wrote: The i965 backends pass something out of 'screen', which

Re: [Mesa-dev] [PATCH 2/5] i965: Initialize compaction tables once per process.

2014-11-26 Thread Jason Ekstrand
On Wed, Nov 26, 2014 at 11:10 AM, Matt Turner matts...@gmail.com wrote: On Wed, Nov 26, 2014 at 10:59 AM, Jason Ekstrand ja...@jlekstrand.net wrote: On Wed, Nov 26, 2014 at 10:39 AM, Matt Turner matts...@gmail.com wrote: --- src/mesa/drivers/dri/i965/brw_eu_compact.c | 5 + 1

Re: [Mesa-dev] [PATCH v2 08/23] mesa: Fix _mesa_swizzle_and_convert integer conversions to clamp properly

2014-12-01 Thread Jason Ekstrand
that this is well-defined to work for dst_size == 32 because a signed shift by 31 isn't well-defined according to the C spec. With those two fixed, this one is Reviewed-by: Jason Ekstrand jason.ekstr...@intel.com --Jason On Mon, Dec 1, 2014 at 3:04 AM, Iago Toral Quiroga ito...@igalia.com wrote: From: Samuel

Re: [Mesa-dev] [PATCH v2 06/23] mesa: Fix incorrect assertion in init_teximage_fields_ms

2014-12-01 Thread Jason Ekstrand
-format piglit test on nouveau, since that test calls _mesa_base_tex_format with GL_R16F with a context that does not have ARB_texture_float, so it returns -1 for the BaseFormat, which was not being catched properly by the ASSERT in init_teximage_fields_ms until now. Reviewed-by: Jason Ekstrand

Re: [Mesa-dev] [PATCH v2 11/23] mesa: Let _mesa_get_format_base_format also handle mesa_array_format.

2014-12-01 Thread Jason Ekstrand
On Mon, Dec 1, 2014 at 3:04 AM, Iago Toral Quiroga ito...@igalia.com wrote: If we need the base format for a mesa_array_format we have to find the matching mesa_format first. This is expensive because it requires to loop through all existing mesa formats until we find the right match. We can

Re: [Mesa-dev] [PATCH v2 16/23] mesa: Add _mesa_pack_uint_rgba_row() format conversion function

2014-12-01 Thread Jason Ekstrand
On Mon, Dec 1, 2014 at 3:04 AM, Iago Toral Quiroga ito...@igalia.com wrote: From: Samuel Iglesias Gonsalvez sigles...@igalia.com We will use this later on to handle uint conversion scenarios in a master convert function. v2: - Modify pack_uint_*() function generation to use c.datatype()

Re: [Mesa-dev] [PATCH v2 17/23] mesa: Add non-normalized formats support for ubyte packing functions

2014-12-01 Thread Jason Ekstrand
On Mon, Dec 1, 2014 at 3:04 AM, Iago Toral Quiroga ito...@igalia.com wrote: From: Samuel Iglesias Gonsalvez sigles...@igalia.com Signed-off-by: Samuel Iglesias Gonsalvez sigles...@igalia.com --- src/mesa/main/format_pack.c.mako | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)

Re: [Mesa-dev] [PATCH v2 00/23] auto-generate pack/unpack functions

2014-12-01 Thread Jason Ekstrand
variable. mesa: Let _mesa_get_format_base_format also handle mesa_array_format. Jason Ekstrand (9): mesa/format_utils: Fix a bug in unorm_to_float helper function mesa: Fix packing/unpacking of MESA_FORMAT_R5G6B5_UNORM mesa/colormac: Remove an unused macro mesa: Fix A1R5G5B5

Re: [Mesa-dev] [PATCH v2 13/23] mesa: Autogenerate most of format_pack.c

2014-12-02 Thread Jason Ekstrand
On Mon, Dec 1, 2014 at 11:03 PM, Samuel Iglesias Gonsálvez sigles...@igalia.com wrote: On 01/12/14 20:00, Jason Ekstrand wrote: On Mon, Dec 1, 2014 at 3:04 AM, Iago Toral Quiroga ito...@igalia.com wrote: From: Jason Ekstrand jason.ekstr...@intel.com We were auto-generating

<    1   2   3   4   5   6   7   8   9   10   >