Re: [Mesa-dev] [PATCH 2/4] glsl: Switch from the deprecated YYLEX_PARAM to %lex-param.

2013-07-29 Thread Matt Turner
On Mon, Jul 29, 2013 at 8:44 PM, Nikita Malyavin wrote: > Kenneth, maybe it's better to mark _mesa_glsl_lex as inline? The compiler will figure it out. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinf

Re: [Mesa-dev] [PATCH] R600/SI: Add pattern for fp_to_uint

2013-07-29 Thread Michel Dänzer
On Die, 2013-07-30 at 03:45 +0200, Marek Olšák wrote: > This fixes the F2U opcode for the Mesa driver. > > Signed-off-by: Marek Olšák Reviewed-by: Michel Dänzer Do you have LLVM SVN write access? -- Earthling Michel Dänzer | http://www.amd.com Libre software enth

Re: [Mesa-dev] [PATCH 2/4] glsl: Switch from the deprecated YYLEX_PARAM to %lex-param.

2013-07-29 Thread Nikita Malyavin
Kenneth, maybe it's better to mark _mesa_glsl_lex as inline? 2013/7/30 Kenneth Graunke > YYLEX_PARAM is no longer supported as of Bison 3.0. Instead, the Bison > developers recommend using %lex-param. > > %lex-param takes a type and variable name, similar to %parse-param, > so you can't pass a

[Mesa-dev] [PATCH] Check for normalized when using BGRA vertex arrays

2013-07-29 Thread Corey Richardson
Previously, the piglit test ARB_vertex_array_bgra/api-errors failed because update_array did not check if normalized == GL_FALSE, and error if so. Signed-off-by: Corey Richardson --- src/mesa/main/varray.c | 8 1 file changed, 8 insertions(+) diff --git a/src/mesa/main/varray.c b/src/m

Re: [Mesa-dev] [Bug 67120] Dota 2 crashes sporadically on Intel/Mesa git (full backtrace with mesa symbols included)

2013-07-29 Thread gracebie
first i will suggest you to follow these steps - Update your system - Start game without Autoconfig option - Launch game with safe options and so on... I also have found a presentation tutorial that will resolve your problem You are only required to follow the steps mentioned in the tutoria

[Mesa-dev] [PATCH v2] i915, i965: Fix memory leak in intel_miptree_create_for_bo.

2013-07-29 Thread Vinson Lee
Fixes "Resource leak" defects reported by coverity. Signed-off-by: Vinson Lee --- src/mesa/drivers/dri/i915/intel_mipmap_tree.c | 4 +++- src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i915/intel_mipmap_

Re: [Mesa-dev] [PATCH] egl/dri2: support for creating images out of dma buffers

2013-07-29 Thread Pohjolainen, Topi
On Mon, Jul 29, 2013 at 11:59:08AM -0700, Chad Versace wrote: > On 07/25/2013 11:17 PM, Topi Pohjolainen wrote: > >v2: > >- upon success close the given file descriptors > > > >v3: > >- use specific entry for dma buffers instead of the basic for > > primes, and enable the extension bas

Re: [Mesa-dev] [Mesa-stable] [PATCH] i965/vs: Put lod parameter in the correct place for Gen4

2013-07-29 Thread Kenneth Graunke
On 07/29/2013 12:05 PM, Chris Forbes wrote: This was never visible before due to the bogus sampler state pointer. Fixes remaining vertex texturing breakage on Gen4. Signed-off-by: Chris Forbes Cc: mesa-sta...@lists.freedesktop.org --- src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 2 +- 1

[Mesa-dev] [Bug 67516] glTexStorage*() functions don't work properly with proxy textures

2013-07-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=67516 --- Comment #3 from Mikko Juola --- Created attachment 83262 --> https://bugs.freedesktop.org/attachment.cgi?id=83262&action=edit patch 3/3 -- You are receiving this mail because: You are the assignee for the bug.

[Mesa-dev] [Bug 67516] glTexStorage*() functions don't work properly with proxy textures

2013-07-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=67516 --- Comment #2 from Mikko Juola --- Created attachment 83261 --> https://bugs.freedesktop.org/attachment.cgi?id=83261&action=edit patch 2/3 -- You are receiving this mail because: You are the assignee for the bug.

[Mesa-dev] [Bug 67516] glTexStorage*() functions don't work properly with proxy textures

2013-07-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=67516 --- Comment #1 from Mikko Juola --- Created attachment 83260 --> https://bugs.freedesktop.org/attachment.cgi?id=83260&action=edit patch 1/3 -- You are receiving this mail because: You are the assignee for the bug.

[Mesa-dev] [Bug 67516] New: glTexStorage*() functions don't work properly with proxy textures

2013-07-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=67516 Priority: medium Bug ID: 67516 Assignee: mesa-dev@lists.freedesktop.org Summary: glTexStorage*() functions don't work properly with proxy textures Severity: normal Classi

[Mesa-dev] [PATCH] R600/SI: Add pattern for fp_to_uint

2013-07-29 Thread Marek Olšák
This fixes the F2U opcode for the Mesa driver. Signed-off-by: Marek Olšák --- lib/Target/R600/SIInstructions.td | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/Target/R600/SIInstructions.td b/lib/Target/R600/SIInstructions.td index 0d50c5d..c392238 100644 --- a/lib/Ta

[Mesa-dev] [PATCHv2 2/2] nv50: allow forcing PMPEG use, for ease of testing

2013-07-29 Thread Ilia Mirkin
This also allows people who don't want to install the binary blobs required for VP2 to still get MPEG decoding. Signed-off-by: Ilia Mirkin --- v1 -> v2: - switched to using debug_get_bool_option and NOUVEAU prefix, for which there is some precedent src/gallium/drivers/nv50/nv50_context.

[Mesa-dev] PATCH: R600: Add support for 64-bit loads and stores

2013-07-29 Thread Tom Stellard
Hi, The attached patches add support for 64-bit loads and stores as well as 64-bit kernel arguments. -Tom >From c4c7d934e951e73f72d998a9f1af0a523d83bbed Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Tue, 23 Jul 2013 07:52:50 -0700 Subject: [PATCH 1/2] R600: Use 64-bit alignment for 64-bit ke

Re: [Mesa-dev] [PATCH 1/4] glsl: Change the lexer's namespace.

2013-07-29 Thread Matt Turner
On Mon, Jul 29, 2013 at 4:07 PM, Kenneth Graunke wrote: > Bison 3.0 removes the YYLEX_PARAM macro. In preparation for handling > this using %lex-param, the parser needs a wrapper function for the > actual Flex lex() function. Series is Reviewed-by: Matt Turner __

[Mesa-dev] [PATCH 2/2] nv50: allow forcing PMPEG use, for ease of testing

2013-07-29 Thread Ilia Mirkin
This also allows people who don't want to install the binary blobs required for VP2 to still get MPEG decoding. Signed-off-by: Ilia Mirkin --- src/gallium/drivers/nv50/nv50_context.c | 2 +- src/gallium/drivers/nv50/nv50_screen.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --

[Mesa-dev] [PATCH 1/2] nv30: hook up PMPEG support via nouveau_video, enables XvMC to work

2013-07-29 Thread Ilia Mirkin
It seems as though at least the NV44 expects the same format as VP2 does. But NV96 expects the format as currently done. Signed-off-by: Ilia Mirkin --- src/gallium/drivers/nouveau/nouveau_video.c | 43 + src/gallium/drivers/nouveau/nouveau_video.h | 2 ++ src/gallium

[Mesa-dev] [PATCH 4/4] intel_fbo: remove unused intel_renderbuffer hiz functions

2013-07-29 Thread Jordan Justen
We are now using functions that operate on the renderbuffer attachment to handle layered rendering. Signed-off-by: Jordan Justen --- src/mesa/drivers/dri/i965/intel_fbo.c | 20 src/mesa/drivers/dri/i965/intel_fbo.h |6 -- 2 files changed, 26 deletions(-) diff --gi

[Mesa-dev] [PATCH 3/4] i965 clear/draw: set renderbuffer attachment as needing depth resolve

2013-07-29 Thread Jordan Justen
Previously we would mark a renderbuffer as needing a depth resolve. But, to support layered rendering, we need to look at the attachment instead, since the attachment knows if layered rendering is being used. Signed-off-by: Jordan Justen --- src/mesa/drivers/dri/i965/brw_clear.c |3 ++- src/

[Mesa-dev] [PATCH 2/4] i965: add intel_renderbuffer_att_set_needs_depth_resolve

2013-07-29 Thread Jordan Justen
This function is needed to support layered rendering. With layered rendering, the attachment stores the state of whether layered rendering is being used. Signed-off-by: Jordan Justen --- src/mesa/drivers/dri/i965/intel_fbo.c | 15 +++ src/mesa/drivers/dri/i965/intel_fbo.h |3 ++

[Mesa-dev] [PATCH 1/4] i965: add intel_miptree_set_all_slices_need_depth_resolve

2013-07-29 Thread Jordan Justen
This function marks all slices of a renderbuffer at a particular level as needing a depth resolve. Signed-off-by: Jordan Justen --- src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 12 src/mesa/drivers/dri/i965/intel_mipmap_tree.h |4 2 files changed, 16 insertions(+) dif

[Mesa-dev] [PATCH 0/4] Mark slices for depth resolve with layered rendering

2013-07-29 Thread Jordan Justen
How does this sub-series look as an alternative to "[PATCH v2 12/13] intel_mipmap_tree: all layers need hiz resolves with layered rendering" Jordan Justen (4): i965: add intel_miptree_set_all_slices_need_depth_resolve i965: add intel_renderbuffer_att_set_needs_depth_resolve i965 clear/draw:

[Mesa-dev] [PATCH 3/4] mesa/program: Change the program parser's namespace.

2013-07-29 Thread Kenneth Graunke
Bison 3.0 removes the YYLEX_PARAM macro. In preparation for handling this using %lex-param, the parser needs a wrapper function for the actual Flex lex() function. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=67354 Signed-off-by: Kenneth Graunke Cc: mesa-sta...@lists.freedesktop.org Cc

[Mesa-dev] [PATCH 4/4] mesa/program: Switch from the deprecated YYLEX_PARAM to %lex-param.

2013-07-29 Thread Kenneth Graunke
YYLEX_PARAM is no longer supported as of Bison 3.0. Instead, the Bison developers recommend using %lex-param. %lex-param takes a type and variable name, similar to %parse-param, so you can't pass an arbitrary expression like state->scanner. But Flex insists on passing the actual scanner object,

[Mesa-dev] [PATCH 2/4] glsl: Switch from the deprecated YYLEX_PARAM to %lex-param.

2013-07-29 Thread Kenneth Graunke
YYLEX_PARAM is no longer supported as of Bison 3.0. Instead, the Bison developers recommend using %lex-param. %lex-param takes a type and variable name, similar to %parse-param, so you can't pass an arbitrary expression like state->scanner. But Flex insists on passing the actual scanner object,

[Mesa-dev] [PATCH 1/4] glsl: Change the lexer's namespace.

2013-07-29 Thread Kenneth Graunke
Bison 3.0 removes the YYLEX_PARAM macro. In preparation for handling this using %lex-param, the parser needs a wrapper function for the actual Flex lex() function. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=67354 Signed-off-by: Kenneth Graunke Cc: mesa-sta...@lists.freedesktop.org Cc

Re: [Mesa-dev] Request for update of commit proposed for stable branch

2013-07-29 Thread Carl Worth
Carl Worth writes: > I looked closer at the patch and it seems that it's fairly easy to > backport to the 9.1 branch as seen below. And looking at the mesa-stable@ list, I see that you already sent an identical backport. So I'll definitely apply that for now. -Carl pgpkZNXMjEbNh.pgp Descriptio

Re: [Mesa-dev] Request for update of commit proposed for stable branch

2013-07-29 Thread Carl Worth
Carl Worth writes: > I'm reviewing commits on the mesa master branch that are marked as > candidates for the stable branch, but have not been applied yet. > > The patch below (da33f9b919039442e9ab51f9b1d1c83a73607133) does not > currently apply cleanly to the 9.1 branch. > > If a similar patch is

Re: [Mesa-dev] [PATCH] glsl: Remove shader stage checking for extension handling.

2013-07-29 Thread Matt Turner
On Mon, Jul 29, 2013 at 10:55 AM, Kenneth Graunke wrote: > Fixes Piglit tests glslparsertest/glsl2/draw_buffers-05.vert and > ARB_draw_instanced/preprocessor/feature-macro-enabled.frag. Let's delete these tests too. I don't think they're useful. ___ mes

Re: [Mesa-dev] [PATCH] glsl: Remove shader stage checking for extension handling.

2013-07-29 Thread Kenneth Graunke
On 07/29/2013 10:55 AM, Kenneth Graunke wrote: Certain extensions only add functionality to particular shader stages. (For example, ARB_draw_instanced only adds variables to the vertex shader stage.) Previously, we only allowed such extensions to be enabled in the shader stages where they're use

Re: [Mesa-dev] [PATCH v3] build: unify mesa version by using a VERSION file

2013-07-29 Thread Chad Versace
On 07/25/2013 03:45 PM, Emil Velikov wrote: Rather than having to keep track of all the build systems and their respecitve definition of the mesa version, use a single top file VERSION. Every build system is responsible for reading/parsing the file and using it v2: * remove useless bulletpoint f

Re: [Mesa-dev] [PATCH] i965: Don't create a swrast context on ES2+.

2013-07-29 Thread Kristian Høgsberg
On Thu, Jul 25, 2013 at 11:31 AM, Kenneth Graunke wrote: > We already skip this for API_OPENGL_CORE; ES2+ is very similar. > The primary user of the swrast context is GL_SELECT and GL_FEEDBACK, > which have never existed in ES. > > This saves approximately 18MB of memory in GLBenchmark 2.7 Egypt (

Re: [Mesa-dev] Error building Mesa 32 bit version on Arch Linux

2013-07-29 Thread Kenneth Graunke
On 07/29/2013 11:57 AM, Chad Versace wrote: CC'ing Ken. Ken, these Archlinux users ran into the Bison problem. A quick and ugly hack is to do: #define YYLEX_PARAM state->scanner to #define scanner state->scanner I'm looking into how to do %lex-param properly. Looks like glcpp does it right

[Mesa-dev] [PATCH] i965/vs: Put lod parameter in the correct place for Gen4

2013-07-29 Thread Chris Forbes
This was never visible before due to the bogus sampler state pointer. Fixes remaining vertex texturing breakage on Gen4. Signed-off-by: Chris Forbes Cc: mesa-sta...@lists.freedesktop.org --- src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) dif

Re: [Mesa-dev] [PATCH] egl/dri2: support for creating images out of dma buffers

2013-07-29 Thread Chad Versace
On 07/25/2013 11:17 PM, Topi Pohjolainen wrote: v2: - upon success close the given file descriptors v3: - use specific entry for dma buffers instead of the basic for primes, and enable the extension based on the availability of the hook v4 (Chad): - use ARRAY_SIZE -

Re: [Mesa-dev] Error building Mesa 32 bit version on Arch Linux

2013-07-29 Thread Chad Versace
CC'ing Ken. Ken, these Archlinux users ran into the Bison problem. On 07/29/2013 12:23 AM, Laurent Carlier wrote: Le samedi 27 juillet 2013 18:03:44 Sandeep a écrit : Hi, When I try to build 32 bit Mesa on Arch Linux, I get the following error: /usr/bin/mkdir -p ../../src/glsl/glcpp /usr/bin

Re: [Mesa-dev] [PATCH v3] build: unify mesa version by using a VERSION file

2013-07-29 Thread Chad Versace
On 07/25/2013 03:45 PM, Emil Velikov wrote: Rather than having to keep track of all the build systems and their respecitve definition of the mesa version, use a single top file VERSION. Every build system is responsible for reading/parsing the file and using it v2: * remove useless bulletpoint f

Re: [Mesa-dev] [PATCH 05/34] main: Allow for the possibility of GL 3.2 without ARB_geometry_shader4.

2013-07-29 Thread Kenneth Graunke
On 07/28/2013 11:03 PM, Paul Berry wrote: Previously, we assumed that the only way Mesa would expose geometry shader support was via the ARB_geometry_shader4 extension. But this extension has some extra complications over GL 3.2 (interactions with compatibility-only features, and link-time initi

Re: [Mesa-dev] [PATCH 24/34] gallivm: Fix indirect input fetches for gs.

2013-07-29 Thread Zack Rusin
That looks wrong to me as well. What would make get_indirect_index different in this case? - Original Message - > From: Fabian Bieler > > --- > src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/src/gallium/auxiliary/gallivm/lp_

Re: [Mesa-dev] [PATCH 06/34] draw/gs: fix allocation of buffer for GS output vertices

2013-07-29 Thread Zack Rusin
That looks wrong to me. We already account for the "other fields" in the vertex_size. - Original Message - > From: Bryan Cain > > Before, it accounted for the size of the vertices but not the other fields > in the vertex_header struct, which caused memory corruption. > --- > src/galliu

Re: [Mesa-dev] [PATCH 02/34] glsl: Add EXT_texture_array support for geometry shaders.

2013-07-29 Thread Kenneth Graunke
On 07/28/2013 11:03 PM, Paul Berry wrote: --- src/glsl/builtins/profiles/EXT_texture_array.geom | 12 1 file changed, 12 insertions(+) create mode 100644 src/glsl/builtins/profiles/EXT_texture_array.geom diff --git a/src/glsl/builtins/profiles/EXT_texture_array.geom b/src/glsl

Re: [Mesa-dev] [PATCH] glsl: Remove shader stage checking for extension handling.

2013-07-29 Thread Paul Berry
On 29 July 2013 10:55, Kenneth Graunke wrote: > Certain extensions only add functionality to particular shader stages. > (For example, ARB_draw_instanced only adds variables to the vertex > shader stage.) > > Previously, we only allowed such extensions to be enabled in the shader > stages where t

[Mesa-dev] [PATCH] glsl: Remove shader stage checking for extension handling.

2013-07-29 Thread Kenneth Graunke
Certain extensions only add functionality to particular shader stages. (For example, ARB_draw_instanced only adds variables to the vertex shader stage.) Previously, we only allowed such extensions to be enabled in the shader stages where they're useful. However, I've never found any text which ma

Re: [Mesa-dev] [PATCH v2 00/13] Enable GL_AMD_vertex_shader_layer extension

2013-07-29 Thread Paul Berry
On 19 July 2013 17:32, Jordan Justen wrote: > git://people.freedesktop.org/~jljusten/mesa ivb-full-depth-buffer-v2 > > This series converts DEPTH_BUFFER to use the LOD and > minimum array element fields and always points the > depth, hiz and stencil buffers at the top of the > miptree surface. >

Re: [Mesa-dev] [PATCH] i965/vs: set up sampler state pointer for Gen4/5.

2013-07-29 Thread Kenneth Graunke
On 07/29/2013 02:34 AM, Chris Forbes wrote: Fixes broken filter and lod selection for vertex texturing. (txs/txf only worked properly because they ignore the sampler state completely) Signed-off-by: Chris Forbes Cc: mesa-sta...@lists.freedesktop.org --- src/mesa/drivers/dri/i965/brw_vs_state.

Re: [Mesa-dev] [PATCH v2 12/13] intel_mipmap_tree: all layers need hiz resolves with layered rendering

2013-07-29 Thread Paul Berry
On 19 July 2013 17:32, Jordan Justen wrote: > In intel_miptree_slice_set_needs_(depth|hiz)_resolve, if layered > rendering is being used, then we need to mark all layers as > needing depth or hiz resolves. > I think only intel_miptree_slice_set_needs_depth_resolve() needs to have this behaviour,

Re: [Mesa-dev] [PATCH v2 08/13] gen7 fbo: make unmatched depth/stencil configs return unsupported

2013-07-29 Thread Paul Berry
On 19 July 2013 17:32, Jordan Justen wrote: > For gen >= 7, we will use the lod/minimum-array-element fields to > support layered rendering. This means that we must restrict > the depth & stencil attachments to match in various more retrictive > ways. (Now the width, height, depth, LOD and layer

Re: [Mesa-dev] [PATCH] i965/vs: set up sampler state pointer for Gen4/5.

2013-07-29 Thread Chris Forbes
CTG is still broken even with this patch -- but ILK is fixed. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [Bug 67411] lp_bld_conv.c:757:lp_build_conv: Assertion `dst_type.sign || dst_type.width < 32' failed.

2013-07-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=67411 Roland Scheidegger changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Mesa-dev] [PATCH] i965/vs: set up sampler state pointer for Gen4/5.

2013-07-29 Thread Chris Forbes
Fixes broken filter and lod selection for vertex texturing. (txs/txf only worked properly because they ignore the sampler state completely) Signed-off-by: Chris Forbes Cc: mesa-sta...@lists.freedesktop.org --- src/mesa/drivers/dri/i965/brw_vs_state.c | 27 +-- 1 file chan

[Mesa-dev] [Bug 63435] [Regression since 9.0] Flickering in EGL OpenGL full-screen window with swap interval 1

2013-07-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=63435 post+...@ralfj.de changed: What|Removed |Added Component|Other |EGL --- Comment #9 from post+...@ralf

Re: [Mesa-dev] Error building Mesa 32 bit version on Arch Linux

2013-07-29 Thread Laurent Carlier
Le samedi 27 juillet 2013 18:03:44 Sandeep a écrit : > Hi, > > When I try to build 32 bit Mesa on Arch Linux, I get the following error: > > /usr/bin/mkdir -p ../../src/glsl/glcpp > /usr/bin/mkdir -p ../../src/glsl/glcpp > YACC glcpp/glcpp-parse.c > LEX glsl_lexer.cpp > YACC gl

Re: [Mesa-dev] Error building Mesa 32 bit version on Arch Linux

2013-07-29 Thread Bruno Jacquet
Hi, check this out: https://bugs.freedesktop.org/show_bug.cgi?id=67398 A solution is to downgrade to bison 2.7. -- Bruno - Mail original - De: "Sandeep" À: mesa-dev@lists.freedesktop.org Envoyé: Dimanche 28 Juillet 2013 03:03:44 Objet: [Mesa-dev] Error building Mesa 32 bit version on A

[Mesa-dev] [PATCH 32/34] glsl: Allow geometry shader input instance arrays to be unsized.

2013-07-29 Thread Paul Berry
--- src/glsl/ast.h | 24 src/glsl/ast_to_hir.cpp | 31 +-- src/glsl/glsl_parser.yy | 11 --- 3 files changed, 49 insertions(+), 17 deletions(-) diff --git a/src/glsl/ast.h b/src/glsl/ast.h index 3ef9913..a40bbc0 100644 --- a/sr

[Mesa-dev] [PATCH 33/34] glsl: Implement rules for geometry shader input sizes.

2013-07-29 Thread Paul Berry
Section 4.3.8.1 (Input Layout Qualifiers) of the GLSL 1.50 spec contains some tricky rules for how the sizes of geometry shader input arrays are related to the input layout specification. In essence, those rules boil down to the following: - If an input array declaration does not specify a size,

[Mesa-dev] [PATCH 31/34] glsl: Permit non-ubo input interface arrays to use non-const indexing.

2013-07-29 Thread Paul Berry
>From the GLSL ES 3.00 spec: "All indexes used to index a uniform block array must be constant integral expressions." Similar text exists in GLSL specs since 1.50. When we implemented this, the only type of interface block supported by Mesa was uniform blocks, so we required all indexes

[Mesa-dev] [PATCH 34/34] main: Warn that geometry shader support is experimental.

2013-07-29 Thread Paul Berry
Geometry shader support in the Mesa front end is still fairly preliminary. Many features are untested, and the following things are known not to work: - The gl_in interface block - The gl_ClipDistance input - Transform feedback of geometry shader outputs - Constants that are new in GLSL 1.50 (e.g

[Mesa-dev] [PATCH 30/34] glsl: Cross-validate GS layout qualifiers while intrastage linking.

2013-07-29 Thread Paul Berry
From: Eric Anholt This gets piglit's geometry-basic test running. TODO: Still need to validate that the GS layout qualifiers don't get used in places they shouldn't (like an interface block, or a particular shader input or output) --- src/glsl/linker.cpp | 96 +++

[Mesa-dev] [PATCH 29/34] glsl: Export the compiler's GS layout qualifiers to the gl_shader.

2013-07-29 Thread Paul Berry
From: Eric Anholt Next step is to validate them at link time. v2 (Paul Berry ): Don't attempt to export the layout qualifiers in the event of a compile error, since some of them are set up by ast_to_hir(), and ast_to_hir() isn't guaranteed to have run in the event of a compile error. --- src/gl

[Mesa-dev] [PATCH 27/34] glsl: Make sure that we don't put too many bitfields in ast_type_qualifier.

2013-07-29 Thread Paul Berry
From: Eric Anholt We do some tests of qualifiers using a union containing an int and the struct full of bitfields, so make sure the bitfields don't spill outside the int. --- src/glsl/ast_to_hir.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_h

[Mesa-dev] [PATCH 28/34] glsl: Parse the GLSL 1.50 GS layout qualifiers.

2013-07-29 Thread Paul Berry
From: Eric Anholt Limited semantic checking (compatibility between declarations, checking that they're in the right shader target, etc.) is done. v2: Remove stray debug printfs. v3 (Paul Berry ): Process input layout qualifiers at ast_to_hir time rather than at parse time, since certain error c

[Mesa-dev] [PATCH 26/34] mesa/st: Allow geometry shaders without gl_Position export.

2013-07-29 Thread Paul Berry
From: Fabian Bieler >From the ARB_geometry_shader4 spec (section Geometry Shader outputs): "The built-in special variable gl_Position is intended to hold the homogeneous vertex position. Writing gl_Position is optional." --- src/mesa/state_tracker/st_program.c | 2 -- 1 file changed, 2 deletions

[Mesa-dev] [PATCH 25/34] gallium/draw: Pass primitive ID as integer to the shader.

2013-07-29 Thread Paul Berry
From: Fabian Bieler The shader interprets the value as an integer. --- src/gallium/auxiliary/draw/draw_gs.c | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/gallium/auxiliary/draw/draw_gs.c b/src/gallium/auxiliary/draw/draw_gs.c index 78727c6..917f028

[Mesa-dev] [PATCH 23/34] st/mesa, glsl_to_tgsi: add support for geometry shaders

2013-07-29 Thread Paul Berry
From: Bryan Cain v2 (Bryan Cain ): fix 2D array indexing order. --- src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 101 ++- src/mesa/state_tracker/st_program.c| 107 + 2 files changed, 163 insertions(+), 45 deletions(-) diff --git a/src/

[Mesa-dev] [PATCH 24/34] gallivm: Fix indirect input fetches for gs.

2013-07-29 Thread Paul Berry
From: Fabian Bieler --- src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c index c199385..1d27e81 100644 --- a/src/gallium/auxiliary/gallivm/lp_b

[Mesa-dev] [PATCH 20/34] mesa: Validate the drawing primitive against the geometry shader input primitive type.

2013-07-29 Thread Paul Berry
From: Fabian Bieler Reviewed-by: Paul Berry --- src/mesa/main/api_validate.c | 68 1 file changed, 68 insertions(+) diff --git a/src/mesa/main/api_validate.c b/src/mesa/main/api_validate.c index 8a2ec7b..7d4a4c1 100644 --- a/src/mesa/main/api_valida

[Mesa-dev] [PATCH 21/34] glsl/linker: Fail to link geometry shader without vertex shader.

2013-07-29 Thread Paul Berry
From: Fabian Bieler >From section 2.15 (Geometry Shaders) the OpenGL 3.2 spec: A program object that includes a geometry shader must also include a vertex shader; otherwise a link error will occur. Reviewed-by: Paul Berry --- src/glsl/linker.cpp | 8 1 file changed, 8 inserti

[Mesa-dev] [PATCH 18/34] glsl: Properly pack GS output varyings

2013-07-29 Thread Paul Berry
In geometry shaders, outputs are consumed at the time of a call to EmitVertex() (as opposed to all other shader types, where outputs are consumed when the shader exits). Therefore, when packing geometry shader output varyings using lower_packed_varyings, we need to do the packing at the time of th

[Mesa-dev] [PATCH 19/34] mesa/shaderapi: Allow 0 GEOMETRY_VERTICES_OUT.

2013-07-29 Thread Paul Berry
From: Fabian Bieler ARB_geometry_shader4 spec Errors: "The error INVALID_VALUE is generated by ProgramParameteriARB if is GEOMETRY_VERTICES_OUT_ARB and is negative." Reviewed-by: Paul Berry --- src/mesa/main/shaderapi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/

[Mesa-dev] [PATCH 16/34] glsl/linker: Properly pack GS input varyings.

2013-07-29 Thread Paul Berry
Since geometry shader inputs are arrays (where the array index indicates which vertex is being examined), varying packing needs to treat them differently. --- src/glsl/ir_optimization.h | 2 +- src/glsl/link_varyings.cpp | 10 ++- src/glsl/link_varyings.h | 3 +- src

[Mesa-dev] [PATCH 17/34] glsl: Modify varying packing to use a temporary exec_list.

2013-07-29 Thread Paul Berry
This patch modifies lower_packed_varyings to store the packing code it generates in a temporary exec_list, and then splice that list into the shader's main() function when it's done. This paves the way for supporting geometry shader outputs, where we'll have to splice a clone of the packing code b

[Mesa-dev] [PATCH 15/34] glsl/linker: Properly error check VS-GS linkage.

2013-07-29 Thread Paul Berry
>From section 4.3.4 (Inputs) of the GLSL 1.50 spec: Geometry shader input variables get the per-vertex values written out by vertex shader output variables of the same names. Since a geometry shader operates on a set of vertices, each input varying variable (or input block, see int

[Mesa-dev] [PATCH 14/34] glsl: Require geometry shader inputs to be arrays.

2013-07-29 Thread Paul Berry
--- src/glsl/ast_to_hir.cpp | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp index 431a13d..1d80e6b 100644 --- a/src/glsl/ast_to_hir.cpp +++ b/src/glsl/ast_to_hir.cpp @@ -2817,7 +2817,20 @@ ast_declarator_list::hi

[Mesa-dev] [PATCH 13/34] mesa: Copy linked program data for GS.

2013-07-29 Thread Paul Berry
The documentation for gl_shader_program.Geom and gl_geometry_program says that the former is copied to the latter at link time, but this wasn't happening. This patch causes _mesa_ir_link_shader() to perform the copy, and updates comment accordingly. --- src/mesa/main/mtypes.h| 5 - src/me

[Mesa-dev] [PATCH 09/34] glsl: add ir_emitvertex and ir_endprim instruction types

2013-07-29 Thread Paul Berry
From: Bryan Cain These correspond to the EmitVertex and EndPrimitive functions in GLSL. v2 (Paul Berry ): Add stub implementations of new pure visitor functions to i965's vec4_visitor and fs_visitor classes. --- src/glsl/ir.h | 51 ++ src

[Mesa-dev] [PATCH 10/34] glsl: add builtins for geometry shaders.

2013-07-29 Thread Paul Berry
From: Bryan Cain v2 (Paul Berry ): Account for rework of builtin_variables.cpp. Use INTERP_QUALIFIER_FLAT for gl_PrimitiveID so that it will obey provoking vertex conventions. Convert to GLSL 1.50 style geometry shaders. --- src/glsl/builtin_variables.cpp | 11 +-- src/gl

[Mesa-dev] [PATCH 08/34] mesa/st: Add VARYING_SLOT_TEX[1-7] to st_translate_geometry_program().

2013-07-29 Thread Paul Berry
From: Bryan Cain v2 (Paul Berry : Split out to separate patch (previously this was part of "glsl: add builtins for geometry shaders.") --- src/mesa/state_tracker/st_program.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/

[Mesa-dev] [PATCH 12/34] mesa: Refactor copying of linked program data.

2013-07-29 Thread Paul Berry
This patch creates a single function to copy the the UsesClipDistance flag from gl_shader_program.Vert to gl_vertex_program. Previously this logic was duplicated in the i965-specific function brw_link_shader() and the core mesa function _mesa_ir_link_shader(). This logic will have to be expanded

[Mesa-dev] [PATCH 11/34] glsl: support compilation of geometry shaders

2013-07-29 Thread Paul Berry
From: Bryan Cain This commit adds all of the parsing and semantics for GLSL 150 style geometry shaders. v2 (Paul Berry ): Adjust i965's brw_link_shader() to pass the new is_geometry_shader argument to do_set_program_inouts. Add a few missing calls to get_pipeline_stage(). Fix some signed/unsig