Re: [Mesa-dev] [PATCH 3/4] i965: For color clears, only disable writes to components that exist.

2014-03-21 Thread Paul Berry
--- src/mesa/drivers/dri/i965/brw_blorp_clear.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Nice find! Series is: Reviewed-by: Paul Berry stereotype...@gmail.com diff --git a/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp b/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp index

Re: [Mesa-dev] [PATCH] i965: Drop special case for edgeflag thanks to Marek's change to core.

2014-03-17 Thread Paul Berry
On 17 March 2014 14:54, Eric Anholt e...@anholt.net wrote: --- src/mesa/drivers/dri/i965/brw_draw_upload.c | 9 - 1 file changed, 9 deletions(-) For future cross-referencing it would be nice to mention the SHA of Marek's change in the commit message. diff --git

Re: [Mesa-dev] [PATCH 1/6] glsl: Optimize pow(x, 2) into x * x.

2014-03-11 Thread Paul Berry
On 10 March 2014 17:23, Ian Romanick i...@freedesktop.org wrote: I had a pretty similar patch on the top of my pow-optimization branch. I also expand x**3 and x**4. I had hoped that would enable some cases to expand then merge to MADs. It should also be faster on older GENs where POW perf

Re: [Mesa-dev] [RFC PATCH] i965/gs: add snb support

2014-02-24 Thread Paul Berry
On 24 February 2014 00:36, Ilia Mirkin imir...@alum.mit.edu wrote: Before you read any further, this is nowhere close to working. However it's in a state where I think most of the structure is there, albeit with a lot of XXX comments. And I haven't actually implemented the new opcodes I've

Re: [Mesa-dev] [PATCH] i965: Don't try to use the hardware blitter for multisampled miptrees.

2014-02-21 Thread Paul Berry
of the function, since it doesn't depend on src_format or dst_format. But it's not a big deal. Either way, the patch is: Reviewed-by: Paul Berry stereotype...@gmail.com ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org

Re: [Mesa-dev] [PATCH v3 8/9] i965: support gl_InvocationID for gen7

2014-02-06 Thread Paul Berry
+--- 5 files changed, 48 insertions(+), 3 deletions(-) Hopefully I will get a chance to look at this in more detail soon, but for now, consider this: Acked-by: Paul Berry stereotype...@gmail.com diff --git a/src/mesa/drivers/dri/i965/brw_defines.h b/src/mesa/drivers/dri/i965

Re: [Mesa-dev] [PATCH 30/30] i965/cs: Allow ARB_compute_shader to be enabled via env var.

2014-02-05 Thread Paul Berry
On 4 February 2014 10:03, Jordan Justen jljus...@gmail.com wrote: What about trying to make use of MESA_EXTENSION_OVERRIDE=GL_ARB_compute_shader? We could add extensions.c:bool _mesa_is_extension_override_enabled(char *) And then if

Re: [Mesa-dev] [PATCH 30/30] i965/cs: Allow ARB_compute_shader to be enabled via env var.

2014-02-04 Thread Paul Berry
On 1 February 2014 23:21, Jordan Justen jljus...@gmail.com wrote: On Thu, Jan 9, 2014 at 6:19 PM, Paul Berry stereotype...@gmail.com wrote: This will allow testing of compute shader functionality before it is completed. To enable ARB_compute_shader functionality in the i965 driver, set

Re: [Mesa-dev] [PATCH 01/10] glsl: memory_writer helper class for data serialization

2014-02-04 Thread Paul Berry
a word order that's unambiguously a question (e.g. was_data_written). data_was_written sounds more like a statement, so someone might misinterpret this function as a synonym for mark_data_written(). But I'm nit picking again here. With the other issues addressed, this patch is: Reviewed-by: Paul

Re: [Mesa-dev] [PATCH 01/10] glsl: memory_writer helper class for data serialization

2014-02-04 Thread Paul Berry
Whoops, I discovered another issue: On 29 January 2014 01:24, Tapani Pälli tapani.pa...@intel.com wrote: Class will be used by the shader binary cache implementation. Signed-off-by: Tapani Pälli tapani.pa...@intel.com --- src/glsl/memory_writer.h | 188

Re: [Mesa-dev] [PATCH 01/10] glsl: memory_writer helper class for data serialization

2014-02-04 Thread Paul Berry
On 4 February 2014 19:52, Paul Berry stereotype...@gmail.com wrote: Whoops, I discovered another issue: On 29 January 2014 01:24, Tapani Pälli tapani.pa...@intel.com wrote: Class will be used by the shader binary cache implementation. Signed-off-by: Tapani Pälli tapani.pa...@intel.com

Re: [Mesa-dev] [PATCH 02/10] glsl: serialize methods for IR instructions

2014-02-04 Thread Paul Berry
to use make_unique_id(). With that fixed, this patch is: Reviewed-by: Paul Berry stereotype...@gmail.com ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 22/30] mesa/cs: Implement MAX_COMPUTE_WORK_GROUP_INVOCATIONS constant.

2014-02-03 Thread Paul Berry
On 1 February 2014 21:25, Jordan Justen jljus...@gmail.com wrote: On Thu, Jan 9, 2014 at 6:19 PM, Paul Berry stereotype...@gmail.com wrote: --- src/glsl/main.cpp | 1 + src/glsl/standalone_scaffolding.cpp | 1 + src/mesa/main/context.c | 1 + src/mesa

Re: [Mesa-dev] [PATCH 26/30] main/cs: Implement query for COMPUTE_WORK_GROUP_SIZE.

2014-02-03 Thread Paul Berry
On 1 February 2014 22:28, Jordan Justen jljus...@gmail.com wrote: On Thu, Jan 9, 2014 at 6:19 PM, Paul Berry stereotype...@gmail.com wrote: --- src/mesa/main/shaderapi.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main

Re: [Mesa-dev] [PATCH 29/30] i965/cs: Create the brw_compute_program struct, and the code to initialize it.

2014-02-03 Thread Paul Berry
On 1 February 2014 22:37, Jordan Justen jljus...@gmail.com wrote: On Thu, Jan 9, 2014 at 6:19 PM, Paul Berry stereotype...@gmail.com wrote: --- src/mesa/drivers/dri/i965/brw_context.h | 8 src/mesa/drivers/dri/i965/brw_program.c | 11 +++ 2 files changed, 19

Re: [Mesa-dev] [PATCH RFC 10/11] glsl: add a pass to convert out of SSA form

2014-01-31 Thread Paul Berry
() and convert_from_ssa() would just become: void convert_from_ssa(exec_list *instructions) { ir_from_ssa_visitor v; v.run(instructions); } I don't have really strong feelings about it, though. Provided that the confusing comment in eliminate_phi_if() is fixed, this patch is: Reviewed-by: Paul Berry

Re: [Mesa-dev] [PATCH RFC 00/11] glsl: add Single Static Assignment (SSA)

2014-01-31 Thread Paul Berry
where you're going with this. I sent a lot of feedback in response to patches 4, 5, 7, 9, and 10; I don't think any of my feedback would require a major change to your overall plan. Nice work! Consider patches 1, 2, 3, 6, 8, and 11: Reviewed-by: Paul Berry stereotype...@gmail.com Note, however

[Mesa-dev] [PATCH 2/2] glsl: Fix continue statements in do-while loops.

2014-01-31 Thread Paul Berry
From the GLSL 4.40 spec, section 6.4 (Jumps): The continue jump is used only in loops. It skips the remainder of the body of the inner most loop of which it is inside. For while and do-while loops, this jump is to the next evaluation of the loop condition-expression from which the

[Mesa-dev] [PATCH 1/2] glsl: Make condition_to_hir() callable from outside ast_iteration_statement.

2014-01-31 Thread Paul Berry
In addition to making it public, we also need to change its first argument from an ir_loop * to an exec_list *, so that it can be used to insert the condition anywhere in the IR (rather than just in the body of the loop). This will be necessary in order to make continue statements work properly

Re: [Mesa-dev] [PATCH v2 1/7] glsl: parse invocations layout qualifier for ARB_gpu_shader5

2014-01-31 Thread Paul Berry
On 28 January 2014 11:22, Jordan Justen jordan.l.jus...@intel.com wrote: _mesa_glsl_parse_state::gs_invocations will store the invocation count. Signed-off-by: Jordan Justen jordan.l.jus...@intel.com This looks like it will work if the shader contains a line like this: layout(triangles,

Re: [Mesa-dev] [PATCH v2 2/7] glsl/linker: produce gl_shader_program Geom.Invocations

2014-01-31 Thread Paul Berry
, GL_TRIANGLES, or GL_TRIANGLES_ADJACENCY_ARB */ GLenum OutputType; /** GL_POINTS, GL_LINE_STRIP or GL_TRIANGLE_STRIP */ -- 1.8.5.3 With those minor issues addressed, this patch is: Reviewed-by: Paul Berry stereotype...@gmail.com

Re: [Mesa-dev] [PATCH v2 4/7] main/shaderapi: GL_GEOMETRY_SHADER_INVOCATIONS GetProgramiv support

2014-01-31 Thread Paul Berry
)) + *params = shProg-Geom.Invocations; + return; case GL_GEOMETRY_INPUT_TYPE: if (!has_core_gs) break; -- 1.8.5.3 With that fixed, the patch is: Reviewed-by: Paul Berry stereotype...@gmail.com ___ mesa-dev mailing list

Re: [Mesa-dev] [PATCH v2 6/7] i965: support gl_InvocationID for gen7

2014-01-31 Thread Paul Berry
On 28 January 2014 11:22, Jordan Justen jordan.l.jus...@intel.com wrote: Signed-off-by: Jordan Justen jordan.l.jus...@intel.com --- src/mesa/drivers/dri/i965/brw_defines.h | 5 + src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp | 24 --- 2 files changed,

Re: [Mesa-dev] [PATCH v2 7/7] i965: support instanced GS on gen7

2014-01-31 Thread Paul Berry
DEBUG_NO_DUAL_OBJECT_GS))) { This should be , not ||. With that fixed, this patch is: Reviewed-by: Paul Berry stereotype...@gmail.com I sent comments on patches 1, 2, 4, 6, and 7. Patches 3 and 5 are: Reviewed-by: Paul Berry stereotype...@gmail.com ___ mesa-dev

Re: [Mesa-dev] [PATCH RFC 07/11] glsl: add SSA infrastructure

2014-01-28 Thread Paul Berry
On 22 January 2014 09:16, Connor Abbott cwabbo...@gmail.com wrote: This patch introduces all the changes to the IR that are necessary for representing programs in the SSA form. This consists of a new variable mode, the SSA temporary, which is guarenteed to be written to exactly once, and

Re: [Mesa-dev] [PATCH RFC 07/11] glsl: add SSA infrastructure

2014-01-28 Thread Paul Berry
On 22 January 2014 09:16, Connor Abbott cwabbo...@gmail.com wrote: diff --git a/src/glsl/ir_clone.cpp b/src/glsl/ir_clone.cpp index cb732a5..7075579 100644 --- a/src/glsl/ir_clone.cpp +++ b/src/glsl/ir_clone.cpp @@ -40,7 +40,15 @@ ir_rvalue::clone(void *mem_ctx, struct hash_table *ht) const

Re: [Mesa-dev] [PATCH 1/2] mesa: Ensure that transform feedback refers to the correct program.

2014-01-28 Thread Paul Berry
On 28 January 2014 13:15, Carl Worth cwo...@cworth.org wrote: Paul Berry stereotype...@gmail.com writes: Previous to this patch, the _mesa_{Begin,Resume}TransformFeedback functions were using ctx-Shader.CurrentProgram[MESA_SHADER_VERTEX] I see that this commit was nominated for the stable

Re: [Mesa-dev] [PATCH RFC 04/11] glsl: add dead branch analysis

2014-01-27 Thread Paul Berry
about that. With all the comment changes, this patch is: Reviewed-by: Paul Berry stereotype...@gmail.com ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH RFC 05/11] glsl: add loop jump visitor

2014-01-27 Thread Paul Berry
don't feel terribly strongly about it. Either way, the patch is: Reviewed-by: Paul Berry stereotype...@gmail.com ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH] glsl: Add image type to the GLSL IR.

2014-01-22 Thread Paul Berry
On 22 January 2014 04:50, Francisco Jerez curroje...@riseup.net wrote: Paul Berry stereotype...@gmail.com writes: On 15 January 2014 11:42, Francisco Jerez curroje...@riseup.net wrote: v2: Reuse the glsl_sampler_dim enum for images. Reuse the glsl_type::sampler_* fields instead

[Mesa-dev] [PATCH 1/2] mesa: Ensure that transform feedback refers to the correct program.

2014-01-22 Thread Paul Berry
Previous to this patch, the _mesa_{Begin,Resume}TransformFeedback functions were using ctx-Shader.CurrentProgram[MESA_SHADER_VERTEX] to find the program that would be the source of transform feedback data. This isn't correct--if there's a geometry shader present it should be

[Mesa-dev] [PATCH 2/2] i965/gen7: Use to the correct program when uploading transform feedback state.

2014-01-22 Thread Paul Berry
Transform feedback may come from either the geometry shader or the vertex shader, so we can't use ctx-Shader.CurrentProgram[MESA_SHADER_VERTEX] to find the current post-link transform feedback information. Fortunately we can use ctx-TransformFeedback.CurrentObject-shader_program. ---

Re: [Mesa-dev] [PATCH 1/2] mesa: Ensure that transform feedback refers to the correct program.

2014-01-22 Thread Paul Berry
On 22 January 2014 08:20, Kenneth Graunke kenn...@whitecape.org wrote: On 01/22/2014 06:07 AM, Paul Berry wrote: @@ -376,25 +376,48 @@ _mesa_compute_max_transform_feedback_vertices( **/ +/** + * Figure out which stage of the pipeline is the source of transform feedback + * data

Re: [Mesa-dev] [v2 23/23] i965/blorp: switch eu-emitter to use FS IR and fs_generator

2014-01-22 Thread Paul Berry
in fs_inst::target instead of hardcoding it CC: Paul Berry stereotype...@gmail.com Signed-off-by: Topi Pohjolainen topi.pohjolai...@intel.com Thanks, Topi. The whole series is now: Reviewed-by: Paul Berry stereotype...@gmail.com ___ mesa-dev

Re: [Mesa-dev] [PATCH V3 7/8] glsl: remove remaining is_array variables

2014-01-22 Thread Paul Berry
like to encourage you to do a debug build and double-check that piglit tests still pass. You can do that by adding the --enable-debug option when you run ./autogen.sh. With that fixed, the series is: Reviewed-by: Paul Berry stereotype...@gmail.com I'll try to push my patch glsl: Simplify

[Mesa-dev] [PATCH] i965: Replace *_generator::shader with is_glsl boolean.

2014-01-22 Thread Paul Berry
The shader field in fs_generator, vec4_generator, and gen8_generator was only used for one purpose; to figure out if we were compiling an assembly shader or a GLSL shader. And it wasn't being used properly: in vec4 shaders we were always initializing it based on

Re: [Mesa-dev] Two small blorp fixes found during refactoring

2014-01-21 Thread Paul Berry
/test_blorp_blit_eu_gen.cpp| 30 +++--- 2 files changed, 47 insertions(+), 31 deletions(-) Series is: Reviewed-by: Paul Berry stereotype...@gmail.com ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH V2 1/8] mesa: Add ARB_arrays_of_arrays

2014-01-21 Thread Paul Berry
glcpp_parser_create() (in glcpp-parse.y) to call add_builtin_define(parser, GL_ARB_arrays_of_arrays) if extensions-ARB_arrays_of_arrays is set. With that fixed, this patch is: Reviewed-by: Paul Berry stereotype...@gmail.com Personally I would also add the extension

Re: [Mesa-dev] [PATCH V2 2/8] glsl: Add arrays_of_arrays to yacc definition

2014-01-21 Thread Paul Berry
array_specifier { $$ = $1; $$-is_array = true; - $$-array_size = $3; + $$-array_specifier = $2; } ; With those changes, this patch is: Reviewed-by: Paul Berry stereotype...@gmail.com Note, however, that some of my review comments on patch 3/8

Re: [Mesa-dev] [PATCH V2 4/8] glsl: only call mark_max_array if we are assigning an array

2014-01-21 Thread Paul Berry
On 21 January 2014 04:19, Timothy Arceri t_arc...@yahoo.com.au wrote: Signed-off-by: Timothy Arceri t_arc...@yahoo.com.au --- src/glsl/ast_to_hir.cpp | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) Can you say more in the commit message about why you're making this change? Is

[Mesa-dev] [PATCH] glsl: Simplify aggregate type inference to prepare for ARB_arrays_of_arrays.

2014-01-21 Thread Paul Berry
Most of the time it is not necessary to perform type inference to compile GLSL; the type of every expression can be inferred from the contents of the expression itself (and previous type declarations). The exception is aggregate initializers: their type is determined by the LHS of the variable

Re: [Mesa-dev] [PATCH V2 5/8] glsl: Aggregate initializer support for arrays of array

2014-01-21 Thread Paul Berry
On 21 January 2014 04:19, Timothy Arceri t_arc...@yahoo.com.au wrote: Signed-off-by: Timothy Arceri t_arc...@yahoo.com.au --- src/glsl/ast.h | 19 +++- src/glsl/ast_function.cpp | 14 +++-- src/glsl/ast_to_hir.cpp | 29 +-

Re: [Mesa-dev] [PATCH V2 6/8] glsl: Allow arrays of arrays as input to vertex shader

2014-01-21 Thread Paul Berry
alone. With that fixed, this patch is: Reviewed-by: Paul Berry stereotype...@gmail.com ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH V2 6/8] glsl: Allow arrays of arrays as input to vertex shader

2014-01-21 Thread Paul Berry
On 21 January 2014 18:23, Paul Berry stereotype...@gmail.com wrote: On 21 January 2014 04:19, Timothy Arceri t_arc...@yahoo.com.au wrote: Signed-off-by: Timothy Arceri t_arc...@yahoo.com.au --- src/glsl/ast_to_hir.cpp | 4 1 file changed, 4 insertions(+) diff --git a/src/glsl

Re: [Mesa-dev] [PATCH V2 7/8] glsl: create type name for arrays of arrays

2014-01-21 Thread Paul Berry
of the dimensions. With that fixed, this patch is: Reviewed-by: Paul Berry stereotype...@gmail.com + } else { + snprintf(n, name_length, %s[%u], array-name, length); + } + } this-name = n; } -- 1.8.3.1 ___ mesa-dev mailing list

Re: [Mesa-dev] [PATCH V2 8/8] docs: Mark ARB_arrays_of_arrays as started

2014-01-21 Thread Paul Berry
On 21 January 2014 04:19, Timothy Arceri t_arc...@yahoo.com.au wrote: Signed-off-by: Timothy Arceri t_arc...@yahoo.com.au --- docs/GL3.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Paul Berry stereotype...@gmail.com

Re: [Mesa-dev] [PATCH V2 3/8] glsl: Add array specifier to ast code

2014-01-21 Thread Paul Berry
On 21 January 2014 14:54, Timothy Arceri t_arc...@yahoo.com.au wrote: Hi Paul Thanks for the thorough review and taking the time to explain how to make improvements. I can already see a number of improvements that can be made to patch 5 based on the suggestions you have already made so you

Re: [Mesa-dev] [PATCH] glsl: Add image type to the GLSL IR.

2014-01-21 Thread Paul Berry
On 15 January 2014 11:42, Francisco Jerez curroje...@riseup.net wrote: v2: Reuse the glsl_sampler_dim enum for images. Reuse the glsl_type::sampler_* fields instead of creating new ones specific to image types. Reuse the same constructor as for samplers adding a new 'base_type'

Re: [Mesa-dev] [PATCH 10/23] i965/fs: Remove fs_reg::sechalf.

2014-01-21 Thread Paul Berry
On 15 January 2014 13:53, Francisco Jerez curroje...@riseup.net wrote: Paul Berry stereotype...@gmail.com writes: On 2 December 2013 11:31, Francisco Jerez curroje...@riseup.net wrote: +/** + * Get either of the 8-component halves of a 16-component register. + */ +static inline

Re: [Mesa-dev] [PATCH 10/23] i965/fs: Remove fs_reg::sechalf.

2014-01-21 Thread Paul Berry
On 21 January 2014 19:21, Paul Berry stereotype...@gmail.com wrote: not realize that is is safe to call it on a register with 32 bits per component, because they might erroneously think oh, this function only works on 16-component registers; that is, registers that Oops, sorry about

Re: [Mesa-dev] [PATCH 13/23] i965/fs: Take into account reg_offset consistently for MRF regs.

2014-01-21 Thread Paul Berry
On 15 January 2014 14:01, Francisco Jerez curroje...@riseup.net wrote: Paul Berry stereotype...@gmail.com writes: On 2 December 2013 11:31, Francisco Jerez curroje...@riseup.net wrote: Until now it was only being taken into account in the VEC4 back-end but not in the FS back-end. Do

Re: [Mesa-dev] [PATCH 24/42] i965/blorp: move emission of sample combining into eu-emitter

2014-01-20 Thread Paul Berry
for ints. With that change, this patch is: Reviewed-by: Paul Berry stereotype...@gmail.com ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 27/42] i965/blorp: wrap LRP

2014-01-20 Thread Paul Berry
} With those two things fixed, this patch is: Reviewed-by: Paul Berry stereotype...@gmail.com ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 37/42] i965/blorp: wrap brw_IF/ELSE/ENDIF() into eu-emitter

2014-01-20 Thread Paul Berry
); + brw_IF(func, BRW_EXECUTE_16); + } Can we maybe call tihs emit_cmp_if(), so that it's clear when looking at the caller that it performs both a CMP and an IF? With that change, this patch is: Reviewed-by: Paul Berry stereotype...@gmail.com ___ mesa

Re: [Mesa-dev] [PATCH 38/42] i965/fs: allow unit tests to dump the final patched assembly

2014-01-20 Thread Paul Berry
? Either way, the patch is: Reviewed-by: Paul Berry stereotype...@gmail.com ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 39/42] i965/fs: introduce blorp specific rt-write for fs_generator

2014-01-20 Thread Paul Berry
, this patch is: Reviewed-by: Paul Berry stereotype...@gmail.com +inst-mlen, +0, +true, +inst-header_present); +} + ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http

Re: [Mesa-dev] [PATCH 41/42] i965/eu: introduce blorp specific flavour of lrp

2014-01-20 Thread Paul Berry
On 20 December 2013 06:39, Topi Pohjolainen topi.pohjolai...@intel.comwrote: This is rather ugly but as I couldn't think of anything better for now and wanted to get the rest of the series under review, I left it as it is. Even though immediately surrounding code has tabs this piece is

Re: [Mesa-dev] [PATCH 24/42] i965/blorp: move emission of sample combining into eu-emitter

2014-01-20 Thread Paul Berry
On 20 January 2014 19:36, Paul Berry stereotype...@gmail.com wrote: On 20 December 2013 06:38, Topi Pohjolainen topi.pohjolai...@intel.comwrote: diff --git a/src/mesa/drivers/dri/i965/brw_blorp_blit_eu.cpp b/src/mesa/drivers/dri/i965/brw_blorp_blit_eu.cpp index b189aa2..dcfd82b 100644

Re: [Mesa-dev] [PATCH 42/42] i965/blorp: switch eu-emitter to use FS IR and fs_generator

2014-01-20 Thread Paul Berry
are correct, and in the unlikely event that we later discover that they aren't, it'll make it easier to bisect to the problem. With this patch split, it is: Reviewed-by: Paul Berry stereotype...@gmail.com I've sent comments on patches 24, 27, 37, 38, 39, and 41. All the others are: Reviewed

Re: [Mesa-dev] [PATCH] i965: Reserve space for Vertex Count in GS outputs.

2014-01-20 Thread Paul Berry
. This patch does that - and it is indeed much nicer.) --Ken Looks good, thanks! Reviewed-by: Paul Berry stereotype...@gmail.com diff --git a/src/mesa/drivers/dri/i965/brw_vec4_gs.c b/src/mesa/drivers/dri/i965/brw_vec4_gs.c index 018b0b6..c40112b 100644 --- a/src/mesa/drivers/dri/i965

Re: [Mesa-dev] [wip 9/9] mesa: OES_get_program_binary extension functionality

2014-01-17 Thread Paul Berry
On 16 January 2014 05:37, Tapani Pälli tapani.pa...@intel.com wrote: On 01/15/2014 06:13 PM, Paul Berry wrote: On 2 January 2014 03:58, Tapani Pälli tapani.pa...@intel.com wrote: Signed-off-by: Tapani Pälli tapani.pa...@intel.com --- src/mesa/main/shaderapi.c | 44

Re: [Mesa-dev] [wip 8/9] glsl: functions to serialize gl_shader and gl_shader_program

2014-01-17 Thread Paul Berry
On 15 January 2014 02:46, Tapani tapani.pa...@intel.com wrote: On 01/14/2014 07:53 PM, Paul Berry wrote: On 2 January 2014 03:58, Tapani Pälli tapani.pa...@intel.com wrote: +static void +serialize_uniform_storage(gl_uniform_storage *uni, memory_writer blob) I don't think

Re: [Mesa-dev] [wip 1/9] glsl: memory_writer helper class for data serialization

2014-01-17 Thread Paul Berry
On 14 January 2014 02:35, Tapani Pälli tapani.pa...@intel.com wrote: On 01/13/2014 08:27 PM, Paul Berry wrote: On 2 January 2014 03:58, Tapani Pälli tapani.pa...@intel.com wrote: Class will be used by the shader binary cache implementation. Signed-off-by: Tapani Pälli tapani.pa

Re: [Mesa-dev] [wip 6/9] glsl: ir_deserializer class for the binary shader cache

2014-01-17 Thread Paul Berry
On 14 January 2014 03:35, Tapani Pälli tapani.pa...@intel.com wrote: On 01/14/2014 01:24 AM, Paul Berry wrote: On 2 January 2014 03:58, Tapani Pälli tapani.pa...@intel.com wrote: + var-state_slots = NULL; + + if (var-num_state_slots 0) { + var-state_slots = ralloc_array(var

[Mesa-dev] [PATCH] i965: Add GS support to INTEL_DEBUG=shader_time.

2014-01-17 Thread Paul Berry
Previously, time spent in geometry shaders would be counted as part of the vertex shader time. --- src/mesa/drivers/dri/i965/brw_context.h | 3 +++ src/mesa/drivers/dri/i965/brw_program.c | 10 +- src/mesa/drivers/dri/i965/brw_vec4.cpp

Re: [Mesa-dev] [wip 9/9] mesa: OES_get_program_binary extension functionality

2014-01-15 Thread Paul Berry
On 2 January 2014 03:58, Tapani Pälli tapani.pa...@intel.com wrote: Signed-off-by: Tapani Pälli tapani.pa...@intel.com --- src/mesa/main/shaderapi.c | 44 ++-- 1 file changed, 38 insertions(+), 6 deletions(-) diff --git a/src/mesa/main/shaderapi.c

Re: [Mesa-dev] [wip 0/9] GL_OES_get_program_binary extension

2014-01-15 Thread Paul Berry
patches are: Reviewed-by: Paul Berry stereotype...@gmail.com I see that you've already responded to some of my comments. I'm on a business trip this week so I have limited time to answer email, but I'll try to respond to your responses as soon as I can

Re: [Mesa-dev] [wip 8/9] glsl: functions to serialize gl_shader and gl_shader_program

2014-01-14 Thread Paul Berry
On 2 January 2014 03:58, Tapani Pälli tapani.pa...@intel.com wrote: diff --git a/src/glsl/shader_cache.cpp b/src/glsl/shader_cache.cpp new file mode 100644 index 000..4b5de45 --- /dev/null +++ b/src/glsl/shader_cache.cpp @@ -0,0 +1,489 @@ +/* -*- c++ -*- */ +/* + * Copyright © 2013

Re: [Mesa-dev] [wip 1/9] glsl: memory_writer helper class for data serialization

2014-01-13 Thread Paul Berry
On 2 January 2014 03:58, Tapani Pälli tapani.pa...@intel.com wrote: Class will be used by the shader binary cache implementation. Signed-off-by: Tapani Pälli tapani.pa...@intel.com --- src/glsl/memory_writer.h | 147 +++ 1 file changed, 147

Re: [Mesa-dev] [wip 2/9] glsl: serialize methods for IR instructions

2014-01-13 Thread Paul Berry
serialized each time they occur. With those two issues addressed, the patch is: Reviewed-by: Paul Berry stereotype...@gmail.com ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [wip 3/9] glsl: memory_map helper class for data deserialization

2014-01-13 Thread Paul Berry
On 2 January 2014 03:58, Tapani Pälli tapani.pa...@intel.com wrote: Class will be used by the shader binary cache implementation. Signed-off-by: Tapani Pälli tapani.pa...@intel.com --- src/glsl/memory_map.h | 174 ++ 1 file changed, 174

Re: [Mesa-dev] [wip 6/9] glsl: ir_deserializer class for the binary shader cache

2014-01-13 Thread Paul Berry
On 2 January 2014 03:58, Tapani Pälli tapani.pa...@intel.com wrote: + + +/** + * Reads header part of the binary blob. Main purpose of this header is to + * validate that cached shader was produced with same Mesa driver version. + */ +int +ir_deserializer::read_header(struct gl_shader

Re: [Mesa-dev] [PATCH 05/30] glsl/linker: Refactor in preparation for adding more shader stages.

2014-01-10 Thread Paul Berry
On 9 January 2014 22:17, Chris Forbes chr...@ijw.co.nz wrote: This is a nice cleanup; I like that this brings both writes to prog-LastClipDistanceArraySize together -- but it looks like the behavior changes slightly. Previously, if there was no VS and no GS, then we would never write

Re: [Mesa-dev] [PATCH 11/30] mesa: Change redundant code into loops in shaderapi.c.

2014-01-10 Thread Paul Berry
On 9 January 2014 20:03, Chris Forbes chr...@ijw.co.nz wrote: This is a slightly odd construction (although copied from the existing code): + if ((shProg == NULL) || (shProg-_LinkedShaders[stage] == NULL)) +shProg = NULL; You're right. This would be much better as: if

Re: [Mesa-dev] [PATCH 19/30] mesa/cs: Handle compute shaders in _mesa_use_program().

2014-01-10 Thread Paul Berry
On 9 January 2014 22:32, Chris Forbes chr...@ijw.co.nz wrote: Minor nit, but could CS be done after the ordered pipeline stages, for consistency? Sure, no problem. In fact, I just realized that if I change the type parameter of use_shader_program to gl_shader_stage, I can call it in a loop.

Re: [Mesa-dev] [PATCH 12/30] mesa: Change redundant code into loops in texstate.c.

2014-01-10 Thread Paul Berry
On 10 January 2014 11:41, Kenneth Graunke kenn...@whitecape.org wrote: On 01/09/2014 06:19 PM, Paul Berry wrote: This is possible now that ctx-Shader.CurrentProgram is an array. --- src/mesa/main/texstate.c | 75 +++- 1 file changed, 29

[Mesa-dev] [PATCH] i965: Ensure that all necessary state is re-emitted if we run out of aperture.

2014-01-10 Thread Paul Berry
Prior to this patch, if we ran out of aperture space during brw_try_draw_prims(), we would rewind the batch buffer pointer (potentially throwing some state that may have been emitted by brw_upload_state()), flush the batch, and then try again. However, we wouldn't reset the dirty bits to the

Re: [Mesa-dev] [PATCH 5/5] mesa: Use functions to convert gl_shader_stage to PROGRAM enum or pipe target.

2014-01-09 Thread Paul Berry
On 8 January 2014 12:21, Emil Velikov emil.l.veli...@gmail.com wrote: On 08/01/14 19:20, Paul Berry wrote: diff --git a/src/mesa/program/program.h b/src/mesa/program/program.h index 4015b4c..648233c 100644 --- a/src/mesa/program/program.h +++ b/src/mesa/program/program.h @@ -207,6

[Mesa-dev] [PATCH 01/30] mesa: Replace _mesa_program_index_to_target with _mesa_shader_stage_to_program.

2014-01-09 Thread Paul Berry
In my recent zeal to refactor Mesa's handling of the gl_shader_stage enum, I accidentally wound up with two functions that do the same thing: _mesa_program_index_to_target(), and _mesa_shader_stage_to_program(). This patch keeps _mesa_shader_stage_to_program(), since its name is more consistent

[Mesa-dev] [PATCH 03/30] main: Allow ctx == NULL in _mesa_validate_shader_target().

2014-01-09 Thread Paul Berry
This will allow this function to be used in circumstances where there is no context available, such as when building built-in GLSL functions. --- src/mesa/main/shaderapi.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/mesa/main/shaderapi.c

[Mesa-dev] [PATCH 02/30] mesa: Make validate_shader_target() non-static.

2014-01-09 Thread Paul Berry
--- src/mesa/main/shaderapi.c | 8 src/mesa/main/shaderapi.h | 3 +++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c index 6042fa8..716e659 100644 --- a/src/mesa/main/shaderapi.c +++ b/src/mesa/main/shaderapi.c @@

[Mesa-dev] [PATCH 10/30] mesa: Remove ad-hoc arrays of gl_shader_program.

2014-01-09 Thread Paul Berry
Now that we have a ctx-Shader.CurrentProgram array, we can just use it directly. --- src/mesa/main/context.c | 6 +- src/mesa/state_tracker/st_draw.c| 6 +- src/mesa/state_tracker/st_program.c | 6 +- 3 files changed, 3 insertions(+), 15 deletions(-) diff --git

[Mesa-dev] [PATCH 08/30] i965: Fix comments to refer to the new ctx-Shader.CurrentProgram array.

2014-01-09 Thread Paul Berry
--- src/mesa/drivers/dri/i965/brw_wm_state.c | 4 ++-- src/mesa/drivers/dri/i965/gen6_wm_state.c | 4 ++-- src/mesa/drivers/dri/i965/gen7_wm_state.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_wm_state.c

[Mesa-dev] [PATCH 15/30] glsl/cs: Change some linker loops to use MESA_SHADER_FRAGMENT as a bound.

2014-01-09 Thread Paul Berry
Linker loops that iterate through all the stages in the pipeline need to use MESA_SHADER_FRAGMENT as a bound, so that we can add an additional MESA_SHADER_COMPUTE stage, without it being erroneously included in the pipeline. --- src/glsl/linker.cpp | 8 1 file changed, 4 insertions(+), 4

[Mesa-dev] [PATCH 05/30] glsl/linker: Refactor in preparation for adding more shader stages.

2014-01-09 Thread Paul Berry
Rather than maintain separately named arrays and counts for vertex, geometry, and fragment shaders, just maintain these as arrays indexed by the gl_shader_type enum. --- src/glsl/linker.cpp | 114 ++-- 1 file changed, 39 insertions(+), 75

[Mesa-dev] [PATCH 07/30] mesa: Fold long lines introduced by the previous patch.

2014-01-09 Thread Paul Berry
--- src/mesa/drivers/dri/i965/brw_gs_surface_state.c | 6 -- src/mesa/drivers/dri/i965/brw_vec4_gs.c | 5 +++-- src/mesa/drivers/dri/i965/brw_vs.c | 5 +++-- src/mesa/drivers/dri/i965/brw_vs_surface_state.c | 6 -- src/mesa/main/context.c |

[Mesa-dev] [PATCH 18/30] glsl/cs: update main.cpp to use the .comp extension for compute shaders.

2014-01-09 Thread Paul Berry
--- src/glsl/main.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/glsl/main.cpp b/src/glsl/main.cpp index afc15cb..864c929 100644 --- a/src/glsl/main.cpp +++ b/src/glsl/main.cpp @@ -364,6 +364,8 @@ main(int argc, char **argv) shader-Type = GL_GEOMETRY_SHADER; else if

[Mesa-dev] [PATCH 06/30] mesa: Replace ctx-Shader.Current{Vertex, Fragment, Geometry}Program with an array.

2014-01-09 Thread Paul Berry
These are replaced with ctx-Shader.CurrentProgram[MESA_SHADER_{VERTEX,FRAGMENT,GEOMETRY}]. In patches to follow, this will allow us to replace a lot of ad-hoc logic with a variable index into the array. With the exception of the changes to mtypes.h, this patch was generated entirely by the

[Mesa-dev] [PATCH 20/30] mesa/cs: Create the gl_compute_program struct, and the code to initialize it.

2014-01-09 Thread Paul Berry
--- src/mesa/main/mtypes.h | 7 +++ src/mesa/program/program.c | 20 src/mesa/program/program.h | 5 + 3 files changed, 32 insertions(+) diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 8b88d75..e6c3a22 100644 --- a/src/mesa/main/mtypes.h +++

[Mesa-dev] [PATCH 12/30] mesa: Change redundant code into loops in texstate.c.

2014-01-09 Thread Paul Berry
This is possible now that ctx-Shader.CurrentProgram is an array. --- src/mesa/main/texstate.c | 75 +++- 1 file changed, 29 insertions(+), 46 deletions(-) diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c index b9c76da..905a9d5 100644

[Mesa-dev] [PATCH 16/30] mesa/cs: Add a MESA_SHADER_COMPUTE stage and update switch statements.

2014-01-09 Thread Paul Berry
This patch adds MESA_SHADER_COMPUTE to the gl_shader_stage enum. Also, where it is trivial to do so, it adds a compute shader case to switch statements that switch based on the type of shader. This avoids unhandled switch case compiler warnings. --- src/glsl/ast_to_hir.cpp | 9

[Mesa-dev] [PATCH 19/30] mesa/cs: Handle compute shaders in _mesa_use_program().

2014-01-09 Thread Paul Berry
--- src/mesa/main/shaderapi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c index 519b200..5188e9c 100644 --- a/src/mesa/main/shaderapi.c +++ b/src/mesa/main/shaderapi.c @@ -993,6 +993,7 @@ _mesa_use_program(struct gl_context *ctx,

[Mesa-dev] [PATCH 17/30] glsl/cs: Populate default values for ctx-Const.Program[MESA_SHADER_COMPUTE].

2014-01-09 Thread Paul Berry
--- src/glsl/main.cpp | 4 src/glsl/standalone_scaffolding.cpp | 4 2 files changed, 8 insertions(+) diff --git a/src/glsl/main.cpp b/src/glsl/main.cpp index 03b7c78..afc15cb 100644 --- a/src/glsl/main.cpp +++ b/src/glsl/main.cpp @@ -50,6 +50,10 @@

[Mesa-dev] [PATCH 29/30] i965/cs: Create the brw_compute_program struct, and the code to initialize it.

2014-01-09 Thread Paul Berry
--- src/mesa/drivers/dri/i965/brw_context.h | 8 src/mesa/drivers/dri/i965/brw_program.c | 11 +++ 2 files changed, 19 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h index df32ccb..abc1783 100644 ---

[Mesa-dev] [PATCH 09/30] meta: Replace save_state::{Vertex, Geometry, Fragment}Shader with an array.

2014-01-09 Thread Paul Berry
Since ctx-Shader.Current{Vertex,Geometry,Fragment}Program is an array, this allows some meta code to be rolled up into loops. --- src/mesa/drivers/common/meta.c | 30 ++ 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/src/mesa/drivers/common/meta.c

[Mesa-dev] [PATCH 14/30] mesa/cs: Add dispatch API stubs for ARB_compute_shader.

2014-01-09 Thread Paul Berry
--- src/mapi/glapi/gen/ARB_compute_shader.xml | 40 +++ src/mapi/glapi/gen/Makefile.am| 1 + src/mapi/glapi/gen/gl_API.xml | 4 ++- src/mapi/glapi/gen/gl_genexec.py | 1 + src/mesa/Makefile.sources | 1 + src/mesa/SConscript

[Mesa-dev] [PATCH 28/30] glsl/cs: Prohibit mixing of compute and non-compute shaders.

2014-01-09 Thread Paul Berry
Fixes piglit test: spec/ARB_compute_shader/linker/mix_compute_and_non_compute --- src/glsl/linker.cpp | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp index 11e0651..f1344ea 100644 --- a/src/glsl/linker.cpp +++ b/src/glsl/linker.cpp @@ -2107,6

[Mesa-dev] [PATCH 00/30] mesa: Start implementing compute shaders.

2014-01-09 Thread Paul Berry
This is the first of several planned patch series to implement the extension ARB_compute_shader in Mesa. This series allows the Mesa front-end to parse and compile a do-nothing compute shader--that is, one which contains nothing but a compute shader input layout declaration and an empty main()

[Mesa-dev] [PATCH 21/30] mesa/cs: Implement MAX_COMPUTE_WORK_GROUP_SIZE constant.

2014-01-09 Thread Paul Berry
--- src/glsl/builtin_variables.cpp | 27 +++ src/glsl/glsl_parser_extras.cpp | 4 src/glsl/glsl_parser_extras.h | 3 +++ src/glsl/main.cpp | 3 +++ src/glsl/standalone_scaffolding.cpp | 3 +++ src/mesa/main/context.c |

[Mesa-dev] [PATCH 25/30] mesa/cs: Handle compute shader local size during linking.

2014-01-09 Thread Paul Berry
--- src/glsl/linker.cpp | 64 +++ src/mesa/main/mtypes.h| 17 + src/mesa/main/shaderapi.c | 7 ++ 3 files changed, 88 insertions(+) diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp index 7461b17..11e0651 100644 ---

  1   2   3   4   5   6   7   8   9   10   >