Re: [Mesa-dev] [RFC] loader: libudev vs sysfs vs libdrm

2015-07-13 Thread Julien Isorce
>> - libdrm: used as a last resource fall-back after the above two. the >> sole option used by *BSD, MacOS and Android. Hi, Unless I am missing something, libdrm is not used on MacOS. On osx, EGL_PLATFORM=x11 eglGetDisplay(NULL) calls dri2_initialize_x11 which fallback to dri2_initialize_x11_swr

Re: [Mesa-dev] [PATCH] glsl: free interface_types and replace old hash_table uses

2015-07-13 Thread Timothy Arceri
On Mon, 2015-07-13 at 22:19 -0700, Kenneth Graunke wrote: > On Monday, July 13, 2015 11:21:05 AM Iago Toral wrote: > > On Sat, 2015-07-11 at 10:13 +1000, Timothy Arceri wrote: > > > @@ -648,27 +653,28 @@ glsl_type::get_array_instance(const glsl_type > > > *base, unsigned array_size) > > > mtx_

Re: [Mesa-dev] [PATCH] glsl: free interface_types and replace old hash_table uses

2015-07-13 Thread Kenneth Graunke
On Monday, July 13, 2015 11:21:05 AM Iago Toral wrote: > On Sat, 2015-07-11 at 10:13 +1000, Timothy Arceri wrote: > > @@ -648,27 +653,28 @@ glsl_type::get_array_instance(const glsl_type *base, > > unsigned array_size) > > mtx_lock(&glsl_type::mutex); > > > > if (array_types == NULL) { >

Re: [Mesa-dev] [PATCH] i965: Fix 32 bit build warnings in intel_get_yf_ys_bo_size()

2015-07-13 Thread Kenneth Graunke
On Monday, July 13, 2015 03:35:16 PM Anuj Phogat wrote: > Along with fixing the type of pitch parameter, patch also changes > the types of few local variables and function return type. > > Warnings fixed are: > intel_mipmap_tree.c:671:7: warning: passing argument 3 of > 'intel_get_yf_ys_bo_size' f

Re: [Mesa-dev] [PATCH 11/13] mesa: add API dispatch for GL_ARB_get_texture_sub_image

2015-07-13 Thread Ilia Mirkin
On Jul 13, 2015 9:21 PM, "Brian Paul" wrote: > > This adds the new glGetTextureSubImage() and > glGetCompressedTextureSubImage() functions. Also update the > dispatch sanity test program. > --- > src/mapi/glapi/gen/ARB_get_texture_sub_image.xml | 42 > src/mapi/glapi/gen

Re: [Mesa-dev] [PATCH 03/13] gallium/auxiliary: Use exp2(x) instead of pow(2.0, x).

2015-07-13 Thread Matt Turner
On Mon, Jul 13, 2015 at 5:13 PM, Roland Scheidegger wrote: > Did you replace 2 of them by exp2f but one by exp2f on purpose? Yes, two of them are converting their results to floats so they were converted to exp2f(). Upon inspection, the argument of the one exp2 is just an integer... can't we con

[Mesa-dev] [Bug 90264] [Regression, bisected] Tooltip corruption in Chrome

2015-07-13 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=90264 Shawn Starr changed: What|Removed |Added CC||shawn.st...@rogers.com -- You are receivi

[Mesa-dev] [PATCH 13/13] docs: document that GL_ARB_get_texture_sub_image is completed

2015-07-13 Thread Brian Paul
--- docs/GL3.txt | 2 +- docs/relnotes/10.7.0.html | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/GL3.txt b/docs/GL3.txt index 33a282e..2144257 100644 --- a/docs/GL3.txt +++ b/docs/GL3.txt @@ -202,7 +202,7 @@ GL 4.5, GLSL 4.50: - Sampler object

[Mesa-dev] [PATCH 06/13] mesa: replace Driver.GetCompressedTexImage() w/ GetCompressedTexSubImage()

2015-07-13 Thread Brian Paul
For now, pass offsets of zero and width/height/depth equal to the whole image. --- src/mesa/drivers/common/driverfuncs.c | 2 +- src/mesa/main/dd.h | 9 ++--- src/mesa/main/texgetimage.c| 28 src/mesa/main/texgetimage.h

[Mesa-dev] [PATCH 03/13] mesa: replace Driver.GetTexImage with GetTexSubImage()

2015-07-13 Thread Brian Paul
The new driver hook has x/y/zoffset and width/height/depth parameters for the new glGetTextureSubImage() function. The meta code and gallium state tracker are updated to handle the new parameters. Callers to Driver.GetTexSubImage() pass in offsets=0 and sizes equal to the whole texture size. ---

[Mesa-dev] [PATCH 04/13] mesa: plumb offset/size parameters through GetTexSubImage code

2015-07-13 Thread Brian Paul
Needed for GL_ARB_get_texture_sub_image. But at this point, the offsets are always zero and the sizes match the whole texture image. v2: Fixes, suggestions from Laura Ekstrand: * Fix calls to ctx->Driver.UnmapTextureImage() to pass the correct slice value. * Added comments and assertions to che

[Mesa-dev] [PATCH 07/13] mesa: 80-column wrapping in texgetimage.c

2015-07-13 Thread Brian Paul
--- src/mesa/main/texgetimage.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetimage.c index fb3c2c8..e180a4c 100644 --- a/src/mesa/main/texgetimage.c +++ b/src/mesa/main/texgetimage.c @@ -449,7 +449,8 @@ get_tex_

[Mesa-dev] [PATCH 05/13] mesa: make _mesa_get_[compressed_]texture_image() static

2015-07-13 Thread Brian Paul
These functions are only called from teximage.c --- src/mesa/main/texgetimage.c | 24 src/mesa/main/texgetimage.h | 7 --- 2 files changed, 12 insertions(+), 19 deletions(-) diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetimage.c index d17dd52..30a7d06

[Mesa-dev] [PATCH 12/13] mesa: enable GL_ARB_get_texture_sub_image for all drivers

2015-07-13 Thread Brian Paul
--- src/mesa/main/extensions.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c index 4176a69..d2df4fb 100644 --- a/src/mesa/main/extensions.c +++ b/src/mesa/main/extensions.c @@ -121,6 +121,7 @@ static const struct extension extension_tab

[Mesa-dev] [PATCH 08/13] mesa: overhaul the glGetTexImage code

2015-07-13 Thread Brian Paul
1. Reorganize the error checking code. 2. Lay groundwork for getting sub images. 3. Implement _mesa_GetnTexImageARB(), _mesa_GetTexImage() and _mesa_GetTextureImage() all in terms of get_texture_image(). --- src/mesa/main/texgetimage.c | 539 +--- 1 file

[Mesa-dev] [PATCH 02/13] meta: add offset, width, height parameters to decompress_texture_image()

2015-07-13 Thread Brian Paul
In preparation for decompressing texture sub images. --- src/mesa/drivers/common/meta.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c index 54c3d5a..34a8e4b 100644 --- a/src/mesa/drivers/common/meta.c

[Mesa-dev] [PATCH 11/13] mesa: add API dispatch for GL_ARB_get_texture_sub_image

2015-07-13 Thread Brian Paul
This adds the new glGetTextureSubImage() and glGetCompressedTextureSubImage() functions. Also update the dispatch sanity test program. --- src/mapi/glapi/gen/ARB_get_texture_sub_image.xml | 42 src/mapi/glapi/gen/Makefile.am | 1 + src/mapi/glapi/gen/gl

[Mesa-dev] [PATCH 01/13] meta: handle subimages in _mesa_meta_setup_texture_coords()

2015-07-13 Thread Brian Paul
v2: fix depth, total_depth mix-up in meta.h, per Laura Ekstrand. --- src/mesa/drivers/common/meta.c | 88 +- src/mesa/drivers/common/meta.h | 6 +- src/mesa/drivers/common/meta_generate_mipmap.c | 4 +- 3 files changed, 65 insertions(+), 33

[Mesa-dev] [PATCH 10/13] mesa: add new _mesa_Get[Compressed]TextureSubImage() functions

2015-07-13 Thread Brian Paul
Simple implementations in terms of get_[compressed_]texture_image(). --- src/mesa/main/texgetimage.c | 38 ++ src/mesa/main/texgetimage.h | 15 +++ 2 files changed, 53 insertions(+) diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetimag

[Mesa-dev] [PATCH 09/13] mesa: overhaul the glGetCompressedTexImage code

2015-07-13 Thread Brian Paul
Same idea as the previous patch. --- src/mesa/main/texgetimage.c | 345 +--- 1 file changed, 196 insertions(+), 149 deletions(-) diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetimage.c index b74517a..bcdcfe8 100644 --- a/src/mesa/main/texgeti

Re: [Mesa-dev] [PATCH 03/13] gallium/auxiliary: Use exp2(x) instead of pow(2.0, x).

2015-07-13 Thread Roland Scheidegger
Did you replace 2 of them by exp2f but one by exp2f on purpose? I don't think we can use exp2/exp2f in gallium. This requires msvc 2013 (all of exp2, exp2f, powf are c99, powf is supported by older msvc but the others are not). I guess though could throw some wrappers into c99_math.h. Roland Am

Re: [Mesa-dev] [PATCH 61/78] i965/nir/vec4: Add skeleton implementation of nir_emit_texture()

2015-07-13 Thread Jason Ekstrand
On Mon, Jul 13, 2015 at 9:09 AM, Alejandro Piñeiro wrote: > > > On 13/07/15 16:26, Jason Ekstrand wrote: >> >> >> >> > > > Go ahead and make it a cpp file if you have to. >> > > >> > > Ok, thanks. >> > > >> > > > Another option would >> > > > be to do the map the other way: ir_opcode -> nir_tex_op

[Mesa-dev] [PATCH 12/13] mesa/math: Avoid double promotion.

2015-07-13 Thread Matt Turner
--- src/mesa/math/m_clip_tmp.h | 20 ++--- src/mesa/math/m_matrix.c | 70 +++--- src/mesa/math/m_norm_tmp.h | 2 +- 3 files changed, 46 insertions(+), 46 deletions(-) diff --git a/src/mesa/math/m_clip_tmp.h b/src/mesa/math/m_clip_tmp.h index e289

[Mesa-dev] [PATCH 01/13] mesa: Use floats for viewport bounds.

2015-07-13 Thread Matt Turner
ARB_viewport_array specifies that DEPTH_RANGE consists of double- precision parameters (corresponding commit d4dc35987), and a preparatory commit (6340e609a) added _mesa_get_viewport_xform() which returned double-precision scale[3] and translate[3] vectors, even though X, Y, Width, and Height were

[Mesa-dev] [PATCH 13/13] mesa: Avoid double promotion.

2015-07-13 Thread Matt Turner
--- src/mesa/main/ffvertex_prog.c | 10 +- src/mesa/main/fog.c | 2 +- src/mesa/main/get.c | 2 +- src/mesa/main/light.c | 30 +++--- src/mesa/main/lines.c | 4 ++-- src/mesa/main/multisample.c | 4 ++

[Mesa-dev] [PATCH 08/13] vbo: Avoid double promotion.

2015-07-13 Thread Matt Turner
--- src/mesa/vbo/vbo_context.c| 6 +++--- src/mesa/vbo/vbo_exec_array.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/mesa/vbo/vbo_context.c b/src/mesa/vbo/vbo_context.c index fd1ffe2..e3eb286 100644 --- a/src/mesa/vbo/vbo_context.c +++ b/src/mesa/vbo/vbo_context

[Mesa-dev] [PATCH 05/13] nir: Avoid double promition.

2015-07-13 Thread Matt Turner
--- src/glsl/nir/nir_opcodes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/glsl/nir/nir_opcodes.py b/src/glsl/nir/nir_opcodes.py index 56e96d9..df5b7e2 100644 --- a/src/glsl/nir/nir_opcodes.py +++ b/src/glsl/nir/nir_opcodes.py @@ -474,10 +474,10 @@ else """) op

[Mesa-dev] [PATCH 10/13] swrast: Avoid double promotion.

2015-07-13 Thread Matt Turner
--- src/mesa/swrast/s_aaline.c| 28 ++-- src/mesa/swrast/s_aalinetemp.h| 4 ++-- src/mesa/swrast/s_atifragshader.c | 4 ++-- src/mesa/swrast/s_copypix.c | 6 +++--- src/mesa/swrast/s_drawpix.c | 12 ++-- src/mesa/swrast/s_fragprog.c |

[Mesa-dev] [PATCH 09/13] tnl: Avoid double promotion.

2015-07-13 Thread Matt Turner
There are a couple of unrelated changes in t_vb_lighttmp.h that I hope you'll excuse -- there's a block of code that's duplicated modulo a few trivial differences that I took the liberty of fixing. --- src/mesa/tnl/t_draw.c | 2 +- src/mesa/tnl/t_rasterpos.c | 6 +++--- src/mesa/t

[Mesa-dev] [PATCH 00/13] Avoid double promotion

2015-07-13 Thread Matt Turner
In the process of looking at the assembly generated from the OUT_BATCH series, I noticed a bunch of float <-> double round trips. Mostly this arises because unsuffixed floating-point literals are of type double, and (float op double) is a double operation in which the float is implicitly converted

[Mesa-dev] [PATCH 06/13] gallium/auxiliary: Avoid double promotion.

2015-07-13 Thread Matt Turner
--- src/gallium/auxiliary/util/u_format_rgb9e5.h | 2 +- src/gallium/auxiliary/util/u_math.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/auxiliary/util/u_format_rgb9e5.h b/src/gallium/auxiliary/util/u_format_rgb9e5.h index 7a01f7f..d1ace3f 100644 --

[Mesa-dev] [PATCH 03/13] gallium/auxiliary: Use exp2(x) instead of pow(2.0, x).

2015-07-13 Thread Matt Turner
--- src/gallium/auxiliary/util/u_format_rgb9e5.h | 6 +++--- src/gallium/auxiliary/util/u_math.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gallium/auxiliary/util/u_format_rgb9e5.h b/src/gallium/auxiliary/util/u_format_rgb9e5.h index c2a3f6f..7a01f7f 10064

[Mesa-dev] [PATCH 02/13] program: Use exp2(x) instead of pow(2.0, x).

2015-07-13 Thread Matt Turner
--- src/mesa/program/prog_execute.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesa/program/prog_execute.c b/src/mesa/program/prog_execute.c index 46260b5..77274e2 100644 --- a/src/mesa/program/prog_execute.c +++ b/src/mesa/program/prog_execute.c @@ -723,7 +723,7 @

[Mesa-dev] [PATCH 11/13] program: Avoid double promotion.

2015-07-13 Thread Matt Turner
--- src/mesa/program/prog_execute.c | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/mesa/program/prog_execute.c b/src/mesa/program/prog_execute.c index 77274e2..2c52d0d 100644 --- a/src/mesa/program/prog_execute.c +++ b/src/mesa/program/prog

[Mesa-dev] [PATCH 04/13] i965: Use float calculations when double is unnecessary.

2015-07-13 Thread Matt Turner
Literals without an f/F suffix are of type double, and implicit conversion rules specify that the float in (float op double) be converted to a double before the operation is performed. I believe float execution was intended (in nearly all cases) or is sufficient (in the case of gen7_urb.c). Remove

[Mesa-dev] [PATCH 07/13] util: Avoid double promition.

2015-07-13 Thread Matt Turner
--- src/util/register_allocate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/register_allocate.c b/src/util/register_allocate.c index 2ad8c3c..95be20f 100644 --- a/src/util/register_allocate.c +++ b/src/util/register_allocate.c @@ -648,7 +648,7 @@ ra_get_best_spill

[Mesa-dev] [PATCH] i965: Mark constant static data as const.

2015-07-13 Thread Matt Turner
--- src/mesa/drivers/dri/i965/brw_curbe.c | 2 +- src/mesa/drivers/dri/i965/brw_draw_upload.c | 44 ++--- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_curbe.c b/src/mesa/drivers/dri/i965/brw_curbe.c index befd7a9..a1

Re: [Mesa-dev] [PATCH] [v3] i965: Split out gen8 push constant state upload

2015-07-13 Thread Dylan Baker
On Fri, Jul 10, 2015 at 02:24:42PM -0700, Ben Widawsky wrote: > On Fri, Jul 10, 2015 at 12:03:54PM -0700, Matt Turner wrote: > > I don't think putting Intel-internal links in the commit message is a good > > idea. > > > > Ken's made similar comments to me. > > > > Also, so much off the wall comm

[Mesa-dev] [PATCH] i965: Fix 32 bit build warnings in intel_get_yf_ys_bo_size()

2015-07-13 Thread Anuj Phogat
Along with fixing the type of pitch parameter, patch also changes the types of few local variables and function return type. Warnings fixed are: intel_mipmap_tree.c:671:7: warning: passing argument 3 of 'intel_get_yf_ys_bo_size' from incompatible pointer type intel_mipmap_tree.c:563:1: note: expe

Re: [Mesa-dev] [PATCH 5/5] i965: Optimize batchbuffer macros.

2015-07-13 Thread Matt Turner
On Sat, Jul 11, 2015 at 11:02 AM, Chris Wilson wrote: > On Fri, Jul 10, 2015 at 11:44:59AM -0700, Matt Turner wrote: >> Previously OUT_BATCH was just a macro around an inline function which >> does >> >>brw->batch.map[brw->batch.used++] = dword; >> >> When making consecutive calls to intel_bat

Re: [Mesa-dev] [PATCH 4/5] i965: Split batch emission from relocation functions.

2015-07-13 Thread Matt Turner
On Sat, Jul 11, 2015 at 11:08 AM, Chris Wilson wrote: > On Fri, Jul 10, 2015 at 11:44:58AM -0700, Matt Turner wrote: >> So that everything writing to the batch between BEGIN_BATCH() and >> ADVANCE_BATCH() goes through OUT_BATCH. > > Reviewed-by: Chris Wilson > >> +#define OUT_RELOC64(buf, read_do

[Mesa-dev] [PATCH 4/4] i965: Optimize batchbuffer macros.

2015-07-13 Thread Matt Turner
Previously OUT_BATCH was just a macro around an inline function which does brw->batch.map[brw->batch.used++] = dword; When making consecutive calls to intel_batchbuffer_emit_dword() the compiler isn't able to recognize that we're writing consecutive memory locations or that it doesn't need to

[Mesa-dev] [PATCH 3/4] i965: Add and use USED_BATCH macro.

2015-07-13 Thread Matt Turner
The next patch will replace the .used field with an on-demand calculation of batchbuffer usage. --- src/mesa/drivers/dri/i965/brw_blorp.cpp | 4 ++-- src/mesa/drivers/dri/i965/brw_performance_monitor.c | 6 +++--- src/mesa/drivers/dri/i965/brw_state_batch.c | 4 ++-- src/mes

[Mesa-dev] [PATCH 2/4] i965: Split batch emission from relocation functions.

2015-07-13 Thread Matt Turner
So that everything writing to the batch between BEGIN_BATCH() and ADVANCE_BATCH() goes through OUT_BATCH. Reviewed-by: Chris Wilson --- src/mesa/drivers/dri/i965/intel_batchbuffer.c | 30 ++- src/mesa/drivers/dri/i965/intel_batchbuffer.h | 34 ++- 2 fi

[Mesa-dev] [PATCH 1/4] i965: Move BEGIN_BATCH() into same control flow as ADVANCE_BATCH().

2015-07-13 Thread Matt Turner
BEGIN_BATCH() and ADVANCE_BATCH() will contain "do {" and "} while (0)" respectively to allow declaring local variables used by intervening OUT_BATCH macros. As such, BEGIN_BATCH() and ADVANCE_BATCH() need to be in the same control flow. Reviewed-by: Iago Toral Quiroga --- src/mesa/drivers/dri/i

Re: [Mesa-dev] [PATCH 00/11] Bye bye __NOT_HAVE_DRM_H

2015-07-13 Thread Emil Velikov
On 8 July 2015 at 18:07, Emil Velikov wrote: > Hi all, > > As double-negatives are not too appealing in the English language I've > decided to nuke the common ifndef __NOT_HAVE_DRM_H. > > The first three patches are trivial bugfix + cleanups which I've noticed > while browsing through, 04-09 remov

Re: [Mesa-dev] [PATCH] nv50: limit the maximum number of samplers to 16

2015-07-13 Thread Ilia Mirkin
On Mon, Jul 13, 2015 at 2:44 PM, Emil Velikov wrote: > On 13 July 2015 at 19:30, Ilia Mirkin wrote: >> On Mon, Jul 13, 2015 at 2:28 PM, Emil Velikov >> wrote: >>> On 13 July 2015 at 17:32, samuel.pitoiset wrote: On 13/07/2015 18:08, Emil Velikov wrote: > > Is there some widely kno

Re: [Mesa-dev] [PATCH] nv50: limit the maximum number of samplers to 16

2015-07-13 Thread Emil Velikov
On 13 July 2015 at 19:30, Ilia Mirkin wrote: > On Mon, Jul 13, 2015 at 2:28 PM, Emil Velikov > wrote: >> On 13 July 2015 at 17:32, samuel.pitoiset wrote: >>> On 13/07/2015 18:08, Emil Velikov wrote: Is there some widely know issue with it ? mesa & envytools does not mention anyth

Re: [Mesa-dev] [PATCH] nv50: limit the maximum number of samplers to 16

2015-07-13 Thread Ilia Mirkin
On Mon, Jul 13, 2015 at 2:28 PM, Emil Velikov wrote: > On 13 July 2015 at 17:32, samuel.pitoiset wrote: >> On 13/07/2015 18:08, Emil Velikov wrote: >>> >>> Is there some widely know issue with it ? mesa & envytools does not >>> mention anything (based of a quick scan). >> >> >> There is no know i

Re: [Mesa-dev] [PATCH] nv50: limit the maximum number of samplers to 16

2015-07-13 Thread Emil Velikov
On 13 July 2015 at 17:32, samuel.pitoiset wrote: > On 13/07/2015 18:08, Emil Velikov wrote: >> >> Is there some widely know issue with it ? mesa & envytools does not >> mention anything (based of a quick scan). > > > There is no know issue with NV50_3D_BIND_TSC2, but Ilia doesn't seem to want > to

Re: [Mesa-dev] [PATCH] nv50: limit the maximum number of samplers to 16

2015-07-13 Thread Emil Velikov
On 13 July 2015 at 17:31, Ilia Mirkin wrote: > On Mon, Jul 13, 2015 at 12:08 PM, Emil Velikov > wrote: >> On 13 July 2015 at 10:24, Samuel Pitoiset wrote: >>> NV50_3D_BIND_TSC only allows to bind 16 samplers, and since we don't >>> want to do anything with NV50_3D_BIND_TSC2 >> Is there some wid

Re: [Mesa-dev] [PATCH] nvc0: fix geometry program revalidation of clipping params

2015-07-13 Thread Ilia Mirkin
This was, btw, introduced in commit 3a8ae6ac243b (nvc0: adapt to new clip state). Back then there was no real geometry support yet. On Mon, Jul 13, 2015 at 2:05 PM, Ilia Mirkin wrote: > Any one which, after using a geometry shader, enables an extra clip > distance. i.e. none. > > On Mon, Jul 13,

Re: [Mesa-dev] [PATCH] nvc0: fix geometry program revalidation of clipping params

2015-07-13 Thread Ilia Mirkin
Any one which, after using a geometry shader, enables an extra clip distance. i.e. none. On Mon, Jul 13, 2015 at 4:16 AM, Samuel Pitoiset wrote: > What piglit test does this fix? > > On Sat, Jul 11, 2015 at 7:13 PM, Ilia Mirkin wrote: >> >> Signed-off-by: Ilia Mirkin >> Cc: mesa-sta...@lists.fr

[Mesa-dev] [PATCH 2/3 v2] i965: Swap the order of the vertex ID and edge flag attributes

2015-07-13 Thread Neil Roberts
The edge flag data on Gen6+ is passed through the fixed function hardware as an extra attribute. According to the PRM it must be the last valid VERTEX_ELEMENT structure. However if the vertex ID is also used then another extra element is added to source the VID. This made it so the vertex ID is in

[Mesa-dev] [PATCH 3/3 v2] i965/bdw: Fix 3DSTATE_VF_INSTANCING when the edge flag is used

2015-07-13 Thread Neil Roberts
When the edge flag element is enabled then the elements are slightly reordered so that the edge flag is always the last one. This was confusing the code to upload the 3DSTATE_VF_INSTANCING state because that is uploaded with a separate loop which has an instruction for each element. The indices use

[Mesa-dev] [PATCH 1/3] i965/bdw: Fix setting the instancing state for the SGVS element

2015-07-13 Thread Neil Roberts
When gl_VertexID or gl_InstanceID is used a 3DSTATE_VF_SGVS instruction is sent to create a sort of element to store the generated values. The last instruction in this chunk of code looks like it was trying to set the instancing state for the element using the 3DSTATE_VF_INSTANCING instruction. How

[Mesa-dev] [PATCH 0/3] i965: Fix problems with gl_Vertex/InstanceID and glPolygonMode

2015-07-13 Thread Neil Roberts
This series fixes these two related bugs: https://bugs.freedesktop.org/show_bug.cgi?id=84677 https://bugs.freedesktop.org/show_bug.cgi?id=91292 The first bug has had a fix for a while but until now I wasn't able to figure out what to do on BDW. I had previously made a fix for the second bug but a

Re: [Mesa-dev] [PATCH 1/2] nv50: add nesting support for occlusion queries

2015-07-13 Thread Ilia Mirkin
Reviewed-by: Ilia Mirkin On Mon, Jul 13, 2015 at 12:49 PM, Samuel Pitoiset wrote: > This is loosely based on nvc0. > > Signed-off-by: Samuel Pitoiset > --- > src/gallium/drivers/nouveau/nv50/nv50_query.c | 29 > -- > src/gallium/drivers/nouveau/nv50/nv50_screen.h | 2

Re: [Mesa-dev] [PATCH 2/2] nv50: turn samples counts off during blit

2015-07-13 Thread Ilia Mirkin
Reviewed-by: Ilia Mirkin On Mon, Jul 13, 2015 at 4:49 AM, Samuel Pitoiset wrote: > Fixes the following piglit test: > occlusion_query_meta_no_fragments > > Signed-off-by: Samuel Pitoiset > --- > src/gallium/drivers/nouveau/nv50/nv50_surface.c | 11 +++ > 1 file changed, 11 insertions

[Mesa-dev] [PATCH 1/2] nv50: add nesting support for occlusion queries

2015-07-13 Thread Samuel Pitoiset
This is loosely based on nvc0. Signed-off-by: Samuel Pitoiset --- src/gallium/drivers/nouveau/nv50/nv50_query.c | 29 -- src/gallium/drivers/nouveau/nv50/nv50_screen.h | 2 ++ 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/src/gallium/drivers/nouveau/n

Re: [Mesa-dev] [PATCH v2] i965/fs: Don't use the pixel interpolater for centroid interpolation

2015-07-13 Thread Chris Forbes
Oh, never mind - I see there's another hunk that my mailer had folded away for some reason. I'm happy that it's correct now :) On Jul 13, 2015 23:33, "Neil Roberts" wrote: > Chris Forbes writes: > > > Nitpicks aside, I don't think this is a great idea now that you've got > > the SKL PI working.

Re: [Mesa-dev] [PATCH] nv50: limit the maximum number of samplers to 16

2015-07-13 Thread samuel.pitoiset
On 13/07/2015 18:08, Emil Velikov wrote: Is there some widely know issue with it ? mesa & envytools does not mention anything (based of a quick scan). There is no know issue with NV50_3D_BIND_TSC2, but Ilia doesn't seem to want to use it. :-) That's why I followed his suggestion by reducing

Re: [Mesa-dev] [PATCH] nv50: limit the maximum number of samplers to 16

2015-07-13 Thread Ilia Mirkin
On Mon, Jul 13, 2015 at 12:08 PM, Emil Velikov wrote: > On 13 July 2015 at 10:24, Samuel Pitoiset wrote: >> NV50_3D_BIND_TSC only allows to bind 16 samplers, and since we don't >> want to do anything with NV50_3D_BIND_TSC2 > Is there some widely know issue with it ? mesa & envytools does not > me

Re: [Mesa-dev] [PATCH 61/78] i965/nir/vec4: Add skeleton implementation of nir_emit_texture()

2015-07-13 Thread Alejandro Piñeiro
On 13/07/15 16:26, Jason Ekstrand wrote: > > > > > > > Go ahead and make it a cpp file if you have to. > > > > > > Ok, thanks. > > > > > > > Another option would > > > > be to do the map the other way: ir_opcode -> nir_tex_op and refactor > > > > the code to use the nir_tex_op. > > > > > > But ev

Re: [Mesa-dev] [PATCH] nv50: limit the maximum number of samplers to 16

2015-07-13 Thread Emil Velikov
On 13 July 2015 at 10:24, Samuel Pitoiset wrote: > NV50_3D_BIND_TSC only allows to bind 16 samplers, and since we don't > want to do anything with NV50_3D_BIND_TSC2 Is there some widely know issue with it ? mesa & envytools does not mention anything (based of a quick scan). Thanks Emil __

Re: [Mesa-dev] [PATCH 3/4] radeon: fix some potential big endian issues

2015-07-13 Thread Emil Velikov
On 11 July 2015 at 19:39, wrote: > @@ -186,17 +172,24 @@ static inline void emit_cb_setup(struct r100_context > *r100, > > /* XXX others? BE/LE? */ Drop the BE/LE part of the comment ? > switch (mesa_format) { > +/* le */ > case MESA_FORMAT_B8G8R8A8_UNORM: > case MESA_

Re: [Mesa-dev] [PATCH 1/4] r200: fix fbo rendering by disabling optimized texture format chooser

2015-07-13 Thread Emil Velikov
Hi Roland, Can I put forward a couple of trivial requrest On 11 July 2015 at 19:39, wrote: > From: Roland Scheidegger > > It is rather unfortunate that we don't know if a texture is going to be used > as a rt later, and we lack the means to do something about a format chosen > which we can't r

Re: [Mesa-dev] [PATCH 2/5] applegl: Provide requirements of _SET_DrawBuffers

2015-07-13 Thread Emil Velikov
On 18 June 2015 at 06:53, Julien Isorce wrote: > From: Jon TURNEY > > _SET_DrawBuffers requires driDispatchRemapTable, > so we need to link with libmesa for remap.c. > libmesa requires the C++ linker. > > Also need to arrange to call _mesa_init_remap_table() > to initialize the remap table. > > B

Re: [Mesa-dev] [PATCH 1/2] nv50: add nesting support for occlusion queries

2015-07-13 Thread Ilia Mirkin
This doesn't fix up nv50_query_result. And there's also all the rotate logic in nvc0 which seems to think it's required. Quite frankly I never fully grokked all that stuff, but it seems highly relevant to this. On Mon, Jul 13, 2015 at 4:49 AM, Samuel Pitoiset wrote: > This is loosely based on nvc

Re: [Mesa-dev] [PATCH] nv50: limit the maximum number of samplers to 16

2015-07-13 Thread Ilia Mirkin
Reviewed-by: Ilia Mirkin On Mon, Jul 13, 2015 at 5:24 AM, Samuel Pitoiset wrote: > NV50_3D_BIND_TSC only allows to bind 16 samplers, and since we don't > want to do anything with NV50_3D_BIND_TSC2, just limit the maximum > number of samplers to 16 like for nvc0. > > This fixes dmesg fails with t

Re: [Mesa-dev] [PATCH 3/4] radeon, r200: allow hyperz for radeon DRM module v2

2015-07-13 Thread Alex Deucher
On Sat, Jul 11, 2015 at 8:48 AM, Roland Scheidegger wrote: > Am 11.07.2015 um 11:25 schrieb Marek Olšák: >> On Fri, Jul 10, 2015 at 11:02 PM, Roland Scheidegger >> wrote: >>> Am 10.07.2015 um 19:41 schrieb Emil Velikov: On 10 July 2015 at 13:18, Roland Scheidegger wrote: > Am 10.07.201

Re: [Mesa-dev] [PATCH 61/78] i965/nir/vec4: Add skeleton implementation of nir_emit_texture()

2015-07-13 Thread Jason Ekstrand
On Jul 13, 2015 7:17 AM, "Jason Ekstrand" wrote: > > > On Jul 13, 2015 7:14 AM, "Alejandro Piñeiro" wrote: > > > > > > > > On 13/07/15 14:05, Jason Ekstrand wrote: > > > On Mon, Jul 13, 2015 at 3:00 AM, Alejandro Piñeiro < apinhe...@igalia.com> wrote: > > >> On 01/07/15 01:37, Jason Ekstrand wrot

Re: [Mesa-dev] [RFC] gallium: add interface for writable shader images

2015-07-13 Thread Jose Fonseca
On 09/07/15 22:05, Marek Olšák wrote: I'd like to discuss one more thing that will affect whether image slots will be global (shared by all shaders) or not. Which image unit an image uniform uses is not a compile-time thing, but it's specified later using glUniform1i. That means we need a per-sh

Re: [Mesa-dev] [PATCH] i965/fs: Make the texturing helpers take NIR opcodes instead of old IR ones

2015-07-13 Thread Jason Ekstrand
On Jul 13, 2015 6:04 AM, "Francisco Jerez" wrote: > > Jason Ekstrand writes: > > > Now that the old GLSL IR visitor code is gone, having the remap is silly. > > --- > > src/mesa/drivers/dri/i965/brw_fs.h | 12 +-- > > src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 18 +--- > > src/me

Re: [Mesa-dev] [PATCH 61/78] i965/nir/vec4: Add skeleton implementation of nir_emit_texture()

2015-07-13 Thread Jason Ekstrand
On Jul 13, 2015 7:14 AM, "Alejandro Piñeiro" wrote: > > > > On 13/07/15 14:05, Jason Ekstrand wrote: > > On Mon, Jul 13, 2015 at 3:00 AM, Alejandro Piñeiro wrote: > >> On 01/07/15 01:37, Jason Ekstrand wrote: > >>> If we can avoid duplication in the texturing code, that would be > >>> really nice

Re: [Mesa-dev] [PATCH 61/78] i965/nir/vec4: Add skeleton implementation of nir_emit_texture()

2015-07-13 Thread Alejandro Piñeiro
On 13/07/15 14:05, Jason Ekstrand wrote: > On Mon, Jul 13, 2015 at 3:00 AM, Alejandro Piñeiro > wrote: >> On 01/07/15 01:37, Jason Ekstrand wrote: >>> If we can avoid duplication in the texturing code, that would be >>> really nice. Could we do this as a refactor of the old code and then >>> a

Re: [Mesa-dev] [PATCH] i965/fs: Make the texturing helpers take NIR opcodes instead of old IR ones

2015-07-13 Thread Francisco Jerez
Jason Ekstrand writes: > Now that the old GLSL IR visitor code is gone, having the remap is silly. > --- > src/mesa/drivers/dri/i965/brw_fs.h | 12 +-- > src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 18 +--- > src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 135 > ++

Re: [Mesa-dev] Extension to get Mesa IRs (Was: [Bug 91173])

2015-07-13 Thread Jose Fonseca
On 12/07/15 01:49, Ilia Mirkin wrote: On Thu, Jul 2, 2015 at 4:54 PM, Jose Fonseca wrote: On 02/07/15 19:45, Ilia Mirkin wrote: On Thu, Jul 2, 2015 at 2:31 PM, Jose Fonseca wrote: On 02/07/15 17:49, Ilia Mirkin wrote: On Thu, Jul 2, 2015 at 12:40 PM, Jose Fonseca wrote: On 02/07/15

[Mesa-dev] [PATCH] i965/fs: Make the texturing helpers take NIR opcodes instead of old IR ones

2015-07-13 Thread Jason Ekstrand
Now that the old GLSL IR visitor code is gone, having the remap is silly. --- src/mesa/drivers/dri/i965/brw_fs.h | 12 +-- src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 18 +--- src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 135 ++- 3 files changed, 75 inserti

Re: [Mesa-dev] [PATCH 61/78] i965/nir/vec4: Add skeleton implementation of nir_emit_texture()

2015-07-13 Thread Jason Ekstrand
On Mon, Jul 13, 2015 at 3:00 AM, Alejandro Piñeiro wrote: > On 01/07/15 01:37, Jason Ekstrand wrote: >> If we can avoid duplication in the texturing code, that would be >> really nice. Could we do this as a refactor of the old code and then >> a much smaller NIR function that calls some shared co

Re: [Mesa-dev] [PATCH 61/78] i965/nir/vec4: Add skeleton implementation of nir_emit_texture()

2015-07-13 Thread Jason Ekstrand
On Wed, Jul 1, 2015 at 1:07 AM, Alejandro Piñeiro wrote: > On 01/07/15 01:37, Jason Ekstrand wrote: >> If we can avoid duplication in the texturing code, that would be >> really nice. Could we do this as a refactor of the old code and then >> a much smaller NIR function that calls some shared cod

Re: [Mesa-dev] [PATCH 16/78] i965/nir/vec4: Implement store_output intrinsic

2015-07-13 Thread Jason Ekstrand
On Wed, Jul 8, 2015 at 11:54 PM, Eduardo Lima Mitev wrote: > On 06/30/2015 06:51 PM, Jason Ekstrand wrote: >> On Fri, Jun 26, 2015 at 1:06 AM, Eduardo Lima Mitev wrote: >>> The index into the output_reg array where to store the destination register >>> is >>> fetched from the nir_outputs map bui

Re: [Mesa-dev] [PATCH 18/78] i965: Take is_scalar_shader_stage() method out to allow reuse

2015-07-13 Thread Jason Ekstrand
On Fri, Jul 10, 2015 at 8:53 AM, Eduardo Lima Mitev wrote: > On 06/30/2015 06:58 PM, Jason Ekstrand wrote: >> On Fri, Jun 26, 2015 at 1:06 AM, Eduardo Lima Mitev wrote: >>> This patch makes public the is_scalar_shader_stage() method in brw_shader, >>> and >>> renames it to brw_compiler_is_scalar

Re: [Mesa-dev] [PATCH v2] i965/fs: Don't use the pixel interpolater for centroid interpolation

2015-07-13 Thread Neil Roberts
Chris Forbes writes: > Nitpicks aside, I don't think this is a great idea now that you've got > the SKL PI working. Can you explain why you don't think this is a good idea? Is it because it is an optimisation for something that is not known to be a big use case so carrying around the extra code

Re: [Mesa-dev] [PATCH v2] glsl: avoid compiler's segfault when processing operators with void arguments

2015-07-13 Thread Samuel Iglesias Gonsálvez
On 11/07/15 19:38, Renaud Gaubert wrote: > This is done by returning an rvalue of type void in the > ast_function_expression::hir function instead of a void expression. > > This produces (in the case of the ternary) an hir with a call > to the void returning function and an assignment of a void va

Re: [Mesa-dev] [PATCH 61/78] i965/nir/vec4: Add skeleton implementation of nir_emit_texture()

2015-07-13 Thread Alejandro Piñeiro
On 01/07/15 01:37, Jason Ekstrand wrote: > If we can avoid duplication in the texturing code, that would be > really nice. Could we do this as a refactor of the old code and then > a much smaller NIR function that calls some shared code? That's what > we did for FS and it worked ok. I looked at

[Mesa-dev] [PATCH] nv50: limit the maximum number of samplers to 16

2015-07-13 Thread Samuel Pitoiset
NV50_3D_BIND_TSC only allows to bind 16 samplers, and since we don't want to do anything with NV50_3D_BIND_TSC2, just limit the maximum number of samplers to 16 like for nvc0. This fixes dmesg fails with the following piglit test: max-samplers But the test still fails. Signed-off-by: Samuel Pit

Re: [Mesa-dev] [PATCH] glsl: free interface_types and replace old hash_table uses

2015-07-13 Thread Iago Toral
On Sat, 2015-07-11 at 10:13 +1000, Timothy Arceri wrote: > The util/hash_table was intended to be a fast hash table > replacement for the program/hash_table see 35fd61bd99c1 and 72e55bb6888ff. > > This replaces some more uses of the old hash table and also > destroys the interface_types hash table

[Mesa-dev] [PATCH 1/2] nv50: add nesting support for occlusion queries

2015-07-13 Thread Samuel Pitoiset
This is loosely based on nvc0. Signed-off-by: Samuel Pitoiset --- src/gallium/drivers/nouveau/nv50/nv50_query.c | 27 -- src/gallium/drivers/nouveau/nv50/nv50_screen.h | 2 ++ 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/src/gallium/drivers/nouveau/n

[Mesa-dev] [PATCH 2/2] nv50: turn samples counts off during blit

2015-07-13 Thread Samuel Pitoiset
Fixes the following piglit test: occlusion_query_meta_no_fragments Signed-off-by: Samuel Pitoiset --- src/gallium/drivers/nouveau/nv50/nv50_surface.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/src/gallium/drivers/nouveau/nv50/nv50_surface.c b/src/gallium/drivers/nouveau/

Re: [Mesa-dev] [PATCH 1/5] i965: Move BEGIN_BATCH() into same control flow as ADVANCE_BATCH().

2015-07-13 Thread Iago Toral
I think Chris did not review this one: Reviewed-by: Iago Toral Quiroga Iago On Fri, 2015-07-10 at 11:44 -0700, Matt Turner wrote: > BEGIN_BATCH() and ADVANCE_BATCH() will contain "do {" and "} while (0)" > respectively to allow declaring local variables used by intervening > OUT_BATCH macros. A

Re: [Mesa-dev] [PATCH] nvc0: fix geometry program revalidation of clipping params

2015-07-13 Thread Samuel Pitoiset
What piglit test does this fix? On Sat, Jul 11, 2015 at 7:13 PM, Ilia Mirkin wrote: > Signed-off-by: Ilia Mirkin > Cc: mesa-sta...@lists.freedesktop.org > --- > > Even though in practice a geometry program will never be using UCP's, > we still were revalidating (aka recompiling) the program whe