[Mesa-dev] [PATCH 8/8] draw: implement proper primitive assembler as a pipeline stage

2013-08-01 Thread Zack Rusin
we used to have a face primitive assembler that we ran after if the gs was missing but we had adjacency primitives in the pipeline, lets convert it to a pipeline stage, which allows us to use it to inject outputs (primitive id) into the vertices. it's also a lot cleaner because the decomposition is

[Mesa-dev] [PATCH 7/8] llvmpipe: don't interpolate front face or prim id

2013-08-01 Thread Zack Rusin
The loop was iterating over all the fs inputs and setting them to perspective interpolation, then after the loop we were creating extra output slots with the correct interpolation. Instead of injecting bogus extra outputs, just set the interpolation on front face and prim id correctly when doing th

[Mesa-dev] [PATCH 6/8] draw: fix front face injection

2013-08-01 Thread Zack Rusin
Inject front face only if the fragment shader uses it and propagate through all channels because otherwise we'll need to figure out the exact swizzle that the fs expects and it's just simpler to make sure all the components within the front face register are correctly set. Signed-off-by: Zack Rusi

[Mesa-dev] [PATCH 5/8] draw: use the vertex size

2013-08-01 Thread Zack Rusin
Instead of using the magical 4 use the above computed vertex size. Doesn't change the behavior, just makes the code a bit cleaner. Signed-off-by: Zack Rusin --- src/gallium/auxiliary/draw/draw_pipe_vbuf.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/auxiliar

[Mesa-dev] [PATCH 4/8] draw: make sure clipping works with injected outputs

2013-08-01 Thread Zack Rusin
clipping would drop the extra outputs because it always used the number of standard vertex shader outputs, without geometry shader or extra outputs. The commit makes sure that clipping with geometry shaders which have more outputs than the current vertex shader and with extra outputs correctly prop

[Mesa-dev] [PATCH 3/8] draw/llvm: add some extra debugging output

2013-08-01 Thread Zack Rusin
when dumping shader outputs it's nice to have the integer values of the outputs, in particular because some values are integers. Signed-off-by: Zack Rusin --- src/gallium/auxiliary/draw/draw_llvm.c |6 ++ 1 file changed, 6 insertions(+) diff --git a/src/gallium/auxiliary/draw/draw_llvm.

[Mesa-dev] [PATCH 2/8] draw: stop crashing with extra shader outputs

2013-08-01 Thread Zack Rusin
Draw sometimes injects extra shader outputs (aa points, lines or front face), unfortunately most of the pipeline and llvm code didn't handle them at all. It only worked if number of inputs happened to be bigger or equal to the number of shader outputs plus the extra injected outputs. In particular

[Mesa-dev] [PATCH 1/8] tgsi: detect prim id and front face usage in fs

2013-08-01 Thread Zack Rusin
Adding code to detect the usage of prim id and front face semantics in fragment shaders. Signed-off-by: Zack Rusin --- src/gallium/auxiliary/tgsi/tgsi_scan.c |9 +++-- src/gallium/auxiliary/tgsi/tgsi_scan.h |1 + 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/gall

[Mesa-dev] [PATCH] i915: Fix memory leak in try_pbo_upload.

2013-08-01 Thread Vinson Lee
Fixes "Resource leak" defect reported by Coverity. Signed-off-by: Vinson Lee --- src/mesa/drivers/dri/i915/intel_tex_image.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/drivers/dri/i915/intel_tex_image.c b/src/mesa/drivers/dri/i915/intel_tex_image.c index 9b1336d..975e77a 10064

[Mesa-dev] Submitting Topics for Graphics and Display uConf at LPC 2013

2013-08-01 Thread Jesse Barker
Hi all, First off, thanks to those who have already submitted topics to the Graphics and Display microconference! For those who have not yet proposed, but plan to, please submit your topics as described here: http://www.linuxplumbersconf.org/2013/submitting-microconference-discussion-topics/ A

Re: [Mesa-dev] [PATCH 8/8] glsl: Modify ir_set_program_inouts to handle geometry shaders.

2013-08-01 Thread Paul Berry
On 1 August 2013 16:03, Ian Romanick wrote: > A couple of comments below. Other than that, > > Reviewed-by: Ian Romanick > > > On 07/31/2013 02:18 PM, Paul Berry wrote: > >> --- >> src/glsl/ir_set_program_**inouts.cpp | 85 >> ++**++-- >> 1 file changed, 73 in

Re: [Mesa-dev] SNORM conversion equation woes

2013-08-01 Thread Ian Romanick
On 07/26/2013 02:20 PM, Kenneth Graunke wrote: Hello all, I've been looking at https://bugs.freedesktop.org/show_bug.cgi?id=59150 and could use your opinion. OpenGL defines two equations for converting from SNORM to floating point data. These are: f = (2c + 1)/(2^b - 1)(equati

Re: [Mesa-dev] [PATCH 8/8] glsl: Modify ir_set_program_inouts to handle geometry shaders.

2013-08-01 Thread Ian Romanick
A couple of comments below. Other than that, Reviewed-by: Ian Romanick On 07/31/2013 02:18 PM, Paul Berry wrote: --- src/glsl/ir_set_program_inouts.cpp | 85 -- 1 file changed, 73 insertions(+), 12 deletions(-) diff --git a/src/glsl/ir_set_program_inout

Re: [Mesa-dev] [PATCH] mesa: use c99 functions on non-linux platforms if supported

2013-08-01 Thread Jonathan Gray
On Thu, Aug 01, 2013 at 11:21:57AM -0700, Ian Romanick wrote: > On 08/01/2013 09:54 AM, Chad Versace wrote: > >On 08/01/2013 09:48 AM, Chad Versace wrote: > >>On 08/01/2013 12:27 AM, Jonathan Gray wrote: > >>>Signed-off-by: Jonathan Gray > >>>--- > >>> src/mesa/main/imports.h | 2 +- > >>> 1 file

[Mesa-dev] Mesa 9.1.6

2013-08-01 Thread Carl Worth
Mesa 9.1.6 has been released. Mesa 9.1.6 is a bug fix release which fixes bugs fixed since the 9.1.5 release. The tag in the GIT repository for Mesa 9.1.6 is 'mesa-9.1.6'. Mesa 9.1.6 is available for download at ftp://freedesktop.org/pub/mesa/9.1.6/ md5sums: 443a2a352667294b53d56cb1a74114e9 Me

[Mesa-dev] [PATCH 4/4] i965: Add #defines for the MI_LOAD_REGISTER_MEM command.

2013-08-01 Thread Kenneth Graunke
This command reads a value from memory and writes it to a register (the opposite of MI_STORE_REGISTER_MEM). It's only available on Gen7+. Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/intel_reg.h | 4 1 file changed, 4 insertions(+) diff --git a/src/mesa/drivers/dri/i965/in

[Mesa-dev] [PATCH 3/4] i965: Initialize the intel_context::bufmgr pointer earlier.

2013-08-01 Thread Kenneth Graunke
This prevents a crash in a future patch. _mesa_initialize_context() creates a default transform feedback object by calling the NewTransformFeedbackObject() driver hook. Eventually, we'll want to subclass that and allocate a buffer object. This means passing brw->bufmgr to drm_intel_alloc_bo(), a

[Mesa-dev] [PATCH 2/4] i965: Tidy preprocessor macros for SO_PRIM_STORAGE_NEEDED registers.

2013-08-01 Thread Kenneth Graunke
Gen7+ supports four transform feedback streams. Using a function-like macro makes it easy to access them by stream number or loop over them. "GEN7_" prefixes are more common than "_IVB" suffixes, so use that. Gen6 only supports a single stream, so the single #define should be fine. However, SO_N

[Mesa-dev] [PATCH 1/4] i965: Tidy preprocessor macros for SO_NUM_PRIMS_WRITTEN registers.

2013-08-01 Thread Kenneth Graunke
Gen7+ supports four transform feedback streams. Using a function-like macro makes it easy to access them by stream number or loop over them. "GEN7_" prefixes are more common than "_IVB" suffixes, so we use that. Gen6 only supports a single stream, so the single #define should be fine. However, S

[Mesa-dev] [PATCH] Makefile.am: Remove api_exec_es* from EXTRA_FILES.

2013-08-01 Thread Matt Turner
These files were removed in commits a0102154 and a8ab7e33. --- Makefile.am | 6 -- 1 file changed, 6 deletions(-) diff --git a/Makefile.am b/Makefile.am index ce391c4..343bade 100644 --- a/Makefile.am +++ b/Makefile.am @@ -52,12 +52,6 @@ EXTRA_FILES = \ src/glsl/glcpp/glcpp-lex.c

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

2013-08-01 Thread Paul Berry
On 1 August 2013 09:34, Ian Romanick wrote: > On 08/01/2013 07:17 AM, Paul Berry wrote: > >> On 31 July 2013 17:42, Ian Romanick > > wrote: >> >> On 07/28/2013 11:03 PM, Paul Berry wrote: >> >> From: Eric Anholt mailto:e...@anholt.net>> >> >> >> Ne

Re: [Mesa-dev] [PATCH 6/8] glsl: Fallback gracefully if ir_set_program_inouts sees unexpected indexing.

2013-08-01 Thread Kenneth Graunke
On 07/31/2013 02:17 PM, Paul Berry wrote: The code in ir_set_program_inouts that marks just a portion of a variable as used (rather than the whole variable) only works on a few kinds of indexing operations: - Indexing into matrices - Indexing into arrays of matrices, vectors, or scalars. Fortun

Re: [Mesa-dev] [PATCH 5/8] glsl: Extract marking functions from ir_set_program_inouts.

2013-08-01 Thread Paul Berry
On 31 July 2013 18:16, Ian Romanick wrote: > On 07/31/2013 02:17 PM, Paul Berry wrote: > >> This patch extracts the functions mark_whole_variable() and >> try_mark_partial_variable() from the ir_set_program_inouts visitor >> functions. This will make the code easier to follow when we add >> geom

Re: [Mesa-dev] [PATCH 00/34] Preliminary front-end support for geometry shaders.

2013-08-01 Thread Kenneth Graunke
On 07/28/2013 11:03 PM, Paul Berry wrote: This patch series implements preliminary front-end support for geometry shaders in Mesa. It is based on work done by myself, Bryan Cain, Eric Anholt, and Fabian Bieler over the last several months. For the patches that aren't mine, I've preserved the ori

Re: [Mesa-dev] [Mesa-stable] Request for more information for stable-branch patches

2013-08-01 Thread Carl Worth
Carl Worth writes: > How about this: > > CC: mesa-sta...@lists.freedesktop.org > CC: "9.1" > CC: "9.2" This seems to be working. And I should clarify that the first form: CC: mesa-sta...@lists.freedesktop.org will always indicate the most-recently-branched stable tre

Re: [Mesa-dev] [PATCH 2/2] draw: inject frontface info into wireframe outputs

2013-08-01 Thread Roland Scheidegger
Am 01.08.2013 21:11, schrieb Jose Fonseca: > > > - Original Message - + if (draw_will_inject_frontface(lp_context->draw) && >>> I think it's annoying you have to do these calls to determine if there's >>> a valid frontface here for each line instead of just per draw call but >>> it

Re: [Mesa-dev] [PATCH 2/2] draw: inject frontface info into wireframe outputs

2013-08-01 Thread Jose Fonseca
- Original Message - > > > +   if (draw_will_inject_frontface(lp_context->draw) && > > I think it's annoying you have to do these calls to determine if there's > > a valid frontface here for each line instead of just per draw call but > > it doesn't seem easy to avoid it. > > Yea, there'

Re: [Mesa-dev] [PATCH] mesa: use c99 functions on non-linux platforms if supported

2013-08-01 Thread Ian Romanick
On 08/01/2013 09:54 AM, Chad Versace wrote: On 08/01/2013 09:48 AM, Chad Versace wrote: On 08/01/2013 12:27 AM, Jonathan Gray wrote: Signed-off-by: Jonathan Gray --- src/mesa/main/imports.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git src/mesa/main/imports.h src/mesa/ma

Re: [Mesa-dev] [PATCH v2 1/2] De-tab and align comments in gl_texture_object

2013-08-01 Thread Matt Turner
On Wed, Jul 31, 2013 at 7:14 AM, Corey Richardson wrote: > Signed-off-by: Corey Richardson > --- > src/mesa/main/mtypes.h | 45 +++-- > 1 file changed, 23 insertions(+), 22 deletions(-) > > diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h > ind

Re: [Mesa-dev] [PATCH] mesa: use c99 functions on non-linux platforms if supported

2013-08-01 Thread Chad Versace
On 08/01/2013 09:48 AM, Chad Versace wrote: On 08/01/2013 12:27 AM, Jonathan Gray wrote: Signed-off-by: Jonathan Gray --- src/mesa/main/imports.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git src/mesa/main/imports.h src/mesa/main/imports.h index 53e40b4..aa7dc49 100644 --

Re: [Mesa-dev] [PATCH] mesa: use c99 functions on non-linux platforms if supported

2013-08-01 Thread Ian Romanick
Do you have specific platforms in mind? Are these autoconf platforms or scons platforms? If it's the former, I'd rather just use the HAVE_ macros that's standard for autoconf builds. I recall trying to use __STDC_VERSION__ for various things in Mesa in the past, but we found that some platfo

[Mesa-dev] [PATCH] nv50: fix some h264 interlaced decoding on vp2

2013-08-01 Thread Ilia Mirkin
Some videos specify mb_adaptive_frame_field_flag instead of field_pic_flag. This implies that the pic height needs to be halved, and this field needs to be passed to the VP engine. Cc: "9.2" mesa-sta...@lists.freedesktop.org Signed-off-by: Ilia Mirkin --- This makes at least one interlaced vide

Re: [Mesa-dev] [PATCH] mesa: use c99 functions on non-linux platforms if supported

2013-08-01 Thread Chad Versace
On 08/01/2013 12:27 AM, Jonathan Gray wrote: Signed-off-by: Jonathan Gray --- src/mesa/main/imports.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git src/mesa/main/imports.h src/mesa/main/imports.h index 53e40b4..aa7dc49 100644 --- src/mesa/main/imports.h +++ src/mesa/main/i

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

2013-08-01 Thread Ian Romanick
On 08/01/2013 08:07 AM, Paul Berry wrote: On 31 July 2013 18:17, Ian Romanick mailto:i...@freedesktop.org>> wrote: On 07/28/2013 11:03 PM, Paul Berry wrote: --- src/glsl/ast.h | 24 src/glsl/ast_to_hir.cpp | 31 +

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

2013-08-01 Thread Ian Romanick
On 08/01/2013 07:17 AM, Paul Berry wrote: On 31 July 2013 17:42, Ian Romanick mailto:i...@freedesktop.org>> wrote: On 07/28/2013 11:03 PM, Paul Berry wrote: From: Eric Anholt mailto:e...@anholt.net>> Next step is to validate them at link time. v2 (Paul Berry mailto

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

2013-08-01 Thread Paul Berry
On 31 July 2013 18:05, Ian Romanick wrote: > On 07/28/2013 11:03 PM, Paul Berry wrote: > >> 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

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

2013-08-01 Thread Paul Berry
On 31 July 2013 18:17, Ian Romanick wrote: > On 07/28/2013 11:03 PM, Paul Berry wrote: > >> --- >> src/glsl/ast.h | 24 >> src/glsl/ast_to_hir.cpp | 31 +-**- >> src/glsl/glsl_parser.yy | 11 --- >> 3 files changed, 49 ins

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

2013-08-01 Thread Paul Berry
On 31 July 2013 17:42, Ian Romanick wrote: > On 07/28/2013 11:03 PM, Paul Berry wrote: > >> 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

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

2013-08-01 Thread Paul Berry
On 31 July 2013 17:22, Ian Romanick wrote: > On 07/28/2013 11:03 PM, Paul Berry wrote: > >> 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 >>

Re: [Mesa-dev] [PATCH 1/2] llvmpipe: make the front-face behavior match the gallium spec

2013-08-01 Thread Jose Fonseca
- Original Message - > The spec says that front-face is true if the value is >0 and false > if it's <0. To make sure that we follow the spec, lets just > subtract 0.5 from our value (llvmpipe did 1 for frontface and 0 > otherwise), which will get us a positive num for frontface and > nega

Re: [Mesa-dev] [PATCH 2/2] draw: inject frontface info into wireframe outputs

2013-08-01 Thread Roland Scheidegger
Am 01.08.2013 06:21, schrieb Zack Rusin: >>> + if (draw_will_inject_frontface(lp_context->draw) && >> I think it's annoying you have to do these calls to determine if there's >> a valid frontface here for each line instead of just per draw call but >> it doesn't seem easy to avoid it. > > Yea, t

[Mesa-dev] [PATCH] mesa: use c99 functions on non-linux platforms if supported

2013-08-01 Thread Jonathan Gray
Signed-off-by: Jonathan Gray --- src/mesa/main/imports.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git src/mesa/main/imports.h src/mesa/main/imports.h index 53e40b4..aa7dc49 100644 --- src/mesa/main/imports.h +++ src/mesa/main/imports.h @@ -230,7 +230,7 @@ static inline int IS