Re: [Mesa-dev] [glsl] indvar in ir_loop

2013-10-25 Thread Liu Xin
Ian, I am sure I comes across trouble for the following code. (function main (signature void (parameters ) ( (loop ((declare () int i@0x8d19434)) ((constant int (0)) ) ((constant int (32)) ) ((constant int (1)) ) ( (call foo ((var_ref sampler2d@0x8eef134) (var_ref

Re: [Mesa-dev] [PATCH 00/18] Implement GLX_MESA_query_renderer

2013-10-25 Thread Dave Airlie
Do either of you guys plan to implement support for this extension? The value to developers is obviously increased if more drivers support the extension. This extension was born from feedback that I received from people at FOSDEM and from various game developers at Game Developer

Re: [Mesa-dev] [PATCH] R600: Make sure OQAP defs and uses happen in the same clause

2013-10-25 Thread Vincent Lejeune
This patch should work when checking than no OQAP is used before beeing queued, assuming that a value in OQAP is consumed and cannot be read twice. However I'm not sure I cover all LDS instructions that queues a value, I only use LDS_RET_READ in switch case. Vincent - Mail original -

Re: [Mesa-dev] [PATCH] i965: Make fs gl_PrimitiveID input work even when there's no gs.

2013-10-25 Thread Paul Berry
On 23 October 2013 10:51, Eric Anholt e...@anholt.net wrote: Paul Berry stereotype...@gmail.com writes: When a geometry shader is present, the fragment shader gl_PrimitiveID input acts like an ordinary varying, receiving data from the gs gl_PrimitiveID output. When there's no geometry

[Mesa-dev] [PATCH v2] i965: Make fs gl_PrimitiveID input work even when there's no gs.

2013-10-25 Thread Paul Berry
When a geometry shader is present, the fragment shader gl_PrimitiveID input acts like an ordinary varying, receiving data from the gs gl_PrimitiveID output. When there's no geometry shader, we have to ask the fixed function SF hardware to provide the primitive ID to the fragment shader instead.

[Mesa-dev] [Bug 34495] Selecting objects in Blender 2.56 slow due the software gl_select mode

2013-10-25 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=34495 Alex Deucher ag...@yahoo.com changed: What|Removed |Added Assignee|dri-devel@lists.freedesktop

Re: [Mesa-dev] [PATCH] graw: add a test rendering a huge triangle

2013-10-25 Thread Jose Fonseca
Looks good. A future improvement could be querying PIPE_CAP_MAX_TEXTURE_2D_LEVELS instead of using a constant width/height. Jose - Original Message - Used to test rasterization, because we often breakdown on subdivision of triangles with long edges. Signed-off-by: Zack Rusin

Re: [Mesa-dev] [PATCH] mesa: Update MESA_INFO to eliminate error

2013-10-25 Thread Brian Paul
On 10/24/2013 01:13 PM, Courtney Goeltzenleuchter wrote: If a user set MESA_INFO and the OpenGL application uses a 3.0 or later context then the MESA_INFO debug output will have an error when it queries for extensions using the deprecated enum GL_EXTENSIONS. Passing context argument allows code

[Mesa-dev] [Bug 70864] New: classic drivers needlessly link to libdrm_intel / libdrm_nouveau / libdrm_radeon

2013-10-25 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=70864 Priority: medium Bug ID: 70864 Assignee: mesa-dev@lists.freedesktop.org Summary: classic drivers needlessly link to libdrm_intel / libdrm_nouveau / libdrm_radeon Severity:

[Mesa-dev] [Bug 70864] classic drivers needlessly link to libdrm_intel / libdrm_nouveau / libdrm_radeon

2013-10-25 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=70864 --- Comment #1 from Fabio Pedretti fabio@libero.it --- It looks every classic driver (including swrast) now includes all the classic drivers, they are more or less a copy of mesa_dri_drivers.so. -- You are receiving this mail because: You

[Mesa-dev] [Bug 69437] Composite Bypass no longer works

2013-10-25 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=69437 U. Artie Eoff ullysses.a.e...@intel.com changed: What|Removed |Added Status|RESOLVED|VERIFIED ---

[Mesa-dev] [Bug 70864] classic drivers needlessly link to libdrm_intel / libdrm_nouveau / libdrm_radeon

2013-10-25 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=70864 Matt Turner matts...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED

[Mesa-dev] [Bug 70864] classic drivers needlessly link to libdrm_intel / libdrm_nouveau / libdrm_radeon

2013-10-25 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=70864 --- Comment #3 from Fabio Pedretti fabio@libero.it --- Thanks but it doesn't look they are hardlinks anyway, the md5sum all differ, also their size is slightly different. -- You are receiving this mail because: You are the assignee for the

[Mesa-dev] [Bug 34495] Selecting objects in Blender 2.56 slow due the software gl_select mode

2013-10-25 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=34495 --- Comment #74 from hapoofesg...@goingon.ir --- S(In reply to comment #73) (In reply to comment #71) (In reply to comment #70) I wonder if the fix has been committed? I am using Debian testing with the mesa 9.1-7 package provided in the

[Mesa-dev] [Bug 70864] classic drivers needlessly link to libdrm_intel / libdrm_nouveau / libdrm_radeon

2013-10-25 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=70864 --- Comment #4 from Johannes Obermayr johannesoberm...@gmx.de --- (In reply to comment #2) The point of mega drivers was to link all of the (classic) drivers into a single file. ... to waste memory on runtime if you make use of packages

[Mesa-dev] [PATCH] llvmpipe: fix bogus layer clamping in setup

2013-10-25 Thread sroland
From: Roland Scheidegger srol...@vmware.com The layer coming from GS needs to be clamped (not sure if that's actually the correct error behavior but we need something) as the number can be higher than the amount of layers in the fb. However, this code was using the layer calculation from the

[Mesa-dev] [Bug 70864] classic drivers needlessly link to libdrm_intel / libdrm_nouveau / libdrm_radeon

2013-10-25 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=70864 --- Comment #5 from Matt Turner matts...@gmail.com --- (In reply to comment #3) Thanks but it doesn't look they are hardlinks anyway, the md5sum all differ, also their size is slightly different. Strange, that's not what I see on my system:

Re: [Mesa-dev] [PATCH v2 06/14] glsl: Add built-in functions and constants required for ARB_shader_atomic_counters.

2013-10-25 Thread Ian Romanick
Reviewed-by: Ian Romanick ian.d.roman...@intel.com On 10/01/2013 07:15 PM, Francisco Jerez wrote: v2: Represent atomics as GLSL intrinsics. --- src/glsl/builtin_functions.cpp | 58 + src/glsl/builtin_variables.cpp | 15 +++

Re: [Mesa-dev] [PATCH 02/14] glsl: Add type predicate to check whether a type contains any opaque types.

2013-10-25 Thread Ian Romanick
Reviewed-by: Ian Romanick ian.d.roman...@intel.com On 10/01/2013 07:15 PM, Francisco Jerez wrote: And use it to forbid comparisons of opaque operands. According to the GL 4.2 specification: Except for array indexing, structure member selection, and parentheses, opaque variables are not

Re: [Mesa-dev] [PATCH 00/18] Implement GLX_MESA_query_renderer

2013-10-25 Thread Ian Romanick
On 10/25/2013 03:20 AM, Dave Airlie wrote: Do either of you guys plan to implement support for this extension? The value to developers is obviously increased if more drivers support the extension. This extension was born from feedback that I received from people at FOSDEM and from various

Re: [Mesa-dev] Mesa (master): glx: Propagate failures from SendMakeCurrentRequest where possible

2013-10-25 Thread Ian Romanick
On 10/08/2013 10:24 AM, Adam Jackson wrote: Module: Mesa Branch: master Commit: d101204c23ba2f593881ede357309f3924cd URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d101204c23ba2f593881ede357309f3924cd Author: Adam Jackson a...@redhat.com Date: Fri Oct 4 09:25:51 2013

Re: [Mesa-dev] [PATCH] nv50: implement multisample textures

2013-10-25 Thread Emil Velikov
On 21/10/13 23:23, Bryan Cain wrote: This is a port of 4da54c91d24da (nvc0: implement multisample textures) to nv50. When coupled with the patch to only report 16 texture samplers (to fix crashes), all of the Piglit tests in spec/arb_texture_multisample pass. Hello Bryan, Big thanks for

[Mesa-dev] [PATCH] glx: Fix return value from indirect_bind_context

2013-10-25 Thread Adam Jackson
_XReply returns 1 on success, but indirect_bind_context returns 0 on success. Signed-off-by: Adam Jackson a...@redhat.com --- src/glx/indirect_glx.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/glx/indirect_glx.c b/src/glx/indirect_glx.c index d27b019..28b8cd0

[Mesa-dev] [PATCH 1/3] gallium/auxiliary/indices: add start param

2013-10-25 Thread Rob Clark
From: Rob Clark robcl...@freedesktop.org Add 'start' parameter to generator/translator. Signed-off-by: Rob Clark robcl...@freedesktop.org --- src/gallium/auxiliary/indices/u_indices.c | 6 -- src/gallium/auxiliary/indices/u_indices.h | 4 +++-

[Mesa-dev] [PATCH 0/3] Add u_primconvert front-end to u_indices

2013-10-25 Thread Rob Clark
From: Rob Clark robcl...@freedesktop.org This patchset (compared to RFC I sent previously) changes u_primconvert to just be a front-end to the u_indices stuff. It handles binding/ restoring new index buffer state, etc. So driver using it just has to put this at the top of their pipe-draw_vbo():

[Mesa-dev] [PATCH 2/3] gallium/auxiliary/indices: add u_primconvert

2013-10-25 Thread Rob Clark
From: Rob Clark robcl...@freedesktop.org A convenient front end to indices generate/translate code, for emulating primitives which are not supported natively by the driver. This handles saving/restoring index buffer state, etc. Signed-off-by: Rob Clark robcl...@freedesktop.org ---

[Mesa-dev] [PATCH 3/3] freedreno: emulated unsupported primitive types

2013-10-25 Thread Rob Clark
From: Rob Clark robcl...@freedesktop.org Use u_primconvert to convert unsupported primitives into supported primitive plus index buffer. Signed-off-by: Rob Clark robcl...@freedesktop.org --- src/gallium/drivers/freedreno/a2xx/fd2_context.c | 24 ++-

Re: [Mesa-dev] [PATCH] glx: Fix return value from indirect_bind_context

2013-10-25 Thread Ian Romanick
On 10/25/2013 12:14 PM, Adam Jackson wrote: _XReply returns 1 on success, but indirect_bind_context returns 0 on success. Signed-off-by: Adam Jackson a...@redhat.com Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70486 Reviewed-and-tested-by: Ian Romanick ian.d.roman...@intel.com

Re: [Mesa-dev] [PATCH 6/9] mesa: Add a new GetTransformFeedbackVertexCount() driver hook.

2013-10-25 Thread Kenneth Graunke
On 10/21/2013 05:55 PM, Eric Anholt wrote: [snip] This interface means synchronizing with the GPU, which sucks when we have the ability to actually do DTFB in the hardware pipeline (Indirect Parameter Enable of 3DPRIMITIVE). It's not that simple. The 3DPRIMITIVE indirect registers require you

Re: [Mesa-dev] [PATCH 6/9] mesa: Add a new GetTransformFeedbackVertexCount() driver hook.

2013-10-25 Thread Kenneth Graunke
On 10/22/2013 04:30 AM, Marek Olšák wrote: On Fri, Oct 18, 2013 at 8:09 AM, Kenneth Graunke kenn...@whitecape.org wrote: DrawTransformFeedback() needs to obtain the number of vertices written to a particular stream during the last Begin/EndTransformFeedback block. The new driver hook returns

Re: [Mesa-dev] [PATCH] llvmpipe: fix bogus layer clamping in setup

2013-10-25 Thread Brian Paul
On 10/25/2013 10:14 AM, srol...@vmware.com wrote: From: Roland Scheidegger srol...@vmware.com The layer coming from GS needs to be clamped (not sure if that's actually the correct error behavior but we need something) as the number can be higher than the amount of layers in the fb. However,

Re: [Mesa-dev] [PATCH] glx: Fix return value from indirect_bind_context

2013-10-25 Thread Adam Jackson
On Fri, 2013-10-25 at 12:59 -0700, Ian Romanick wrote: Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70486 Reviewed-and-tested-by: Ian Romanick ian.d.roman...@intel.com Pushed, thanks and sorry. - ajax ___ mesa-dev mailing list

Re: [Mesa-dev] [PATCH] i965/fs: Drop no-op shifts by 0.

2013-10-25 Thread Eric Anholt
Erik Faye-Lund kusmab...@gmail.com writes: Why is this tagged as i965/fs, when everything seems to happen in the glsl-optimizer? On Thu, Oct 24, 2013 at 5:53 PM, Eric Anholt e...@anholt.net wrote: I noticed this in a shader in Unigine Heaven that was spilling. While it doesn't really

Re: [Mesa-dev] [PATCH] llvmpipe: fix bogus layer clamping in setup

2013-10-25 Thread Roland Scheidegger
Am 25.10.2013 22:33, schrieb Brian Paul: On 10/25/2013 10:14 AM, srol...@vmware.com wrote: From: Roland Scheidegger srol...@vmware.com The layer coming from GS needs to be clamped (not sure if that's actually the correct error behavior but we need something) as the number can be higher than

Re: [Mesa-dev] [PATCH] nv50: implement multisample textures

2013-10-25 Thread Christoph Bumiller
On 25.10.2013 20:35, Emil Velikov wrote: On 21/10/13 23:23, Bryan Cain wrote: This is a port of 4da54c91d24da (nvc0: implement multisample textures) to nv50. When coupled with the patch to only report 16 texture samplers (to fix crashes), all of the Piglit tests in

Re: [Mesa-dev] [PATCH 1/2] gallium: add PIPE_CAP_MIXED_FRAMEBUFFER_SIZES

2013-10-25 Thread Ilia Mirkin
Thanks, Marek. Could someone with commit access pick this up? Let me know if you'd like me to reformat/resend/create a git tree/whatever. -ilia On Sun, Oct 13, 2013 at 9:16 AM, Marek Olšák mar...@gmail.com wrote: For the series: Reviewed-by: Marek Olšák marek.ol...@amd.com Marek On Sun,

Re: [Mesa-dev] [PATCH] nv50: implement multisample textures

2013-10-25 Thread Bryan Cain
On 10/25/2013 01:35 PM, Emil Velikov wrote: On 21/10/13 23:23, Bryan Cain wrote: This is a port of 4da54c91d24da (nvc0: implement multisample textures) to nv50. When coupled with the patch to only report 16 texture samplers (to fix crashes), all of the Piglit tests in

Re: [Mesa-dev] [PATCH 6/9] mesa: Add a new GetTransformFeedbackVertexCount() driver hook.

2013-10-25 Thread Eric Anholt
Kenneth Graunke kenn...@whitecape.org writes: On 10/21/2013 05:55 PM, Eric Anholt wrote: [snip] This interface means synchronizing with the GPU, which sucks when we have the ability to actually do DTFB in the hardware pipeline (Indirect Parameter Enable of 3DPRIMITIVE). It's not that

Re: [Mesa-dev] [PATCH v2] i965: Make fs gl_PrimitiveID input work even when there's no gs.

2013-10-25 Thread Eric Anholt
Paul Berry stereotype...@gmail.com writes: When a geometry shader is present, the fragment shader gl_PrimitiveID input acts like an ordinary varying, receiving data from the gs gl_PrimitiveID output. When there's no geometry shader, we have to ask the fixed function SF hardware to provide

[Mesa-dev] [PATCH 3/3] i965/fs: Drop no-op shifts involving 0.

2013-10-25 Thread Eric Anholt
I noticed this in a shader in Unigine Heaven that was spilling. While it doesn't really reduce register pressure, it shaves a few instructions anyway (7955 - 7882). v2: Fix turning 0 x into x instead of 0 (caught by Erik Faye-Lund). --- src/glsl/opt_algebraic.cpp | 10 ++ 1 file

[Mesa-dev] [PATCH 2/3] glsl: Use ir_builder more in opt_algebraic.

2013-10-25 Thread Eric Anholt
While ir_builder is slightly less efficient, we're only increasing the work when there's actual optimization being done, and it's way more readable code. --- src/glsl/opt_algebraic.cpp | 40 ++-- 1 file changed, 10 insertions(+), 30 deletions(-) diff --git

[Mesa-dev] [PATCH 1/3] glsl: Move common code out of opt_algebraic's handle_expression().

2013-10-25 Thread Eric Anholt
Matt and I had each screwed up these common required patterns recently, in ways that wouldn't have been noticed for a long time if not for code review. Just enforce it in the caller so that we don't rely on code review catching these bugs. --- src/glsl/opt_algebraic.cpp | 117

Re: [Mesa-dev] [PATCH] nv50: implement multisample textures

2013-10-25 Thread Bryan Cain
On 10/25/2013 04:11 PM, Christoph Bumiller wrote: On 25.10.2013 20:35, Emil Velikov wrote: On 21/10/13 23:23, Bryan Cain wrote: This is a port of 4da54c91d24da (nvc0: implement multisample textures) to nv50. When coupled with the patch to only report 16 texture samplers (to fix crashes),

Re: [Mesa-dev] [PATCH] glsl: Move error message inside validation check reducing duplicate message handling

2013-10-25 Thread Paul Berry
On 17 October 2013 04:42, Timothy Arceri t_arc...@yahoo.com.au wrote: --- src/glsl/ast_to_hir.cpp | 27 ++- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp index dfa32d9..f96ed53 100644 ---

Re: [Mesa-dev] [PATCH] nv50: implement multisample textures

2013-10-25 Thread Christoph Bumiller
On 25.10.2013 23:51, Bryan Cain wrote: On 10/25/2013 04:11 PM, Christoph Bumiller wrote: On 25.10.2013 20:35, Emil Velikov wrote: On 21/10/13 23:23, Bryan Cain wrote: This is a port of 4da54c91d24da (nvc0: implement multisample textures) to nv50. When coupled with the patch to only report

Re: [Mesa-dev] [PATCH] nv50: implement multisample textures

2013-10-25 Thread Bryan Cain
On 10/25/2013 05:05 PM, Christoph Bumiller wrote: On 25.10.2013 23:51, Bryan Cain wrote: On 10/25/2013 04:11 PM, Christoph Bumiller wrote: On 25.10.2013 20:35, Emil Velikov wrote: On 21/10/13 23:23, Bryan Cain wrote: This is a port of 4da54c91d24da (nvc0: implement multisample textures) to

Re: [Mesa-dev] [PATCH 6/9] mesa: Add a new GetTransformFeedbackVertexCount() driver hook.

2013-10-25 Thread Marek Olšák
On Fri, Oct 25, 2013 at 10:28 PM, Kenneth Graunke kenn...@whitecape.org wrote: On 10/22/2013 04:30 AM, Marek Olšák wrote: On Fri, Oct 18, 2013 at 8:09 AM, Kenneth Graunke kenn...@whitecape.org wrote: DrawTransformFeedback() needs to obtain the number of vertices written to a particular

Re: [Mesa-dev] [PATCH 1/2] gallium: add PIPE_CAP_MIXED_FRAMEBUFFER_SIZES

2013-10-25 Thread Marek Olšák
I'll do it in a moment. Marek On Fri, Oct 25, 2013 at 11:25 PM, Ilia Mirkin imir...@alum.mit.edu wrote: Thanks, Marek. Could someone with commit access pick this up? Let me know if you'd like me to reformat/resend/create a git tree/whatever. -ilia On Sun, Oct 13, 2013 at 9:16 AM, Marek

Re: [Mesa-dev] [PATCH] R600: Expand vector FSQRT ops

2013-10-25 Thread Aaron Watry
Reviewed-by: Aaron Watry awa...@gmail.com I have tested this on a Radeon 5400 (Cedar), and I just sent a few generated tests to the piglit list. --Aaron On Wed, Oct 23, 2013 at 6:28 PM, Tom Stellard t...@stellard.net wrote: From: Tom Stellard thomas.stell...@amd.com ---

Re: [Mesa-dev] Ivybridge support for ARB_transform_feedback2

2013-10-25 Thread Ian Romanick
On 10/17/2013 11:09 PM, Kenneth Graunke wrote: Here's my implementation of ARB_transform_feedback2. I believe it's complete; it passes all of our Piglit tests and a lot of Intel's oglconform tests. This should work out of the box on Ivybridge and Baytrail. It won't work on Haswell at the

Re: [Mesa-dev] [PATCH 2/2] implement NV_vdpau_interop v3

2013-10-25 Thread Marek Olšák
On Sun, Oct 20, 2013 at 11:57 AM, Christian König deathsim...@vodafone.de wrote: Hi Marek, I've just send out a v6 of the patch, please take a second look. Most things are fixed now, but there are still a couple of open issues: 3) There should also probably be some checking for

[Mesa-dev] [PATCH V2 00/12] Implement GL_ARB_sample_shading on Intel hardware

2013-10-25 Thread Anuj Phogat
Patches listed below implement the GL_ARB_sample_shading extension on Intel hardware = gen6. I verified the implementation with a number of piglit tests, currently under review on piglit mailing list. Observed no piglit, gles3 CTS regressions with these patches on SNB, IVB HSW. These patches can

[Mesa-dev] [PATCH V2 01/12] mesa: Add infrastructure for GL_ARB_sample_shading

2013-10-25 Thread Anuj Phogat
This patch implements the common support code required for the GL_ARB_sample_shading extension. V2: Move GL_ARB_sample_shading to ARB extension list. Signed-off-by: Anuj Phogat anuj.pho...@gmail.com Reviewed-by: Ian Romanick i...@freedesktop.org Reviewed-by: Ken Graunke kenn...@whitecape.org ---

[Mesa-dev] [PATCH V2 02/12] mesa: Add new functions and enums required by GL_ARB_sample_shading

2013-10-25 Thread Anuj Phogat
New functions added by GL_ARB_sample_shading: glMinSampleShadingARB() New enums: GL_SAMPLE_SHADING_ARB GL_MIN_SAMPLE_SHADING_VALUE_ARB V2: Update comments. Create new GL4x.xml. Remove redundant code in get.c. Update the API_XML list in Makefile.am. Add

[Mesa-dev] [PATCH V2 03/12] mesa: Pass number of samples as a program state variable

2013-10-25 Thread Anuj Phogat
Number of samples will be required in fragment shader program by new GLSL builtin uniform gl_NumSamples. V2: Use state.numsamples in place of state.num.samples Use _NEW_BUFFERS flag in place of _NEW_MULTISAMPLE Signed-off-by: Anuj Phogat anuj.pho...@gmail.com Reviewed-by: Ian Romanick

[Mesa-dev] [PATCH 04/12] mesa: Add a helper function _mesa_get_min_invocations_per_fragment()

2013-10-25 Thread Anuj Phogat
Thsi function is used to test if we need to do per sample shading or per fragment shading. Signed-off-by: Anuj Phogat anuj.pho...@gmail.com --- src/mesa/program/program.c | 31 +++ src/mesa/program/program.h | 3 +++ 2 files changed, 34 insertions(+) diff --git

[Mesa-dev] [PATCH V2 05/12] glsl: Add new builtins required by GL_ARB_sample_shading

2013-10-25 Thread Anuj Phogat
New builtins added by GL_ARB_sample_shading: in vec2 gl_SamplePosition in int gl_SampleID in int gl_NumSamples out int gl_SampleMask[] V2: - Use SWIZZLE_ for STATE_NUM_SAMPLES. - Use result.samplemask in arb_output_attrib_string. - Add comment to explain the size of gl_SampleMask[]

[Mesa-dev] [PATCH 06/12] i965: Don't do vector splitting for ir_var_system_value

2013-10-25 Thread Anuj Phogat
This is required while adding builtin system value vec{2, 3, 4} variables. For example: (declare (sys) vec2 gl_SamplePosition) Without this patch above glsl ir splits in to: (declare (temporary) float gl_SamplePosition_x) (declare (temporary) float gl_SamplePosition_y) Signed-off-by: Anuj Phogat

[Mesa-dev] [PATCH V2 07/12] i965: Add FS backend for builtin gl_SamplePosition

2013-10-25 Thread Anuj Phogat
V2: - Update comments. - Make changes to support simd16 mode. - Add compute_pos_offset variable in brw_wm_prog_key. - Add variable uses_omask in brw_wm_prog_data. Signed-off-by: Anuj Phogat anuj.pho...@gmail.com --- src/mesa/drivers/dri/i965/brw_context.h | 1 +

[Mesa-dev] [PATCH V2 08/12] i965: Add FS backend for builtin gl_SampleID

2013-10-25 Thread Anuj Phogat
V2: - Update comments - Make changes to support simd16 mode. - Add compute_sample_id variables in brw_wm_prog_key - Add a special backend instruction to compute sample_id. Signed-off-by: Anuj Phogat anuj.pho...@gmail.com --- src/mesa/drivers/dri/i965/brw_defines.h| 1 +

[Mesa-dev] [PATCH V2 09/12] i965: Add FS backend for builtin gl_SampleMask[]

2013-10-25 Thread Anuj Phogat
V2: - Update comments - Use fs_reg(0x) in AND instruction to get the 16 bit sample_mask. - Add a special backend instructions to compute sample_mask. - Add a new variable uses_omask in brw_wm_prog_data. Signed-off-by: Anuj Phogat anuj.pho...@gmail.com ---

[Mesa-dev] [PATCH V2 10/12] i965/gen6: Enable the features required for GL_ARB_sample_shading

2013-10-25 Thread Anuj Phogat
- Enable GEN6_WM_MSDISPMODE_PERSAMPLE, GEN6_WM_POSOFFSET_SAMPLE, GEN6_WM_OMASK_TO_RENDER_TARGET as per extension's specification. - Only enable one of GEN6_WM_8_DISPATCH_ENABLE or GEN6_WM_16_DISPATCH_ENABLE when GEN6_WM_MSDISPMODE_PERSAMPLE is enabled. Refer SNB PRM Vol. 2, Part 1, Page 279

[Mesa-dev] [PATCH V2 11/12] i965/gen7: Enable the features required for GL_ARB_sample_shading

2013-10-25 Thread Anuj Phogat
- Enable GEN7_WM_MSDISPMODE_PERSAMPLE, GEN7_WM_POSOFFSET_SAMPLE, GEN7_WM_OMASK_TO_RENDER_TARGET as per extension's specification. - Only enable one of GEN7_WM_8_DISPATCH_ENABLE or GEN7_WM_16_DISPATCH_ENABLE when GEN7_WM_MSDISPMODE_PERSAMPLE is enabled. Refer IVB PRM Vol. 2, Part 1, Page 288

[Mesa-dev] [PATCH 12/12] i965: Enable ARB_sample_shading on intel hardware = gen6

2013-10-25 Thread Anuj Phogat
Signed-off-by: Anuj Phogat anuj.pho...@gmail.com Reviewed-by: Paul Berry stereotype...@gmail.com Reviewed-by: Ken Graunke kenn...@whitecape.org --- src/mesa/drivers/dri/i965/intel_extensions.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/drivers/dri/i965/intel_extensions.c

Re: [Mesa-dev] [PATCH 6/9] mesa: Add a new GetTransformFeedbackVertexCount() driver hook.

2013-10-25 Thread Kenneth Graunke
On 10/25/2013 03:26 PM, Marek Olšák wrote: [snip] At least for Ivybridge, I think I want this software path 100% of the time. We may want to remove the stall on Haswell as a later optimization. I'd like to have a dedicated flag for this fallback like we have

Re: [Mesa-dev] [PATCH 0/4] GL_OES_get_program_binary extension

2013-10-25 Thread Matt Turner
On Thu, Oct 24, 2013 at 1:28 AM, Tapani Pälli tapani.pa...@intel.com wrote: Hello; These patches introduce GL_OES_get_program_binary extension support for Mesa. There are already stub functions for this extension, patches add the missing functionality part. This is based on the 'more

Re: [Mesa-dev] [PATCH 3/3] i965/fs: Drop no-op shifts involving 0.

2013-10-25 Thread Matt Turner
On Fri, Oct 25, 2013 at 2:49 PM, Eric Anholt e...@anholt.net wrote: I noticed this in a shader in Unigine Heaven that was spilling. While it doesn't really reduce register pressure, it shaves a few instructions anyway (7955 - 7882). v2: Fix turning 0 x into x instead of 0 (caught by Erik

Re: [Mesa-dev] [PATCH 1/3] glsl: Move common code out of opt_algebraic's handle_expression().

2013-10-25 Thread Kenneth Graunke
On 10/25/2013 02:49 PM, Eric Anholt wrote: Matt and I had each screwed up these common required patterns recently, in ways that wouldn't have been noticed for a long time if not for code review. Just enforce it in the caller so that we don't rely on code review catching these bugs. ---

[Mesa-dev] [PATCH v2 1/8] mesa: Separate transform feedback object initialization from allocation.

2013-10-25 Thread Kenneth Graunke
Both Gallium and i965 subclass gl_transform_feedback_object, which requires implementing a custom NewTransformFeedback hook. Creating a helper function to initialize the fields avoids code duplication and divergence. Signed-off-by: Kenneth Graunke kenn...@whitecape.org Cc: Eric Anholt

[Mesa-dev] [PATCH v2 2/8] st/mesa: Use the new _mesa_init_transform_feedback_object() helper.

2013-10-25 Thread Kenneth Graunke
This picks up a missing obj-EverBound = GL_FALSE line, and will catch any new fields that get added in the future. Signed-off-by: Kenneth Graunke kenn...@whitecape.org Cc: Marek Olšák mar...@gmail.com --- src/mesa/state_tracker/st_cb_xformfb.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[Mesa-dev] [PATCH v2 3/8] i965: Create a new brw_transform_feedback_object subclass.

2013-10-25 Thread Kenneth Graunke
This adds the basic driver hooks to allocate/free the brw variant. It doesn't contain any additional information yet, but it will soon. v2: Use the new _mesa_init_transform_feedback_object helper function (requested by Eric and Ian). Signed-off-by: Kenneth Graunke kenn...@whitecape.org ---

[Mesa-dev] [PATCH v2 4/8] i965: Implement Pause/ResumeTransformfeedback driver hooks on Gen7+.

2013-10-25 Thread Kenneth Graunke
The ARB_transform_feedback2 extension introduces the ability to pause and resume transform feedback sessions. Although only one can be active at a time, it's possible to switch between multiple transform feedback objects while paused. In order to facilitate this, we need to save/restore the

[Mesa-dev] [PATCH v2 5/8] mesa: Add a new GetTransformFeedbackVertexCount() driver hook.

2013-10-25 Thread Kenneth Graunke
DrawTransformFeedback() needs to obtain the number of vertices written to a particular stream during the last Begin/EndTransformFeedback block. The new driver hook returns exactly that information. Gallium drivers already implement this by passing the transform feedback object to the drawing

[Mesa-dev] [PATCH v2 6/8] i965: Mark brw_draw_prims tfb_vertcount parameter as unused.

2013-10-25 Thread Kenneth Graunke
Renaming it makes it obvious that it isn't used, and the assertion verifies that the VBO module never passes us such an object. Signed-off-by: Kenneth Graunke kenn...@whitecape.org Reviewed-by: Ian Romanick ian.d.roman...@intel.com Reviewed-by: Eric Anholt e...@anholt.net ---

[Mesa-dev] [PATCH v2 7/8] i965: Implement glDrawTransformFeedback().

2013-10-25 Thread Kenneth Graunke
Implementing the GetTransformFeedbackVertexCount() driver hook allows the VBO module to call us with the right number of vertices. The hardware doesn't directly count the number of vertices written by SOL, so we instead use the SO_NUM_PRIMS_WRITTEN(n) counters and multiply by the number of