[Mesa-dev] [PATCH 08/19] i965: Convert vec4_generator to the new brw_inst API.

2014-06-13 Thread Matt Turner
From: Kenneth Graunke Reviewed-by: Matt Turner Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_vec4_generator.cpp | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp b/src/mesa/drivers/dri/i965/

[Mesa-dev] [PATCH 11/19] i965: Convert brw_eu_compact.c to the new brw_inst API.

2014-06-13 Thread Matt Turner
--- src/mesa/drivers/dri/i965/brw_eu_compact.c | 269 + 1 file changed, 161 insertions(+), 108 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_eu_compact.c b/src/mesa/drivers/dri/i965/brw_eu_compact.c index 0ae3f2d..7e08d1d 100644 --- a/src/mesa/drivers/dri/i9

[Mesa-dev] [PATCH 19/19] i965: Replace struct brw_compact_instruction with brw_compact_inst.

2014-06-13 Thread Matt Turner
--- src/mesa/drivers/dri/i965/brw_eu.c | 2 +- src/mesa/drivers/dri/i965/brw_eu.h | 5 ++-- src/mesa/drivers/dri/i965/brw_eu_compact.c | 42 - src/mesa/drivers/dri/i965/brw_inst.h| 6 ++--- src/mesa/drivers/dri/i965/brw_structs.h | 26 -

[Mesa-dev] [PATCH 15/19] i965: Throw out guts of struct brw_instruction.

2014-06-13 Thread Matt Turner
--- src/mesa/drivers/dri/i965/brw_structs.h | 630 +--- 1 file changed, 1 insertion(+), 629 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_structs.h b/src/mesa/drivers/dri/i965/brw_structs.h index 803dc6e..385bb3c 100644 --- a/src/mesa/drivers/dri/i965/brw_st

[Mesa-dev] [PATCH 12/19] i965: Pass brw rather than gen to brw_disassemble_inst().

2014-06-13 Thread Matt Turner
--- src/mesa/drivers/dri/i965/brw_context.h | 4 +-- src/mesa/drivers/dri/i965/brw_disasm.c | 54 ++--- src/mesa/drivers/dri/i965/brw_eu.c | 2 +- src/mesa/drivers/dri/i965/brw_eu_compact.c | 4 +-- src/mesa/drivers/dri/i965/test_eu_compact.c | 2 +-

[Mesa-dev] [PATCH 18/19] i965: Convert brw_eu_compact.c to the new brw_compact_inst API.

2014-06-13 Thread Matt Turner
--- src/mesa/drivers/dri/i965/brw_eu_compact.c | 82 -- 1 file changed, 44 insertions(+), 38 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_eu_compact.c b/src/mesa/drivers/dri/i965/brw_eu_compact.c index 3814657..769056d 100644 --- a/src/mesa/drivers/dri/i965

[Mesa-dev] [PATCH 07/19] i965: Convert fs_generator to the new brw_inst API.

2014-06-13 Thread Matt Turner
From: Kenneth Graunke Reviewed-by: Matt Turner Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp b/src/mesa/drivers/dri/i965/br

[Mesa-dev] [PATCH 10/19] i965: Extend is_haswell checks to gen >= 8 in Gen4-7 generators.

2014-06-13 Thread Matt Turner
From: Kenneth Graunke We're going to use fs_generator/vec4_generator for Gen8+ code soon, thanks to the new brw_instruction API. When we do, we'll generally want to take the Haswell paths on Gen8+ as well. Reviewed-by: Matt Turner Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/

[Mesa-dev] [PATCH 13/19] i965: Convert brw_disasm.c to the new brw_inst API.

2014-06-13 Thread Matt Turner
--- src/mesa/drivers/dri/i965/brw_disasm.c | 649 - 1 file changed, 310 insertions(+), 339 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_disasm.c b/src/mesa/drivers/dri/i965/brw_disasm.c index 11f53eb..0da05a2 100644 --- a/src/mesa/drivers/dri/i965/brw_d

[Mesa-dev] [PATCH 14/19] i965: Convert brw_gs_emit.c to the new brw_inst API.

2014-06-13 Thread Matt Turner
--- src/mesa/drivers/dri/i965/brw_gs_emit.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_gs_emit.c b/src/mesa/drivers/dri/i965/brw_gs_emit.c index cb9dd7b..320d59c 100644 --- a/src/mesa/drivers/dri/i965/brw_gs_emit.c +++ b/src/mesa/drive

[Mesa-dev] [PATCH 17/19] i965: Introduce a new brw_compact_inst API.

2014-06-13 Thread Matt Turner
For now nothing uses this, but we can incrementally convert. --- src/mesa/drivers/dri/i965/brw_inst.h | 90 1 file changed, 90 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_inst.h b/src/mesa/drivers/dri/i965/brw_inst.h index c2dda5d..83a64fe 100644

[Mesa-dev] [PATCH 09/19] i965: Convert test_eu_compact.c to the new brw_inst API.

2014-06-13 Thread Matt Turner
From: Kenneth Graunke Reviewed-by: Matt Turner Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/test_eu_compact.c | 41 + 1 file changed, 19 insertions(+), 22 deletions(-) diff --git a/src/mesa/drivers/dri/i965/test_eu_compact.c b/src/mesa/drivers/dri/

[Mesa-dev] [PATCH 01/19] i965: Pass brw into next_offset().

2014-06-13 Thread Matt Turner
From: Kenneth Graunke The new brw_inst API is going to require a brw pointer in order to access fields (so it can do generation checks). Plumb it in now. Reviewed-by: Matt Turner Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_eu.h | 2 +- src/mesa/drivers/dri/i965/

[Mesa-dev] [PATCH 02/19] i965: Introduce a new brw_inst API.

2014-06-13 Thread Matt Turner
From: Kenneth Graunke This is similar to gen8_instruction, and will replace it For now nothing uses this, but we can incrementally convert. The new API takes the existing brw_instruction pointers to ease conversion; when done, we can simply drop the old structure and rename struct brw_instructio

[Mesa-dev] [PATCH 03/19] i965: Convert brw_eu.[ch] to use the new brw_inst API.

2014-06-13 Thread Matt Turner
From: Kenneth Graunke Reviewed-by: Matt Turner Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_eu.c | 30 +++--- src/mesa/drivers/dri/i965/brw_eu.h | 3 ++- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_

[Mesa-dev] [PATCH 06/19] i965: Convert Gen4-5 clipping code to the new brw_inst API.

2014-06-13 Thread Matt Turner
From: Kenneth Graunke Reviewed-by: Matt Turner Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_clip_line.c | 21 +++-- src/mesa/drivers/dri/i965/brw_clip_tri.c | 44 +++ src/mesa/drivers/dri/i965/brw_clip_unfilled.c | 26 +--

[Mesa-dev] [PATCH 05/19] i965: Convert brw_sf_emit.c to the new brw_inst API.

2014-06-13 Thread Matt Turner
From: Kenneth Graunke Reviewed-by: Matt Turner Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_sf_emit.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_sf_emit.c b/src/mesa/drivers/dri/i965/brw_sf_emit.c index 8f26e41.

Re: [Mesa-dev] [PATCH v2] mesa/drivers: Fix clang constant-logical-operand warnings.

2014-06-13 Thread Matt Turner
Reviewed-by: Matt Turner ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [PATCH] Revert "i965: Add 'wait' instruction support"

2014-06-13 Thread Matt Turner
This reverts commit 20be3ff57670529a410b30a1008a71e768d08428. No evidence of ever being used. --- src/mesa/drivers/dri/i965/brw_eu.h | 2 -- src/mesa/drivers/dri/i965/brw_eu_emit.c | 16 src/mesa/drivers/dri/i965/brw_reg.h | 16 3 files changed, 34 dele

Re: [Mesa-dev] [PATCH 3/5] Add a place to enable extensions that are common to all DRI drivers

2014-06-13 Thread Jason Ekstrand
Neil, I've been thinking about this same thing. My one comment is that it might be good to call that function after the driver has installed its extensions. That way you can make meta extensions dependant on driver extensions. Not sure how useful that is though. --Jason Ekstrand On Jun 13, 2014

[Mesa-dev] [PATCH v2] mesa/drivers: Fix clang constant-logical-operand warnings.

2014-06-13 Thread Vinson Lee
This patch fixes several clang constant-logical-operand warnings such as the following. ../../../../../src/mesa/tnl_dd/t_dd_tritmp.h:130:32: warning: use of logical '||' with constant operand [-Wconstant-logical-operand] if (DO_TWOSIDE || DO_OFFSET || DO_UNFILLED || DO_TWOSTENCIL)

Re: [Mesa-dev] [PATCH v2 0/6] Implement ARB_clear_texture

2014-06-13 Thread Ilia Mirkin
On Fri, Jun 13, 2014 at 8:59 PM, Neil Roberts wrote: > Here is a second attempt at implementing the GL_ARB_clear_texture > extension. I've split up the patch into serveral smaller patches. They > are based on top of the first patch in Ilia's series which is > available here: > > https://github.com

[Mesa-dev] [PATCH] radeonsi: fixup sizes of shader resource and sampler arrays

2014-06-13 Thread Marek Olšák
From: Marek Olšák This was wrong for a very long time. I wonder if the array size has any effect on anything. --- src/gallium/drivers/radeonsi/si_shader.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeo

Re: [Mesa-dev] [PATCH 2/5] mesa/main: Add generic bits of ARB_clear_texture implementation

2014-06-13 Thread Ilia Mirkin
On Fri, Jun 13, 2014 at 8:59 PM, Neil Roberts wrote: > This adds the driver entry point for glClearTexSubImage and fills in the > _mesa_ClearTexImage and _mesa_ClearTexSubImage functions that call it. > --- > src/mesa/main/dd.h | 14 +++ > src/mesa/main/teximage.c | 241 >

Re: [Mesa-dev] [PATCH 4/5] texstore: Add a generic implementation of GL_ARB_clear_texture

2014-06-13 Thread Ilia Mirkin
On Fri, Jun 13, 2014 at 8:59 PM, Neil Roberts wrote: > Adds an implmentation of the ClearTexSubImage driver entry point that just > maps the texture and writes the values in. This should work as a reliable > fallback on any driver. Will it? What about the MS case? I thought that for generic you h

[Mesa-dev] [Bug 80012] New: [softpipe] draw/draw_gs.c:113:tgsi_fetch_gs_outputs: Assertion `!util_is_inf_or_nan(output[slot][0])' failed.

2014-06-13 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=80012 Priority: medium Bug ID: 80012 Keywords: have-backtrace Assignee: mesa-dev@lists.freedesktop.org Summary: [softpipe] draw/draw_gs.c:113:tgsi_fetch_gs_outputs: Assertion `!uti

[Mesa-dev] [Bug 79472] [llvmpipe] [softpipe] SIGSEGV src/gallium/auxiliary/draw/draw_cliptest_tmp.h:91

2014-06-13 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=79472 Vinson Lee changed: What|Removed |Added Summary|[llvmpipe] SIGSEGV |[llvmpipe] [softpipe] |sr

[Mesa-dev] [Bug 80011] New: [softpipe] tgsi/tgsi_exec.c:2023:exec_txf: Assertion `0' failed.

2014-06-13 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=80011 Priority: medium Bug ID: 80011 Keywords: have-backtrace Assignee: mesa-dev@lists.freedesktop.org Summary: [softpipe] tgsi/tgsi_exec.c:2023:exec_txf: Assertion `0' failed.

[Mesa-dev] [PATCH 4/5] texstore: Add a generic implementation of GL_ARB_clear_texture

2014-06-13 Thread Neil Roberts
Adds an implmentation of the ClearTexSubImage driver entry point that just maps the texture and writes the values in. This should work as a reliable fallback on any driver. --- src/mesa/drivers/common/driverfuncs.c | 2 + src/mesa/main/texstore.c | 70

[Mesa-dev] [PATCH 5/5] meta: Add a meta implementation of GL_ARB_clear_texture

2014-06-13 Thread Neil Roberts
Adds an implementation of the ClearTexSubImage driver entry point that tries to set up an FBO to render to the texture and then calls glClear with a scissor to perform the actual clear. If an FBO can't be created for the texture then it will fall back to using _mesa_store_ClearTexSubImage. --- src

[Mesa-dev] [PATCH 2/5] mesa/main: Add generic bits of ARB_clear_texture implementation

2014-06-13 Thread Neil Roberts
This adds the driver entry point for glClearTexSubImage and fills in the _mesa_ClearTexImage and _mesa_ClearTexSubImage functions that call it. --- src/mesa/main/dd.h | 14 +++ src/mesa/main/teximage.c | 241 ++- src/mesa/main/teximage.h | 12 +++

[Mesa-dev] [PATCH 1/5] teximage: Add utility func for format/internalFormat compatibility check

2014-06-13 Thread Neil Roberts
In texture_error_check() there was a snippet of code to check whether the given format and internal format are basically compatible. This has been split out into its own static helper function so that it can be used by an implementation of glClearTexImage too. --- src/mesa/main/teximage.c | 63 +++

[Mesa-dev] [PATCH v2 0/6] Implement ARB_clear_texture

2014-06-13 Thread Neil Roberts
Here is a second attempt at implementing the GL_ARB_clear_texture extension. I've split up the patch into serveral smaller patches. They are based on top of the first patch in Ilia's series which is available here: https://github.com/imirkin/mesa/commit/9c2467020a8a3895a1debbad06561f37 I think I'

[Mesa-dev] [PATCH 3/5] Add a place to enable extensions that are common to all DRI drivers

2014-06-13 Thread Neil Roberts
This adds a function called _mesa_init_driver_extensions that is called by all DRI-based drivers. The intention is that any extensions that are implemented directly by _mesa_init_driver_functions without any driver-specific entrypoints will be enabled here. --- src/mesa/drivers/common/driverfuncs.

[Mesa-dev] [PATCH 1/2] i965: Make INTEL_DEBUG=mip print out whether HiZ is enabled.

2014-06-13 Thread Kenneth Graunke
We only enable HiZ for miplevels which are aligned on 8x4 blocks. When debugging HiZ failures, it's useful to know whether a particular miplevel is using HiZ or not. Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 2 ++ 1 file changed, 2 insertions(+) diff --

[Mesa-dev] [PATCH 2/2] i965: Use 8x4 aligned rectangles for HiZ operations on Broadwell.

2014-06-13 Thread Kenneth Graunke
Like on Haswell, we need to use 8x4 aligned rectangle primitives for hierarchical depth buffer resolves and depth clears. See the comments in brw_blorp.cpp's brw_hiz_op_params() constructor. (The Broadwell documentation confirms that this is still necessary.) This patch makes the Broadwell code

Re: [Mesa-dev] [PATCH 2/2] glsl: Don't choke on an empty pragma

2014-06-13 Thread Kenneth Graunke
On Friday, June 13, 2014 04:04:44 PM Carl Worth wrote: > The lexer was insisting that there be at least one character after "#pragma" > and before the end of the line. This caused an error for a line consisting > only of "#pragma" which volates at least the following sentence from the GLSL > ES Sp

Re: [Mesa-dev] [PATCH 1/2] glsl/glcpp: Promote "extra token at end of directive" from warning to error

2014-06-13 Thread Kenneth Graunke
On Friday, June 13, 2014 04:04:43 PM Carl Worth wrote: > We've always warned about this case, but a recent confromance test expects > this to be an error that causes compilation to fail. Make it so. > > Also add a "make check" test to ensure these errors are generated. > > This fixes at least the

Re: [Mesa-dev] A couple more to make the preprocessor conform better

2014-06-13 Thread Kenneth Graunke
On Friday, June 13, 2014 03:27:13 PM Carl Worth wrote: > This continues my ongoing series to make the preprocessor conform more > precisely to the specifications. > > I am sprinkling these patches out as I write and test them because they are > each logically independent. If people would prefer th

[Mesa-dev] Two last tiny fixes for preprocessor conformance

2014-06-13 Thread Carl Worth
So these last two, (very self-explanatory), patches complete my series based on an initial pass over preprocessor-related failures I saw in the Khronos GLES3 CTS. There is at least one more failure caused by a test case that has a non-ASCII character (decimal 129) in the name given to a #extension

[Mesa-dev] [PATCH 1/2] glsl/glcpp: Promote "extra token at end of directive" from warning to error

2014-06-13 Thread Carl Worth
We've always warned about this case, but a recent confromance test expects this to be an error that causes compilation to fail. Make it so. Also add a "make check" test to ensure these errors are generated. This fixes at least the following Khronos GLES3 conformance tests: invalid_condit

[Mesa-dev] [PATCH 2/2] glsl: Don't choke on an empty pragma

2014-06-13 Thread Carl Worth
The lexer was insisting that there be at least one character after "#pragma" and before the end of the line. This caused an error for a line consisting only of "#pragma" which volates at least the following sentence from the GLSL ES Specification 3.00.4: The scope as well as the effect of

Re: [Mesa-dev] [PATCH] i965/gen8: Align hiz depth clear to 8x4

2014-06-13 Thread Kenneth Graunke
On Friday, June 13, 2014 03:11:00 PM Kenneth Graunke wrote: > On Friday, June 13, 2014 12:38:43 PM Topi Pohjolainen wrote: > > This fixes framebuffer_blit_functionality_scissor_blit.test in > > gles3 cts. > > > > Signed-off-by: Topi Pohjolainen > > --- > > src/mesa/drivers/dri/i965/gen8_depth_st

[Mesa-dev] A couple more to make the preprocessor conform better

2014-06-13 Thread Carl Worth
This continues my ongoing series to make the preprocessor conform more precisely to the specifications. I am sprinkling these patches out as I write and test them because they are each logically independent. If people would prefer that I batch them up and submit them as a single series, I can do t

[Mesa-dev] [PATCH 1/2] glsl/glcpp: Add short-circuiting for || and && in #if/#elif for OpenGL ES.

2014-06-13 Thread Carl Worth
The GLSL ES Specification 3.00.4 says: #if, #ifdef, #ifndef, #else, #elif, and #endif are defined to operate as for C++ except for the following: ... • Undefined identifiers not consumed by the defined operator do not default to '0'. Use of such identifier

[Mesa-dev] [PATCH 2/2] glsl/glcpp: Once again report undefined macro name in error message.

2014-06-13 Thread Carl Worth
While writing the previous commit message, I just felt bad documenting the shortcoming of the change, (that undefined macro names would not be reported in error messages). Fix this by preserving the first-encounterd undefined macro name and reporting that in any resulting error message. --- src/g

Re: [Mesa-dev] [PATCH] i965/gen8: Align hiz depth clear to 8x4

2014-06-13 Thread Kenneth Graunke
On Friday, June 13, 2014 12:38:43 PM Topi Pohjolainen wrote: > This fixes framebuffer_blit_functionality_scissor_blit.test in > gles3 cts. > > Signed-off-by: Topi Pohjolainen > --- > src/mesa/drivers/dri/i965/gen8_depth_state.c | 15 +++ > 1 file changed, 15 insertions(+) > > diff -

[Mesa-dev] [PATCH 4/9] r600g/compute: only move to the pool the buffers marked for promoting

2014-06-13 Thread Bruno Jiménez
--- src/gallium/drivers/r600/compute_memory_pool.c | 140 +++-- src/gallium/drivers/r600/compute_memory_pool.h | 5 + 2 files changed, 87 insertions(+), 58 deletions(-) diff --git a/src/gallium/drivers/r600/compute_memory_pool.c b/src/gallium/drivers/r600/compute_memory_poo

[Mesa-dev] [PATCH 7/9] r600g/compute: map only against intermediate buffers

2014-06-13 Thread Bruno Jiménez
With this we can assure that mapped buffers will never change its position when relocating the pool. This patch should finally solve the mapping bug. --- src/gallium/drivers/r600/evergreen_compute.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/gallium/drivers

[Mesa-dev] [PATCH 6/9] r600g/compute: implement compute_memory_demote_item

2014-06-13 Thread Bruno Jiménez
This function will be used when we want to map an item that it's already in the pool. --- src/gallium/drivers/r600/compute_memory_pool.c | 45 ++ src/gallium/drivers/r600/compute_memory_pool.h | 3 ++ 2 files changed, 48 insertions(+) diff --git a/src/gallium/drivers/r600

[Mesa-dev] [PATCH 0/9] [RFC] Solve the mapping bug

2014-06-13 Thread Bruno Jiménez
Hi, This is my latest attempt to fix the mapping bug and, so far, it seems that it is resolved. This series changes completely how OpenCL buffers are handled by the r600g driver. Before this, we would add them directly to a pool, and this pool would grow whenever we needed more space. But this pr

[Mesa-dev] [PATCH 8/9] r600g/compute: add util functions to add and remove items from lists

2014-06-13 Thread Bruno Jiménez
--- src/gallium/drivers/r600/compute_memory_pool.c | 158 - 1 file changed, 78 insertions(+), 80 deletions(-) diff --git a/src/gallium/drivers/r600/compute_memory_pool.c b/src/gallium/drivers/r600/compute_memory_pool.c index 624b50d..26b9f98 100644 --- a/src/gallium/drive

[Mesa-dev] [PATCH 2/9] r600g/compute: Add statuses to the compute_memory_items

2014-06-13 Thread Bruno Jiménez
These statuses will help track whether the items are mapped or if they should be promoted to or demoted from the pool --- src/gallium/drivers/r600/compute_memory_pool.h | 7 ++- src/gallium/drivers/r600/evergreen_compute.c | 12 2 files changed, 18 insertions(+), 1 deletion(-)

[Mesa-dev] [PATCH 3/9] r600g/compute: divide the item list in two

2014-06-13 Thread Bruno Jiménez
Now we will have a list with the items that are in the pool (item_list) and the items that are outside it (unallocated_list) --- src/gallium/drivers/r600/compute_memory_pool.c | 99 +- src/gallium/drivers/r600/compute_memory_pool.h | 1 + 2 files changed, 49 insertions(+),

[Mesa-dev] [PATCH 5/9] r600g/compute: avoid problems when promoting items mapped for reading

2014-06-13 Thread Bruno Jiménez
Acording to the OpenCL spec, it is possible to have a buffer mapped for reading and at read from it using commands or buffers. With this we can keep the mapping (that exists against the temporary item) and read with a kernel (from the item we have just added to the pool) without problems. --- src

[Mesa-dev] [PATCH 1/9] r600g/compute: Add an intermediate resource for OpenCL buffers

2014-06-13 Thread Bruno Jiménez
This patch changes completely the way buffers are added to the compute_memory_pool. Before this, whenever we were going to map a buffer or write to or read from it, it would get placed into the pool. Now, every unallocated buffer has its own r600_resource until it is allocated in the pool. NOTE: T

[Mesa-dev] [PATCH 9/9] r600g/compute: avoid demoting items when reading/writing

2014-06-13 Thread Bruno Jiménez
All the *Enqueue* functions that read/write buffers (except clEnqueueCopyBuffer) would map the associated resource, making it to be demoted if it was in the pool. But we possitively know that this transfer will end before any kernel is launched, so there's no need to demote it. NOTE: As a proof o

Re: [Mesa-dev] [PATCH 11/18] glsl: Add support for EmitStreamVertex() and EndStreamPrimitive().

2014-06-13 Thread Chris Forbes
Right, this happens because ir_emit_vertex doesn't take a proper operand, so it can't keep it alive. What I think you want to do is change the stream in ir_emit_vertex and ir_end_primitive to be a pointer to ir_rvalue (and apply the various tweaks required to consider it alive; have rvalue visitor

Re: [Mesa-dev] [PATCH] meta_blit: properly compute texture width for the CopyTexSubImage fallback

2014-06-13 Thread Jordan Justen
On Fri, Jun 13, 2014 at 12:47 PM, Jason Ekstrand wrote: > On Fri, Jun 13, 2014 at 12:20 PM, Brian Paul wrote: >> On 06/13/2014 01:17 PM, Jason Ekstrand wrote: >>> >>> --- >>> src/mesa/drivers/common/meta_blit.c | 2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>> >>> diff --git a/src/

Re: [Mesa-dev] [PATCH] meta_blit: properly compute texture width for the CopyTexSubImage fallback

2014-06-13 Thread Jason Ekstrand
On Fri, Jun 13, 2014 at 12:20 PM, Brian Paul wrote: > On 06/13/2014 01:17 PM, Jason Ekstrand wrote: > >> --- >> src/mesa/drivers/common/meta_blit.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/src/mesa/drivers/common/meta_blit.c >> b/src/mesa/drivers/common/meta_

Re: [Mesa-dev] [PATCH] radeon/compute: Always report at least 1 compute unit

2014-06-13 Thread Bruno Jimenez
Hi, Looks good to me. -Bruno On Fri, 2014-06-13 at 12:58 -0400, Tom Stellard wrote: > Some apps will abort if they detect 0 compute units. This fixes > crashes in some OpenCV tests. > --- > src/gallium/drivers/radeon/r600_pipe_common.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >

Re: [Mesa-dev] [PATCH] meta_blit: properly compute texture width for the CopyTexSubImage fallback

2014-06-13 Thread Matt Turner
Nice find. Reviewed-by: Matt Turner ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH] meta_blit: properly compute texture width for the CopyTexSubImage fallback

2014-06-13 Thread Brian Paul
On 06/13/2014 01:17 PM, Jason Ekstrand wrote: --- src/mesa/drivers/common/meta_blit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/drivers/common/meta_blit.c b/src/mesa/drivers/common/meta_blit.c index aa12e04..2b99b99 100644 --- a/src/mesa/drivers/common/meta_

[Mesa-dev] [PATCH] meta_blit: properly compute texture width for the CopyTexSubImage fallback

2014-06-13 Thread Jason Ekstrand
--- src/mesa/drivers/common/meta_blit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/drivers/common/meta_blit.c b/src/mesa/drivers/common/meta_blit.c index aa12e04..2b99b99 100644 --- a/src/mesa/drivers/common/meta_blit.c +++ b/src/mesa/drivers/common/meta_blit.c @

[Mesa-dev] [PATCH] clover: Cache serialized binaries

2014-06-13 Thread Tom Stellard
We were serializing the binaries once when clGetProgramInfo was called with CL_PROGRAM_BINARY_SIZES and then again when it was called with CL_PROGRAM_BINARIES. This was slowing down some OpenCV tests which were building binary kernel caches. This improves the run-time of OpenCV's OCL_ImgProc/CvtC

Re: [Mesa-dev] [PATCH 04/15] glsl: Add preprocessor error condition for #else directive

2014-06-13 Thread Anuj Phogat
On Thu, Jun 12, 2014 at 11:42 PM, Tapani Pälli wrote: > On 06/07/2014 02:57 AM, Anuj Phogat wrote: >> Fixes gles3 Khronos CTS tests: >> tokens_after_else_vertex >> tokens_after_else_fragment >> >> Cc: >> Signed-off-by: Anuj Phogat >> --- >> src/glsl/glcpp/glcpp-lex.l | 4 >> 1 file changed

Re: [Mesa-dev] [PATCH] i965/gen8: Align hiz depth clear to 8x4

2014-06-13 Thread Ben Widawsky
On Fri, Jun 13, 2014 at 12:38:43PM +0300, Topi Pohjolainen wrote: > This fixes framebuffer_blit_functionality_scissor_blit.test in > gles3 cts. > > Signed-off-by: Topi Pohjolainen > --- > src/mesa/drivers/dri/i965/gen8_depth_state.c | 15 +++ > 1 file changed, 15 insertions(+) > > d

[Mesa-dev] [PATCH] radeon/compute: Always report at least 1 compute unit

2014-06-13 Thread Tom Stellard
Some apps will abort if they detect 0 compute units. This fixes crashes in some OpenCV tests. --- src/gallium/drivers/radeon/r600_pipe_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c b/src/gallium/drivers/radeon/r600_pipe

Re: [Mesa-dev] [PATCH] Remove _mesa_is_type_integer and _mesa_is_enum_format_or_type_integer

2014-06-13 Thread Neil Roberts
Brian Paul writes: > Reviewed-by: Brian Paul > > Do you need someone to commit/push this? Thanks for the review. I do have commit access for Mesa so I've just pushed it. As an aside, I don't have commit access for Piglit and I haven't been able to find someone who can grant me access. If you a

Re: [Mesa-dev] [PATCH] r600g/radeonsi: Remove default case from PIPE_COMPUTE_CAP_* switch

2014-06-13 Thread Marek Olšák
Reviewed-by: Marek Olšák Marek On Fri, Jun 13, 2014 at 5:23 AM, Michel Dänzer wrote: > From: Michel Dänzer > > This way, the compiler warns about unhandled caps. > > Signed-off-by: Michel Dänzer > --- > src/gallium/drivers/radeon/r600_pipe_common.c | 7 +++ > 1 file changed, 3 insertions

Re: [Mesa-dev] [PATCH] Remove _mesa_is_type_integer and _mesa_is_enum_format_or_type_integer

2014-06-13 Thread Brian Paul
On 06/12/2014 10:52 AM, Neil Roberts wrote: The comment for _mesa_is_type_integer is confusing because it says that it returns whether the type is an “integer (non-normalized)” format. I don't think it makes sense to say whether a type is normalized or not because it depends on what format it is

[Mesa-dev] [Bug 74010] mesa-10.0.2: z-buffer issue with opengl 3.3 context on intel

2014-06-13 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=74010 --- Comment #10 from Brian Paul --- Just FYI: There are some GL apps out there that use depth buffering but don't bother to request a GLX visual with a depth buffer. Topogun is one example. There's a DRI config option called "always_have_depth

Re: [Mesa-dev] [PATCH 11/18] glsl: Add support for EmitStreamVertex() and EndStreamPrimitive().

2014-06-13 Thread Iago Toral
On Fri, 2014-06-13 at 10:28 +0200, Iago Toral wrote: > I forgot to add an important piece of info. I also had to add this in > the opt_dead_code.cpp, do_dead_code(): > > if (strcmp(entry->var->name, "stream") == 0) > continue; > > without that, the variable referenced by ir_emit_vertex() gets

[Mesa-dev] [Bug 74010] mesa-10.0.2: z-buffer issue with opengl 3.3 context on intel

2014-06-13 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=74010 --- Comment #9 from Tapani Pälli --- The problem is with the glxconfig that gets chosen. The application queries for compatible list of configs with glXChooseFBConfig and then blindly selects the first one. Although attributes for config query st

[Mesa-dev] [PATCH] i965/gen8: Align hiz depth clear to 8x4

2014-06-13 Thread Topi Pohjolainen
This fixes framebuffer_blit_functionality_scissor_blit.test in gles3 cts. Signed-off-by: Topi Pohjolainen --- src/mesa/drivers/dri/i965/gen8_depth_state.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/src/mesa/drivers/dri/i965/gen8_depth_state.c b/src/mesa/drivers/dri/i96

[Mesa-dev] [PATCH 2/3] radeon/compute: Implement PIPE_COMPUTE_CAP_MAX_COMPUTE_UNITS

2014-06-13 Thread Bruno Jiménez
v2: Add RADEON_INFO_ACTIVE_CU_COUNT as a define, as suggested by Tom Stellard --- src/gallium/drivers/radeon/r600_pipe_common.c | 7 +++ src/gallium/winsys/radeon/drm/radeon_drm_winsys.c | 7 +++ src/gallium/winsys/radeon/drm/radeon_winsys.h | 1 + 3 files changed, 15 inser

[Mesa-dev] [Bug 74010] mesa-10.0.2: z-buffer issue with opengl 3.3 context on intel

2014-06-13 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=74010 Tapani Pälli changed: What|Removed |Added CC||lem...@gmail.com --- Comment #8 from Tapa

Re: [Mesa-dev] [PATCH 11/18] glsl: Add support for EmitStreamVertex() and EndStreamPrimitive().

2014-06-13 Thread Iago Toral
I forgot to add an important piece of info. I also had to add this in the opt_dead_code.cpp, do_dead_code(): if (strcmp(entry->var->name, "stream") == 0) continue; without that, the variable referenced by ir_emit_vertex() gets trashed anyway, whether the ralloc context in link_shaders is detr

Re: [Mesa-dev] [PATCH 11/18] glsl: Add support for EmitStreamVertex() and EndStreamPrimitive().

2014-06-13 Thread Iago Toral
After debugging I have more information about what is going on. There are two problems, one is that the stream variable in ir_emit_vertex gets trashed and the other one is that even if we manage to avoid that it won't get its value assigned. I explain how these two come to happen below and maybe so