Re: [Mesa-dev] [PATCH] i965: Disable guardband clipping on SNB unless workaround is present.

2012-10-07 Thread Kenneth Graunke
On 10/07/2012 06:34 PM, Kenneth Graunke wrote: On 10/07/2012 06:06 PM, Paul Berry wrote: On 7 October 2012 15:38, Kenneth Graunke mailto:kenn...@whitecape.org>> wrote: On 10/07/2012 02:40 PM, Daniel Vetter wrote: On Fri, Oct 05, 2012 at 05:08:04PM -0700, Kenneth Graunke wrote:

Re: [Mesa-dev] [PATCH 2/6] meta: Rearrange shader creation in setup_glsl_generate_mipmap

2012-10-07 Thread Kenneth Graunke
On 10/07/2012 08:33 PM, Ian Romanick wrote: On 10/05/2012 05:36 PM, Kenneth Graunke wrote: On 10/05/2012 03:56 PM, Ian Romanick wrote: From: Ian Romanick The diff looks weird, but this moves the code from the first 'if (ctx->Const.GLSLVersion < 130)' block down into the second block. It also

Re: [Mesa-dev] [PATCH 2/6] meta: Rearrange shader creation in setup_glsl_generate_mipmap

2012-10-07 Thread Ian Romanick
On 10/05/2012 05:36 PM, Kenneth Graunke wrote: On 10/05/2012 03:56 PM, Ian Romanick wrote: From: Ian Romanick The diff looks weird, but this moves the code from the first 'if (ctx->Const.GLSLVersion < 130)' block down into the second block. It also moves some variable decalarations closer to

Re: [Mesa-dev] [PATCH 10/10] i965/fs: Improve performance of copy/constant propagation.

2012-10-07 Thread Kenneth Graunke
On 09/22/2012 02:04 PM, Eric Anholt wrote: Use a simple chaining hash table for the ACP. This is not really very good, because we still do a full walk of the tree per destination write, but it still reduces fp-long-alu runtime from 5.3 to 3.9s. --- src/mesa/drivers/dri/i965/brw_fs.h

Re: [Mesa-dev] [PATCH 09/10] i965/fs: Move constant propagation to the same codebase as copy prop.

2012-10-07 Thread Kenneth Graunke
On 09/22/2012 02:04 PM, Eric Anholt wrote: This means that we don't get constant prop across into the first block after a BRW_OPCODE_IF or a BRW_OPCODE_DO, but we have hope for properly doing it across control flow at some point. More importantly, it avoids the O(n^2) with instruction count runt

Re: [Mesa-dev] [PATCH] i965: Disable guardband clipping on SNB unless workaround is present.

2012-10-07 Thread Kenneth Graunke
On 10/07/2012 06:06 PM, Paul Berry wrote: On 7 October 2012 15:38, Kenneth Graunke mailto:kenn...@whitecape.org>> wrote: On 10/07/2012 02:40 PM, Daniel Vetter wrote: On Fri, Oct 05, 2012 at 05:08:04PM -0700, Kenneth Graunke wrote: According to internal bug reports, guar

Re: [Mesa-dev] [PATCH] i965: Disable guardband clipping on SNB unless workaround is present.

2012-10-07 Thread Paul Berry
On 7 October 2012 15:38, Kenneth Graunke wrote: > On 10/07/2012 02:40 PM, Daniel Vetter wrote: > >> On Fri, Oct 05, 2012 at 05:08:04PM -0700, Kenneth Graunke wrote: >> >>> According to internal bug reports, guardband clipping sometimes >>> incorrectly discards triangles unless bit 5 of 3D_CHICKEN

Re: [Mesa-dev] [PATCH 1/6] i965/fs: Make the register allocation class_sizes[] choice static.

2012-10-07 Thread Kenneth Graunke
On 10/02/2012 07:52 PM, Eric Anholt wrote: Based on split_virtual_grfs(), we choose the same set every time, so set it in stone. This will help us avoid regenerating the somewhat expensive class/register set setup every compile. --- src/mesa/drivers/dri/i965/brw_fs.h|1 +

Re: [Mesa-dev] [PATCH] i965/vs: Try again when we've successfully spilled a reg.

2012-10-07 Thread Kenneth Graunke
On 10/03/2012 10:30 AM, Eric Anholt wrote: Without this, we'd spill one reg, then continue on without actually register allocating, then assertion fail when we tried to use a vgrf number as a register number. --- src/mesa/drivers/dri/i965/brw_vec4.h|4 ++-- src/mesa/drivers

Re: [Mesa-dev] [PATCH 11/11] i965/vs: Improve live interval calculation.

2012-10-07 Thread Kenneth Graunke
On 10/04/2012 04:07 PM, Eric Anholt wrote: This is derived from the FS visitor code for the same, but tracks each channel separately (otherwise, some typical fill-a-channel-at-a-time patterns would produce excessive live intervals across loops and produce spilling). --- src/mesa/drivers/dri/i96

Re: [Mesa-dev] [PATCH 08/11] i965/vec4: Track the number of channels used in a virtual grf.

2012-10-07 Thread Kenneth Graunke
On 10/04/2012 04:07 PM, Eric Anholt wrote: For tracking live variables, we want to know when a register is completely rewritten, so we need to be able to compare a writemask to the size of the register. There's also potential use for this in register coalescing. Two comments: 1. Please move t

[Mesa-dev] [PATCH 2/2] r600g: put user indices into the command stream for small index counts

2012-10-07 Thread Marek Olšák
This improves performance a little bit if there are lots of small indexed draw commands. --- src/gallium/drivers/r600/r600_state_common.c | 41 +- src/gallium/drivers/r600/r600d.h |1 + 2 files changed, 28 insertions(+), 14 deletions(-) diff --git a/src/g

[Mesa-dev] [PATCH 1/2] r600g: inline r600_translate_index_buffer

2012-10-07 Thread Marek Olšák
--- src/gallium/drivers/r600/Makefile.sources|1 - src/gallium/drivers/r600/r600_pipe.h |5 --- src/gallium/drivers/r600/r600_state_common.c | 28 +++--- src/gallium/drivers/r600/r600_translate.c| 53 -- 4 files changed, 22 insertions(+),

Re: [Mesa-dev] [PATCH 01/11] i965/vs: Add support for splitting virtual GRFs.

2012-10-07 Thread Kenneth Graunke
On 10/04/2012 04:07 PM, Eric Anholt wrote: This should improve our ability to register allocate without spilling. Unfortuantely, due to the live variable analysis being ignorant of loops, we still have register allocation failures on some programs. --- src/mesa/drivers/dri/i965/brw_vec4.cpp

Re: [Mesa-dev] [PATCH 10/11] i965/vs: Simplify the scratch write handling and emit less code.

2012-10-07 Thread Kenneth Graunke
On 10/04/2012 04:07 PM, Eric Anholt wrote: We're always doing it for an immediately preceding instruction, and we can make that instruction write directly into the MRF instead of using a temporary. Along with reducing instructions, it avoids confusing the upcoming live variables code (which saw

Re: [Mesa-dev] [PATCH 02/11] i965/vs: Add a little bit of IR-level debug ability.

2012-10-07 Thread Kenneth Graunke
On 10/04/2012 04:07 PM, Eric Anholt wrote: This is super basic, but it let me visualize a problem I had with opt_compute_to_mrf(). --- src/mesa/drivers/dri/i965/brw_context.h |8 +++ src/mesa/drivers/dri/i965/brw_disasm.c |7 +-- src/mesa/drivers/dri/i965/brw_vec4.cpp | 83 +++

Re: [Mesa-dev] [PATCH] i965: Disable guardband clipping on SNB unless workaround is present.

2012-10-07 Thread Kenneth Graunke
On 10/07/2012 02:40 PM, Daniel Vetter wrote: On Fri, Oct 05, 2012 at 05:08:04PM -0700, Kenneth Graunke wrote: According to internal bug reports, guardband clipping sometimes incorrectly discards triangles unless bit 5 of 3D_CHICKEN3 ("SF Disable fastclip optimization when culled") is set. Exper

Re: [Mesa-dev] wider registers in llvmpipe

2012-10-07 Thread Stéphane Marchesin
On Wed, Jul 18, 2012 at 8:35 AM, Jose Fonseca wrote: > > > - Original Message - >> Am 18.07.2012 07:11, schrieb Marek Olšák: >> > On Wed, Jul 18, 2012 at 1:58 AM, Roland Scheidegger >> > wrote: >> >> Am 17.07.2012 23:49, schrieb Stéphane Marchesin: >> >>> On Mon, Jul 16, 2012 at 11:43 AM,

Re: [Mesa-dev] [PATCH] i965: Disable guardband clipping on SNB unless workaround is present.

2012-10-07 Thread Daniel Vetter
On Fri, Oct 05, 2012 at 05:08:04PM -0700, Kenneth Graunke wrote: > According to internal bug reports, guardband clipping sometimes > incorrectly discards triangles unless bit 5 of 3D_CHICKEN3 ("SF Disable > fastclip optimization when culled") is set. > > Experimentally, this appears to be true. W

[Mesa-dev] [PATCH 2/2] r600g: make tgsi-to-llvm generates store.pixel* intrinsic for fs

2012-10-07 Thread Vincent Lejeune
--- src/gallium/drivers/r600/eg_asm.c| 17 src/gallium/drivers/r600/r600_asm.c | 17 src/gallium/drivers/r600/r600_asm.h | 2 + src/gallium/drivers/r600/r600_llvm.c | 66 src/gallium/drivers/r600/r600_shader.c | 53 +++

[Mesa-dev] [PATCH 1/2] radeon/llvm: use specialised R600.store.pixel.* for fragment shader

2012-10-07 Thread Vincent Lejeune
--- src/gallium/drivers/radeon/AMDGPUISelLowering.cpp | 1 + src/gallium/drivers/radeon/AMDGPUISelLowering.h| 1 + .../radeon/MCTargetDesc/R600MCCodeEmitter.cpp | 11 +- src/gallium/drivers/radeon/R600ISelLowering.cpp| 68 src/gallium/drivers/radeon/R600Instruction

[Mesa-dev] [PATCH 14/14] r600g: move SQ_GPR_RESOURCE_MGMT_1 into new config_state

2012-10-07 Thread Marek Olšák
--- src/gallium/drivers/r600/r600_hw_context.c | 10 +- src/gallium/drivers/r600/r600_pipe.h |8 +++- src/gallium/drivers/r600/r600_state.c | 18 ++ 3 files changed, 22 insertions(+), 14 deletions(-) diff --git a/src/gallium/drivers/r600/r600_hw_cont

[Mesa-dev] [PATCH 13/14] r600g: move DB_SHADER_CONTROL into db_misc_state

2012-10-07 Thread Marek Olšák
Also update the register value in more appropriate places than r600_update_derived_state. --- src/gallium/drivers/r600/evergreen_hw_context.c |2 -- src/gallium/drivers/r600/evergreen_state.c | 24 ++- src/gallium/drivers/r600/r600_hw_context.c |2 -- src/ga

[Mesa-dev] [PATCH 12/14] r600g: emit PS_PARTIAL_FLUSH at the beginning of CS

2012-10-07 Thread Marek Olšák
--- src/gallium/drivers/r600/evergreen_state.c |8 src/gallium/drivers/r600/r600_state.c |4 2 files changed, 12 insertions(+) diff --git a/src/gallium/drivers/r600/evergreen_state.c b/src/gallium/drivers/r600/evergreen_state.c index bc3aedb..2e58a28 100644 --- a/src/g

[Mesa-dev] [PATCH 11/14] r600g: atomize depth-stencil-alpha state

2012-10-07 Thread Marek Olšák
--- src/gallium/drivers/r600/evergreen_hw_context.c |2 -- src/gallium/drivers/r600/evergreen_state.c | 14 ++-- src/gallium/drivers/r600/r600_blit.c|2 +- src/gallium/drivers/r600/r600_hw_context.c |3 ++- src/gallium/drivers/r600/r600_pipe.c

[Mesa-dev] [PATCH 10/14] r600g: atomize rasterizer state

2012-10-07 Thread Marek Olšák
--- src/gallium/drivers/r600/evergreen_hw_context.c | 18 src/gallium/drivers/r600/evergreen_state.c | 114 ++--- src/gallium/drivers/r600/r600_blit.c|2 +- src/gallium/drivers/r600/r600_hw_context.c | 12 +-- src/gallium/drivers/r600/r600_pipe.h

[Mesa-dev] [PATCH 09/14] r600g: sort variables in r600_context

2012-10-07 Thread Marek Olšák
Some variables have been removed from there too. --- src/gallium/drivers/r600/evergreen_state.c |5 +- src/gallium/drivers/r600/r600_pipe.h | 144 -- src/gallium/drivers/r600/r600_state.c|5 +- src/gallium/drivers/r600/r600_state_common.c | 18 +

[Mesa-dev] [PATCH 08/14] r600g: initialize SQ_VTX_SEMANTIC_* in the start_cs command buffer

2012-10-07 Thread Marek Olšák
--- src/gallium/drivers/r600/r600_hw_context.c | 32 -- src/gallium/drivers/r600/r600_state.c | 40 +--- 2 files changed, 36 insertions(+), 36 deletions(-) diff --git a/src/gallium/drivers/r600/r600_hw_context.c b/src/gallium/drivers/r600/r600

[Mesa-dev] [PATCH 07/14] r600g: atomize scissor state

2012-10-07 Thread Marek Olšák
The workaround for R600 lacking VPORT_SCISSOR_ENABLE has also been simplified. --- src/gallium/drivers/r600/evergreen_hw_context.c |4 -- src/gallium/drivers/r600/evergreen_state.c | 24 ++-- src/gallium/drivers/r600/r600_blit.c|2 +- src/gallium/drivers/r600/r60

[Mesa-dev] [PATCH 06/14] r600g: atomize polygon offset state

2012-10-07 Thread Marek Olšák
POLY_OFFSET_DB_FMT_CNTL is moved to the framebuffer state, because it only depends on the zbuffer format. --- src/gallium/drivers/r600/evergreen_hw_context.c | 10 --- src/gallium/drivers/r600/evergreen_state.c | 105 --- src/gallium/drivers/r600/r600_hw_context.c

[Mesa-dev] [PATCH 05/14] r600g: atomize fetch shader

2012-10-07 Thread Marek Olšák
The state object is actually a buffer, it's literally a buffer containing the shader code. --- src/gallium/drivers/r600/evergreen_hw_context.c |2 - src/gallium/drivers/r600/evergreen_state.c | 25 - src/gallium/drivers/r600/r600_asm.c | 63 +++

[Mesa-dev] [PATCH 04/14] r600g: remove the dual_src_blend flag from the shader key

2012-10-07 Thread Marek Olšák
--- src/gallium/drivers/r600/r600_pipe.h |1 - src/gallium/drivers/r600/r600_shader.c |2 +- src/gallium/drivers/r600/r600_state_common.c |4 +++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/r600/r600_pipe.h b/src/gallium/drivers/r6

[Mesa-dev] [PATCH 03/14] r600g: atomize blend state

2012-10-07 Thread Marek Olšák
This is not so trivial, because we disable blending if the dual src blending is turned on and the number of color outputs is less than 2. I decided to create 2 command buffers in the blend state object and just switch between them when needed, because there are other states unrelated to blending (l

[Mesa-dev] [PATCH 02/14] r600g: inline r600_atom_dirty

2012-10-07 Thread Marek Olšák
--- src/gallium/drivers/r600/evergreen_compute.c |2 +- src/gallium/drivers/r600/evergreen_state.c | 12 src/gallium/drivers/r600/r600_blit.c |6 ++-- src/gallium/drivers/r600/r600_hw_context.c | 26 +- src/gallium/drivers/r600/r600_pipe.h |

[Mesa-dev] [PATCH 01/14] r600g: remove the "atom" variable from r600_command_buffer

2012-10-07 Thread Marek Olšák
r600_command_buffer is not an atom. The "atoms" have evolved into state slots (or groups of state slots) where you can bind states. There is a fixed amount of atoms (state slots) in the context. The command buffers are nothing like that. They represent states, not state slots. We could probably

Re: [Mesa-dev] [PATCH] mesa: Don't glPopAttrib() GL_POINT_SPRITE_COORD_ORIGIN on < OpenGL-2.0

2012-10-07 Thread Kenneth Graunke
On 10/06/2012 06:44 PM, Mario Kleiner wrote: The GL_POINT_BIT state attribute GL_POINT_SPRITE_COORD_ORIGIN is only supported on OpenGL-2.0 or later. Prevent glPopAttrib() from trying to restore it on OpenGL-1.4 implementations which support GL_ARB_POINT_SPRITE, as otherwise the sequence... glPus