Re: [Mesa-dev] [PATCH 1/2] compiler: Free types in _mesa_glsl_release_types() rather than autofree.

2017-02-27 Thread Kenneth Graunke
On Monday, February 27, 2017 5:49:03 AM PST Lionel Landwerlin wrote: > Does this fix the double free issue I've been seeing in shader-db? No. I was looking into that bug, and wrote these patches when trying out various theories about what might be going wrong...but it doesn't actually solve that

Re: [Mesa-dev] [PATCH] mesa: Require mipmap completeness for glCopyImageSubData(), sometimes.

2017-02-27 Thread Kenneth Graunke
On Monday, February 27, 2017 5:42:36 AM PST Roland Scheidegger wrote: > Sounds exactly like something which applications would get wrong (as the > condition is indeed quite bizarre). I agree - and it's pointless. I think it would be better to clarify the specification to say that sampler-based co

[Mesa-dev] [PATCH shader-db 2/2] run: Make crash handler more robust against late crashes.

2017-02-27 Thread Kenneth Graunke
We might crash in the final eglTerminate and gbm_device_destroy functions, or atexit() handlers, at which point we've freed the current_shader_names array. We shouldn't access it. --- run.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) We're still crashing in atexit()

[Mesa-dev] [PATCH shader-db 1/2] run: Set current_shader_names[i] to NULL before freeing it.

2017-02-27 Thread Kenneth Graunke
current_shader_names[i] is set to shader_test[i].filename. Before we free that, we should NULL out the pointer (also indicating the current thread is done with this shader). That way, the crash handler won't print garbage when trying to list what threads were doing. --- run.c | 2 ++ 1 file chan

Re: [Mesa-dev] [PATCH 09/12] i965/fs: Hook up SIMD lowering to handle texturing opcodes of unsupported width.

2015-07-23 Thread Kenneth Graunke
at to say /* Gen4-6 can't support TXL and TXB with shadow comparison in SIMD16 * mode because the message exceeds the maximum length of 11. */ (it wasn't obvious to me why that was disallowed, at first) Other than my concern about regs_read() for offset in patch 1

[Mesa-dev] [PATCH v2] glsl: Fix a bug where LHS swizzles of swizzles were too small.

2015-07-28 Thread Kenneth Graunke
. Cc: mesa-sta...@lists.freedesktop.org Signed-off-by: Kenneth Graunke Reviewed-by: Timothy Arceri [v1] --- src/glsl/ir.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Hey Tim, does this look better? diff --git a/src/glsl/ir.cpp b/src/glsl/ir.cpp index 3a40926..724861b 100644 --- a/src/glsl/i

[Mesa-dev] [PATCH] i965: Use real stage in "Unsupported form of variable indexing" warning.

2015-07-28 Thread Kenneth Graunke
Other stages can be miserably slow too! Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_shader.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_shader.cpp b/src/mesa/drivers/dri/i965/brw_shader.cpp index 7808212

Re: [Mesa-dev] [PATCH] i965/bxt: Support 3src simd16 instructions

2015-07-28 Thread Kenneth Graunke
; }; > > static const struct brw_device_info brw_device_info_skl_gt3 = { > GEN9_FEATURES, .gt = 3, > - .supports_simd16_3src = true, > }; > > static const struct brw_device_info brw_device_info_bxt = { > Reviewed-by: Kenneth Graunke signature.asc Description: This is a di

Re: [Mesa-dev] [PATCH] i965/bxt: Don't use brw_device_info_skl_early on BXT

2015-07-29 Thread Kenneth Graunke
mp; > + !devinfo->is_broxton && > + (revision == 2 || revision == 3 || revision == -1)) > return &brw_device_info_skl_early; > > return devinfo; > Reviewed-by: Kenneth Graunke signature.asc Description: This is a digitally signed message

Re: [Mesa-dev] [PATCH 10/21] nir/cf: add block_ends_in_jump()

2015-07-29 Thread Kenneth Graunke
On Tuesday, July 21, 2015 07:54:24 PM Connor Abbott wrote: > Signed-off-by: Connor Abbott > --- > src/glsl/nir/nir_control_flow.c | 8 > 1 file changed, 8 insertions(+) > > diff --git a/src/glsl/nir/nir_control_flow.c b/src/glsl/nir/nir_control_flow.c > index b416a58..b99bf89 100644 > -

Re: [Mesa-dev] [PATCH 00/21] NIR control flow modification

2015-07-30 Thread Kenneth Graunke
f: add remove_phi_src() helper > nir/cf: split up and improve nir_handle_remove_jumps() > nir/cf: handle phi nodes better in split_block_beginning() > nir/cf: add block_ends_in_jump() > nir/cf: handle jumps in split_block_end() > nir/cf: handle jumps better in stitch_blocks()

Re: [Mesa-dev] [PATCH] i965: Fix missing BRW_NEW_FS_PROG_DATA in gen6_renderbuffer_surfaces.

2015-08-02 Thread Kenneth Graunke
On Saturday, August 01, 2015 05:43:26 PM Emil Velikov wrote: > On 6 July 2015 at 21:40, Kenneth Graunke wrote: > > On Monday, July 06, 2015 12:18:18 PM Matt Turner wrote: > >> On Mon, Jul 6, 2015 at 9:55 AM, Kenneth Graunke > >> wrote: > >> > It

Re: [Mesa-dev] [PATCH] glsl: when generating out/inout parameter fixups, do indexing before the call

2015-08-03 Thread Kenneth Graunke
e actual > * parameter to the new temporary. Note that no type conversion is > allowed > * here because inout parameters must match types exactly. > Yikes. You can get into trouble with array dereferences too. Would be nice to fix those as well

Re: [Mesa-dev] [PATCH 00/21] NIR control flow modification

2015-08-05 Thread Kenneth Graunke
no successors > nir/cf: add a cursor structure > nir/cf: add split_block_before_instr() > nir/cf: add split_block_cursor() > nir/cf: use a cursor for inserting control flow > nir/cf: add new control modification API's > nir/cf: reimplement nir_cf_node_remove() using t

Re: [Mesa-dev] [PATCH 20/21] nir/cf: add new control modification API's

2015-08-05 Thread Kenneth Graunke
gt; +static inline void > +nir_cf_list_extract(nir_cf_list *extracted, struct exec_list *cf_list) > +{ > + nir_cf_extract(extracted, nir_before_cf_list(cf_list), > + nir_after_cf_list(cf_list)); > +} > + > #ifdef __cplusplus > } > #endif > Give

[Mesa-dev] [PATCH 2/3] gallium/ttn: Use nir_builder_insert() rather than poking at cf_list.

2015-08-06 Thread Kenneth Graunke
I intend to remove nir_builder::cf_node_list, so I can't have this code poking at it directly. The proper way is to set the insertion point and then simply insert things there. Signed-off-by: Kenneth Graunke --- src/gallium/auxiliary/nir/tgsi_to_nir.c | 32 --

[Mesa-dev] [PATCH 1/3] prog_to_nir: Use nir_builder_insert() rather than poking at cf_list.

2015-08-06 Thread Kenneth Graunke
I intend to remove nir_builder::cf_node_list, so I can't have this code poking at it directly. The proper way is to set the insertion point and then simply insert things there. Signed-off-by: Kenneth Graunke --- src/mesa/program/prog_to_nir.c | 22 +++--- 1 file change

[Mesa-dev] [PATCH 3/3] nir: Convert the builder to use the new NIR cursor API.

2015-08-06 Thread Kenneth Graunke
for better or worse. Signed-off-by: Kenneth Graunke --- src/gallium/auxiliary/nir/tgsi_to_nir.c| 34 +++--- .../drivers/freedreno/ir3/ir3_nir_lower_if_else.c | 2 +- src/gallium/drivers/vc4/vc4_nir_lower_io.c | 6 +-- src/glsl/nir/nir_builder.h

Re: [Mesa-dev] [PATCH 3/3] nir: Convert the builder to use the new NIR cursor API.

2015-08-06 Thread Kenneth Graunke
On Thursday, August 06, 2015 10:15:24 AM Kenneth Graunke wrote: > -static inline void > -nir_builder_insert_after_instr(nir_builder *build, nir_instr *after_instr) > +nir_builder_instr_insert(nir_builder *build, nir_instr *instr) > { > - build->cf_node_list = NULL; > -

Re: [Mesa-dev] [PATCH 00/21] NIR control flow modification

2015-08-06 Thread Kenneth Graunke
On Tuesday, July 21, 2015 07:54:14 PM Connor Abbott wrote: > Back when I was getting NIR up and running, I created a bunch of > functions that dealt with modifying control flow; they allowed you to > remove control flow nodes (if's, loops, and basic blocks) as well as > insert newly-created control

[Mesa-dev] [PATCH] nir: Delete the nir_function_impl::start_block field.

2015-08-06 Thread Kenneth Graunke
o Connor Abbott for suggesting this. Signed-off-by: Kenneth Graunke --- src/glsl/nir/nir.c | 1 - src/glsl/nir/nir.h | 8 +++- src/glsl/nir/nir_dominance.c | 9 + src/glsl/nir/nir_lower_vars_to_ssa.c | 2 +- src/glsl/nir/nir_opt_gcm.c

Re: [Mesa-dev] [PATCH] i965/skl: Remove early platform support

2015-08-09 Thread Kenneth Graunke
ly; > + if (IS_SKL(devinfo) && (revision != -1 && revision <= 3)) { > + fprintf(stderr, > + "i965_dri.so does not support this PCI ID with revision %d.\n", > + revision); > + return NULL; > + } > >

Re: [Mesa-dev] [PATCH 1/2] mesa: Move varying slots and FS output names to shader_enums.h

2015-08-09 Thread Kenneth Graunke
tty sure Jason had to do this in his SPIR-V branch as well; it certainly seems like a good idea. Acked-by: Kenneth Graunke signature.asc Description: This is a digitally signed message part. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://

Re: [Mesa-dev] [PATCH 07/70] i965: Combine the multiple pipelined register detection into one round-trip

2015-08-10 Thread Kenneth Graunke
On Friday, August 07, 2015 09:13:11 PM Chris Wilson wrote: > Combining the multiple access checks into a few batches and a single > serialising read can reduce detection times from around 100us to 70us on > a fast Haswell system. > > Signed-off-by: Chris Wilson > C

Re: [Mesa-dev] [PATCH 5/5] i965/vec4_nir: Properly handle integer multiplies on BDW+

2015-08-11 Thread Kenneth Graunke
On Monday, August 03, 2015 05:22:14 PM Jason Ekstrand wrote: > --- > src/mesa/drivers/dri/i965/brw_vec4_nir.cpp | 52 > -- > 1 file changed, 28 insertions(+), 24 deletions(-) > > diff --git a/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp > b/src/mesa/drivers/dri/i965/br

Re: [Mesa-dev] [PATCH 1/2] i965: Optimize brw_inst_bits() and brw_compact_inst_bits().

2015-08-11 Thread Kenneth Graunke
_t mask = ((1ull << (high - low + 1)) - 1); Every + line in this patch has bonus parens around the entire expression, which are unnecessary - personally, I'd drop them. But that's a stylistic preference, and it's totally your call. Both patches are: Reviewed-by: Kenneth Graunke

Re: [Mesa-dev] [PATCH 2/2][RFC] docs: Add the 2015 ARB extensions

2015-08-12 Thread Kenneth Graunke
On Wednesday, August 12, 2015 06:32:50 PM Thomas Helland wrote: > 2015-08-12 17:48 GMT+02:00 Ilia Mirkin : > > On Tue, Aug 11, 2015 at 1:48 PM, Thomas Helland > > wrote: > >> Signed-off-by: Thomas Helland > >> --- > >> This adds a section for the extensions nvidia has chosen to > >> call the "GL

Re: [Mesa-dev] [PATCH 1/3] i965: Rename brw_upload_item_data to brw_alloc_item_data

2015-08-12 Thread Kenneth Graunke
On Thursday, June 25, 2015 03:45:36 PM Topi Pohjolainen wrote: > and simplify the interface to take directly the size and to return > the offset. The routine does nothing more than allocate, it doesn't > upload anything. > > CC: Kenneth Graunke > Signed-off-by: Topi Po

Re: [Mesa-dev] [PATCH] gl-2.0: Add test for re-using shader objects

2015-08-12 Thread Kenneth Graunke
ic begins to share only one copy between > two entries in the cache. > > CC: Kenneth Graunke > Signed-off-by: Topi Pohjolainen > --- > tests/spec/gl-2.0/CMakeLists.gl.txt | 1 + > tests/spec/gl-2.0/reuse_fragment_shader.c | 105 > +

[Mesa-dev] [PATCH] i965: Improve disassembly of data port read messages.

2015-08-13 Thread Kenneth Graunke
We now print out the name of the message instead of its numerical value, and label the message control and surface numbers. Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_disasm.c | 31 +++ 1 file changed, 27 insertions(+), 4 deletions(-) diff

Re: [Mesa-dev] [PATCH 08/70] i965: Remove early release of DRI2 miptree

2015-08-13 Thread Kenneth Graunke
On Thursday, August 13, 2015 02:57:20 PM Martin Peres wrote: > On 07/08/15 23:13, Chris Wilson wrote: > > intel_update_winsys_renderbuffer_miptree() will release the existing > > miptree when wrapping a new DRI2 buffer, so we can remove the early > > release and so prevent a NULL mt dereference sho

Re: [Mesa-dev] [PATCH 08/70] i965: Remove early release of DRI2 miptree

2015-08-13 Thread Kenneth Graunke
On Thursday, August 13, 2015 02:57:20 PM Martin Peres wrote: > On 07/08/15 23:13, Chris Wilson wrote: > > intel_update_winsys_renderbuffer_miptree() will release the existing > > miptree when wrapping a new DRI2 buffer, so we can remove the early > > release and so prevent a NULL mt dereference sho

Re: [Mesa-dev] [PATCH] glsl: add missing MS sampler builtin types for GLSL ES 3.10

2015-08-14 Thread Kenneth Graunke
yextra->ARB_texture_multisample_enable, USAMPLER2DMS); > sampler2DMSArray KEYWORD_WITH_ALT(150, 300, 150, 0, > yyextra->ARB_texture_multisample_enable, SAMPLER2DMSARRAY); > isampler2DMSArray KEYWORD_WITH_ALT(150, 300, 150, 0, > yyextra->ARB_texture_multisample_enable, ISAMPLER2DMSAR

[Mesa-dev] [PATCH] nir: Add a glsl_uint_type() wrapper.

2015-08-14 Thread Kenneth Graunke
Signed-off-by: Kenneth Graunke --- src/glsl/nir/nir_types.cpp | 6 ++ src/glsl/nir/nir_types.h | 1 + 2 files changed, 7 insertions(+) diff --git a/src/glsl/nir/nir_types.cpp b/src/glsl/nir/nir_types.cpp index 62176f5..940c676 100644 --- a/src/glsl/nir/nir_types.cpp +++ b/src/glsl/nir

[Mesa-dev] [PATCH 1/8] nir: Pull nir_lower_io's load_op selection into a helper function.

2015-08-17 Thread Kenneth Graunke
Makes the function a bit smaller. Signed-off-by: Kenneth Graunke --- src/glsl/nir/nir_lower_io.c | 39 ++- 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/src/glsl/nir/nir_lower_io.c b/src/glsl/nir/nir_lower_io.c index 71bfd34..f3d11d4 100644

[Mesa-dev] [PATCH 5/8] i965/nir: Move IO lowering into helper functions.

2015-08-17 Thread Kenneth Graunke
I plan to expand these, so moving them into helper functions will keep things cleaner. Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_nir.c | 51 ++--- 1 file changed, 31 insertions(+), 20 deletions(-) diff --git a/src/mesa/drivers/dri/i965

[Mesa-dev] [PATCH 7/8] i965/vs: Map scalar VS input locations properly; avoid tons of MOVs.

2015-08-17 Thread Kenneth Graunke
reworks our input lowering to produce NIR lower_input intrinsics that properly index into the ATTR file, so we can access it directly. No changes in shader-db. Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_fs.cpp | 2 +- src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 71

[Mesa-dev] [PATCH 6/8] nir: Allow nir_lower_io() to only lower one type of variable.

2015-08-17 Thread Kenneth Graunke
We may want to use different type_size functions for (e.g.) inputs vs. uniforms. Passing in -1 for mode ignores this, handling all modes as before. Signed-off-by: Kenneth Graunke --- src/glsl/nir/nir.h | 1 + src/glsl/nir/nir_lower_io.c | 21 + src

[Mesa-dev] [PATCH 2/8] nir: Use nir_builder in nir_lower_io's get_io_offset().

2015-08-17 Thread Kenneth Graunke
Much more readable. Signed-off-by: Kenneth Graunke --- src/glsl/nir/nir_lower_io.c | 42 ++ 1 file changed, 14 insertions(+), 28 deletions(-) diff --git a/src/glsl/nir/nir_lower_io.c b/src/glsl/nir/nir_lower_io.c index f3d11d4..d33aefe 100644 --- a/src

[Mesa-dev] [PATCH 8/8] i965/vs: Simplify fs_visitor's ATTR file.

2015-08-17 Thread Kenneth Graunke
not. Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_fs.cpp | 26 +++ src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 2 +- src/mesa/drivers/dri/i965/brw_nir.c | 48 +--- 3 files changed, 50 insertions(+), 26 deletions(-) diff --gi

[Mesa-dev] [PATCH 3/8] i965: Move type_size() methods out of visitor classes.

2015-08-17 Thread Kenneth Graunke
I want to use C function pointers to these, and they don't use anything in the visitor classes anyway. Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_fs.cpp | 10 +- src/mesa/drivers/dri/i965/brw_fs.h | 1 - src/mesa/drivers/dri

[Mesa-dev] [PATCH 4/8] nir: Pass a type_size() function pointer into nir_lower_io().

2015-08-17 Thread Kenneth Graunke
count things, reduces code duplication, and improves consistency. Signed-off-by: Kenneth Graunke --- src/glsl/nir/nir.h | 8 +-- src/glsl/nir/nir_lower_io.c | 118 +--- src/mesa/drivers/dri/i965/brw_nir.c | 16 +++-- 3 files change

Re: [Mesa-dev] [PATCH 8/8] i965/vs: Simplify fs_visitor's ATTR file.

2015-08-18 Thread Kenneth Graunke
On Monday, August 17, 2015 09:53:20 PM Jason Ekstrand wrote: > On Aug 17, 2015 4:08 PM, "Kenneth Graunke" wrote: > > > > Previously, ATTR was indexed by VERT_ATTRIB_* slots; at the end of > > compilation, assign_vs_urb_setup() translated those into GRF units, &g

[Mesa-dev] Can we use anonymous unions?

2015-08-18 Thread Kenneth Graunke
Hey, I was thinking about using an anonymous union. Specifically, something like: struct shader { ... union { struct geometry_shader_info gs; struct tess_eval_shader_info tes; ... }; }; Are those acceptable in Mesa? I don't think we've traditionally used them, but I'

Re: [Mesa-dev] [PATCH] i965: Move control flush into pipelined conditional render

2015-08-21 Thread Kenneth Graunke
at the flush enable bit "waits until all previous writes of > immediate data from post sync circles are complete before executing the > next commend" - the operative word being previous! > > Signed-off-by: Chris Wilson > Cc: Neil Roberts > Cc: Kenneth Gra

[Mesa-dev] [PATCH 2/2] nir: Use nir_shader::stage rather than passing it around.

2015-08-21 Thread Kenneth Graunke
Signed-off-by: Kenneth Graunke --- src/glsl/nir/glsl_to_nir.cpp| 10 -- src/glsl/nir/nir.h | 3 +-- src/glsl/nir/nir_lower_samplers.cpp | 6 +++--- src/mesa/drivers/dri/i965/brw_nir.c | 2 +- 4 files changed, 9 insertions(+), 12 deletions(-) diff --git a/src

[Mesa-dev] [PATCH 1/2] nir: Store gl_shader_stage in nir_shader.

2015-08-21 Thread Kenneth Graunke
This makes it easy for NIR passes to inspect what kind of shader they're operating on. Thanks to Michel Dänzer for helping me figure out where TGSI stores the shader stage information. Signed-off-by: Kenneth Graunke --- src/gallium/auxiliary/nir/tgsi_to_nir.c

[Mesa-dev] [PATCH] nir: Use !block_ends_in_jump() in a few places rather than open-coding.

2015-08-24 Thread Kenneth Graunke
Connor introduced this helper recently; we should use it here too. I had to move the function earlier in the file for it to be available. Signed-off-by: Kenneth Graunke --- src/glsl/nir/nir_control_flow.c | 21 + 1 file changed, 9 insertions(+), 12 deletions(-) diff --git

Re: [Mesa-dev] [PATCH 1/6] i965: Remove by-lines from file headers

2015-08-24 Thread Kenneth Graunke
On Wednesday, August 19, 2015 07:49:00 PM Ian Romanick wrote: > From: Ian Romanick > > A long, long time ago we decided that the author tracking in GIT was > sufficient. However, people copy-and-paste the copyright header from > one file to the next, and the "Authors:" listing lives on. > > Kil

Re: [Mesa-dev] [PATCH 08/21] nir/intrinsics: Add a second const index to load_uniform

2015-08-24 Thread Kenneth Graunke
On Wednesday, August 19, 2015 10:45:43 PM Jason Ekstrand wrote: > In the i965 backend, we want to be able to "pull apart" the uniforms and > push some of them into the shader through a different path. In order to do > this effectively, we need to know which variable is actually being referred > to

Re: [Mesa-dev] [PATCH 09/21] nir/lower_io: Separate driver_location and base offset for uniforms

2015-08-24 Thread Kenneth Graunke
On Wednesday, August 19, 2015 10:45:44 PM Jason Ekstrand wrote: > v2 (Jason Ekstrand): Fix up image uniforms > --- > src/glsl/nir/nir_lower_io.c | 9 +++-- > src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 13 + > 2 files changed, 8 insertions(+), 14 deletions(-) > > diff

[Mesa-dev] [PATCH] prog_to_nir: Don't allocate nir_variable with type vec4[0] for uniforms.

2015-08-24 Thread Kenneth Graunke
If there are no parameters, we don't need to create a nir_variable to hold them...and allocating an array of length 0 is pretty bogus. Should avoid i965 backend assertions in future patches Jason and I are working on. Signed-off-by: Kenneth Graunke --- src/mesa/program/prog_to_nir.c

Re: [Mesa-dev] [PATCH 13/21] i965/fs: Combine assign_constant_locations and move_uniform_array_access_to_pull_constants

2015-08-24 Thread Kenneth Graunke
On Wednesday, August 19, 2015 10:45:48 PM Jason Ekstrand wrote: > The comment above move_uniform_array_access_to_pull_constants was > completely bogus because it has nothing to do with lowering instructions. > Instead, it's assiging locations of pull constants. > --- > src/mesa/drivers/dri/i965/br

Re: [Mesa-dev] [PATCH 09/21] nir/lower_io: Separate driver_location and base offset for uniforms

2015-08-24 Thread Kenneth Graunke
On Monday, August 24, 2015 04:14:13 PM Jason Ekstrand wrote: > On Mon, Aug 24, 2015 at 4:03 PM, Kenneth Graunke > wrote: > > On Wednesday, August 19, 2015 10:45:44 PM Jason Ekstrand wrote: > >> v2 (Jason Ekstrand): Fix up image uniforms > >> --- >

Re: [Mesa-dev] [PATCH 09/21] nir/lower_io: Separate driver_location and base offset for uniforms

2015-08-24 Thread Kenneth Graunke
On Monday, August 24, 2015 04:51:48 PM Kenneth Graunke wrote: > On Monday, August 24, 2015 04:14:13 PM Jason Ekstrand wrote: > > On Mon, Aug 24, 2015 at 4:03 PM, Kenneth Graunke > > wrote: > > > On Wednesday, August 19, 2015 10:45:44 PM Jason Ekstrand wrote: > >

Re: [Mesa-dev] [PATCH 7/8] i965/vs: Map scalar VS input locations properly; avoid tons of MOVs.

2015-08-24 Thread Kenneth Graunke
On Monday, August 17, 2015 09:38:46 PM Jason Ekstrand wrote: > On Aug 17, 2015 4:08 PM, "Kenneth Graunke" wrote: > > > > Previously, we used nir_lower_io with the scalar type_size function, > > which mapped VERT_ATTRIB_* locations to...some numbers. Then, in &

Re: [Mesa-dev] [PATCH 7/8] i965/vs: Map scalar VS input locations properly; avoid tons of MOVs.

2015-08-24 Thread Kenneth Graunke
On Monday, August 17, 2015 09:48:13 PM Jason Ekstrand wrote: > On Aug 17, 2015 4:08 PM, "Kenneth Graunke" wrote: > > > > Previously, we used nir_lower_io with the scalar type_size function, > > which mapped VERT_ATTRIB_* locations to...some numbers. Then, in &

[Mesa-dev] [PATCH 5/5] nir: Convert the builder to use the new NIR cursor API.

2015-08-25 Thread Kenneth Graunke
for better or worse. v2: Actually move the cursor in the after_instr case. v3: Take advantage of nir_instr_insert (suggested by Connor). v4: vc4 build fixes (thanks to Eric). Signed-off-by: Kenneth Graunke Reviewed-by: Eric Anholt [v1] --- src/gallium/auxiliary/nir/tgsi_to_nir.c

[Mesa-dev] [PATCH 4/5] nir: Convert the NIR instruction insertion API to use cursors.

2015-08-25 Thread Kenneth Graunke
. Signed-off-by: Kenneth Graunke --- src/glsl/nir/nir.c | 115 ++--- src/glsl/nir/nir.h | 7 2 files changed, 63 insertions(+), 59 deletions(-) diff --git a/src/glsl/nir/nir.c b/src/glsl/nir/nir.c index ff758f4..a3e7966 100644 --- a/src/glsl/nir

[Mesa-dev] [PATCH 1/5] nir: Make nir_block_{first, last}_instr return NULL for empty blocks.

2015-08-25 Thread Kenneth Graunke
This is a lot more reasonable than returning an offset from NULL. Signed-off-by: Kenneth Graunke --- src/glsl/nir/nir.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/glsl/nir/nir.h b/src/glsl/nir/nir.h index 40871f7..12ddeb2 100644 --- a/src/glsl/nir/nir.h +++ b

[Mesa-dev] [PATCH 3/5] nir: Move nir_cursor to nir.h.

2015-08-25 Thread Kenneth Graunke
We want to use this for normal instruction insertion too, not just control flow. Generally these functions are going to be extremely useful when working with NIR, so I want them to be widely available without having to include a separate file. Signed-off-by: Kenneth Graunke --- src/glsl/nir

[Mesa-dev] [PATCH 2/5] nir: Strengthen "no jumps" assertions in instruction insertion API.

2015-08-25 Thread Kenneth Graunke
: Kenneth Graunke --- src/glsl/nir/nir.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/glsl/nir/nir.c b/src/glsl/nir/nir.c index 77cc4f0..ff758f4 100644 --- a/src/glsl/nir/nir.c +++ b/src/glsl/nir/nir.c @@ -675,9 +675,10 @@ nir_instr_insert_before(nir_instr *instr

Re: [Mesa-dev] [PATCH] glsl/glcpp: allow undefining __VERSION__ and GL_

2015-08-26 Thread Kenneth Graunke
On Wednesday, August 26, 2015 04:55:32 PM Dave Airlie wrote: > On 26 August 2015 at 16:48, Ilia Mirkin wrote: > > On Wed, Aug 26, 2015 at 2:38 AM, Dave Airlie wrote: > >> From: Dave Airlie > >> > >> GL33-CTS.shaders.preprocessor.definitions.* > >> has 4 tests the undefine these, > >> > >> I can'

[Mesa-dev] [PATCH] i965: Rename INTEL_DEBUG=vec4vs to INTEL_DEBUG=vec4.

2015-08-26 Thread Kenneth Graunke
bably improve the driconf parsing, but for now, just rename the option so it's usable in the meantime. Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/intel_debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/intel_debug.

Re: [Mesa-dev] [PATCH 0/2] i965: Two more UNIFORM cleanups

2015-08-27 Thread Kenneth Graunke
--- > 1 file changed, 42 insertions(+), 48 deletions(-) Both are: Reviewed-by: Kenneth Graunke signature.asc Description: This is a digitally signed message part. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 1/6] i965: Only consider fixed_hw_reg in equals() if file is HW_REG/IMM.

2015-08-27 Thread Kenneth Graunke
MM) || > +memcmp(&fixed_hw_reg, &r.fixed_hw_reg, > + sizeof(fixed_hw_reg)) == 0)); > } > > bool > Nice! The updated live range handling makes a lot more sense - I always thought the old stuff was bunk...n

Re: [Mesa-dev] [PATCH 07/10] glsl: add support for the imageSamples function

2015-08-27 Thread Kenneth Graunke
On Thursday, August 27, 2015 11:48:36 PM Ilia Mirkin wrote: > Signed-off-by: Ilia Mirkin > --- > src/glsl/builtin_functions.cpp | 48 > +++--- > 1 file changed, 45 insertions(+), 3 deletions(-) > > diff --git a/src/glsl/builtin_functions.cpp b/src/glsl/builti

Re: [Mesa-dev] [PATCH 06/10] i965: add support for textureSamples function

2015-08-27 Thread Kenneth Graunke
.cpp > @@ -2566,6 +2566,7 @@ vec4_visitor::emit_texture(ir_texture_opcode op, > case ir_tg4: opcode = offset_value.file != BAD_FILE > ? SHADER_OPCODE_TG4_OFFSET : SHADER_OPCODE_TG4; > break; > case ir_query_levels: opcode = SHADER_OPCODE_TXS

Re: [Mesa-dev] [PATCH 1/2] i965/gen9: Annotate input coverage mask change

2015-08-27 Thread Kenneth Graunke
ou cited, and "NORMAL" corresponds to the overestimating mode, where any sample covered => all enabled. It's also the same bit (2 << 0 as opposed to 1 << 1), which suggests it's probably equivalent. This looks good to me

Re: [Mesa-dev] [PATCH 2/2] i965/gen: Don't conflate base miplevel in sampler state

2015-08-27 Thread Kenneth Graunke
On Thursday, August 27, 2015 11:50:52 AM Ben Widawsky wrote: > Gen9 changes the meaning of this to coarse LOD quality mode. Although that's a > desirable thing to be setting, it doesn't match the gen8 behavior and this was > unintentional. > > This doesn't fix, or regress anything on SKL (AFAICT).

[Mesa-dev] [PATCH 09/12] i965/gs: Don't reserve space for clip plane uniforms.

2015-08-29 Thread Kenneth Graunke
These were only for legacy userclipping, which we no longer support in geometry shaders. Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_gs.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_gs.c b/src/mesa/drivers/dri/i965/brw_gs.c index

[Mesa-dev] [PATCH 06/12] i965: Virtualize vec4_visitor::emit_urb_slot().

2015-08-29 Thread Kenneth Graunke
and continue downcasting. Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_vec4.h | 2 +- src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp| 15 - src/mesa/drivers/dri/i965/brw_vec4_vs_visitor.cpp | 26 +++ src/mesa/drivers/dri/i965/brw

[Mesa-dev] [PATCH 04/12] i965: Move legacy clip plane handling to vec4_vs_visitor.

2015-08-29 Thread Kenneth Graunke
This is now only used for the vertex shader, so it makes sense to get it out of any paths run by the geometry shader. By wrapping the run() method, we can eliminate the bogus NULL parameter in the GS case, and do VS things only for the VS. Signed-off-by: Kenneth Graunke --- src/mesa/drivers

[Mesa-dev] [PATCH 03/12] i965: Delete the brw_vue_program_key::userclip_active flag.

2015-08-29 Thread Kenneth Graunke
. Checking if it's > 0 works for detecting this case. Gen4-5 also wants to know whether we're doing clipping at all, so it can emit user clip flags. Checking if output_reg[VARYING_SLOT_CLIP_DIST0] is set to a real register suffices for this. Signed-off-by: Kenneth Graunke --- src/mes

[Mesa-dev] [PATCH 12/12] i965: Simplify handling of VUE map changes.

2015-08-29 Thread Kenneth Graunke
ms. If it changes, flag it. Done. Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_context.h | 12 +--- src/mesa/drivers/dri/i965/brw_gs.c | 14 +- src/mesa/drivers/dri/i965/brw_state_upload.c | 14 +- src/mesa/drivers/dri/i96

[Mesa-dev] [PATCH 01/12] i965: Move brw_setup_tex_for_precompile to brw_program.[ch].

2015-08-29 Thread Kenneth Graunke
d-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_fs.cpp| 19 --- src/mesa/drivers/dri/i965/brw_fs.h | 3 --- src/mesa/drivers/dri/i965/brw_program.c | 19 +++ src/mesa/drivers/dri/i965/brw_program.h | 4 4 files changed, 23 insertions(+

[Mesa-dev] i965: Clipping, GS, and VUE map simplifications

2015-08-29 Thread Kenneth Graunke
Hello, I've been thinking a lot about VS/GS/HS/DS inputs and outputs lately. Ideally, I'd like to know the input layout at NIR creation time, so I can make nir_lower_io() produce nice offsets into the VUE or pushed registers. One thing that complicates that is when the inputs/outputs change based

[Mesa-dev] [PATCH 08/12] i965: Don't do legacy userclipping in non-compatibility contexts.

2015-08-29 Thread Kenneth Graunke
ce a value to be written when clip planes are enabled in the API. This could mean the first varying slot would be used as clip distances - I believe it should be the safe kind of undefined behavior. Empirically, it doesn't seem to cause a problem. Signed-off-by: Kenneth Graunke --- src/m

[Mesa-dev] [PATCH 07/12] i965: Remove the brw_vue_prog_key base class.

2015-08-29 Thread Kenneth Graunke
The legacy userclip fields are only used for the vertex shader, and at that point there's only program_string_id and the tex struct, which are common to all keys. So there's no need for a "VUE" key base class. Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i96

[Mesa-dev] [PATCH 05/12] i965: Store a key_tex pointer in vec4_visitor.

2015-08-29 Thread Kenneth Graunke
I'm about to remove the base class for VS/GS/HS/DS program keys, at which point we won't be able to use key->tex anymore. Instead, we'll need to store a direct pointer (like we do in the FS backend). Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_vec4.h

[Mesa-dev] [PATCH 11/12] i965: Optimize VUE map comparisons.

2015-08-29 Thread Kenneth Graunke
-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_gs.c | 4 ++-- src/mesa/drivers/dri/i965/brw_vs.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_gs.c b/src/mesa/drivers/dri/i965/brw_gs.c index 6cb4263..da8af88 100644 --- a/src/mesa

[Mesa-dev] [PATCH 10/12] i965/gs: Remove the dependency on the VS VUE map.

2015-08-29 Thread Kenneth Graunke
/back color hacks (Gen4-5 only, no GS support) Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_gs.c | 20 +++- src/mesa/drivers/dri/i965/brw_program.h | 2 -- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_gs.c

[Mesa-dev] [PATCH 02/12] i965: Remove legacy clip plane handling from geometry shaders.

2015-08-29 Thread Kenneth Graunke
mpilation. Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_context.h | 5 - src/mesa/drivers/dri/i965/brw_gs.c | 11 --- src/mesa/drivers/dri/i965/brw_vs.c | 25 - 3 files changed, 8 insertions(+), 33 deletions(-) diff --git a/

Re: [Mesa-dev] [PATCH 00/10] i965: add ARB_shader_texture_image_samples support

2015-08-29 Thread Kenneth Graunke
On Friday, August 28, 2015 12:54:35 PM Ilia Mirkin wrote: > On Fri, Aug 28, 2015 at 6:58 AM, Francisco Jerez > wrote: > > Ilia Mirkin writes: > > > >> This should include everything. I sent a test for textureSamples to > >> piglit a while ago, not sure how to test imageSamples -- apparently ms >

Re: [Mesa-dev] [PATCH] nir/builder: Use nir_after_instr to advance the cursor

2015-08-31 Thread Kenneth Graunke
r); > } > > static inline void > This seems like the right behavior for the builder to take. Sorry for the breakage - I hadn't thought through how the nir_{before,after}_cf_{node,list} functions translate to blocks. Thanks for fixing it. Reviewed-by: Kenneth Graunke You

Re: [Mesa-dev] [PATCH 0/7] NIR dead control flow, take two

2015-09-01 Thread Kenneth Graunke
l/nir/nir_opt_dead_cf.c | 359 > > src/mesa/drivers/dri/i965/brw_nir.c | 2 + > 6 files changed, 392 insertions(+), 1 deletion(-) > create mode 100644 src/glsl/nir/nir_opt_dead_cf.c > > Series (other than the XXX patch) is: Reviewed-

Re: [Mesa-dev] [PATCH v2 0/3] *** Aubinator code simplification ***

2016-09-13 Thread Kenneth Graunke
On Tuesday, September 13, 2016 4:19:28 PM PDT Sirisha Gandikota wrote: > From: Sirisha Gandikota > > This patch set simplifies parts of code in the aubinator tool > as per review comments from Ken (Wed Aug 24 04:51:47 UTC 2016) > > v2 of the earlier patches simplifying code further as per Ken's

Re: [Mesa-dev] [PATCH v3 1/3] mesa: add a GLES3.2 enums section, and expose new MS line width params

2016-09-13 Thread Kenneth Graunke
same on all hardware currently supported by mesa. Should hardware > come along that wants these to be different, they're easy enough to > separate out. > > Signed-off-by: Ilia Mirkin > Reviewed-by: Ian Romanick (v1) Series is: Reviewed-by: Kenneth Graunke signature.asc Description:

[Mesa-dev] [PATCH 1/3] nir: Call nir_metadata_preserve from nir_lower_alu_to_scalar().

2016-09-13 Thread Kenneth Graunke
This is mandatory. Cc: mesa-sta...@lists.freedesktop.org Signed-off-by: Kenneth Graunke --- src/compiler/nir/nir_lower_alu_to_scalar.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/compiler/nir/nir_lower_alu_to_scalar.c b/src/compiler/nir/nir_lower_alu_to_scalar.c index 4f72cf7

[Mesa-dev] [PATCH 2/3] nir: Report progress from nir_lower_alu_to_scalar.

2016-09-13 Thread Kenneth Graunke
Signed-off-by: Kenneth Graunke --- src/compiler/nir/nir.h | 2 +- src/compiler/nir/nir_lower_alu_to_scalar.c | 42 ++--- src/gallium/drivers/freedreno/ir3/ir3_nir.c | 2 +- src/gallium/drivers/vc4/vc4_program.c | 2 +- src/mesa/drivers/dri

[Mesa-dev] [PATCH 3/3] nir: Report progress from nir_lower_phis_to_scalar.

2016-09-13 Thread Kenneth Graunke
Signed-off-by: Kenneth Graunke --- src/compiler/nir/nir.h | 2 +- src/compiler/nir/nir_lower_phis_to_scalar.c | 20 +++- src/gallium/drivers/freedreno/ir3/ir3_nir.c | 2 +- src/gallium/drivers/vc4/vc4_program.c | 3 +-- src/mesa/drivers/dri/i965

[Mesa-dev] [PATCH] i965: Enable ANDROID_extension_pack_es31a on Gen9+.

2016-09-13 Thread Kenneth Graunke
AEP requires ASTC, which is only supported on Skylake and later. Signed-off-by: Kenneth Graunke --- 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 b/src/mesa/drivers/dri/i965/intel_extensions.c index

[Mesa-dev] [PATCH] mesa: Expose RESET_NOTIFICATION_STRATEGY with KHR_robustness.

2016-09-14 Thread Kenneth Graunke
setNotification - ES32-CTS.robust.robustness.loseContextOnReset Cc: mesa-sta...@lists.freedesktop.org Signed-off-by: Kenneth Graunke --- src/mesa/main/get.c | 7 +++ src/mesa/main/get_hash_params.py | 6 +++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/

Re: [Mesa-dev] [PATCH] i965: enable ARB_ES3_2_compatibility on gen8+

2016-09-15 Thread Kenneth Graunke
ctx->Extensions.ARB_shader_precision = true; >ctx->Extensions.ARB_gpu_shader_fp64 = true; >ctx->Extensions.ARB_vertex_attrib_64bit = true; > + ctx->Extensions.ARB_ES3_2_compatibility = true; >ctx->Extensions.OES_geometry_shader = true; > ctx->Ex

[Mesa-dev] [PATCH 1/3] mesa: Expose GL_CONTEXT_FLAGS in ES 3.2.

2016-09-15 Thread Kenneth Graunke
Fixes four ES32-CTS.context_flags.* tests. Signed-off-by: Kenneth Graunke --- src/mesa/main/get_hash_params.py | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/mesa/main/get_hash_params.py b/src/mesa/main/get_hash_params.py index 1f63dc3..b2aef7b 100644 --- a/src

[Mesa-dev] [PATCH 2/3] glsl: Skip "unsized arrays aren't allowed" check for TCS/TES vars.

2016-09-15 Thread Kenneth Graunke
Fixes ESEXT-CTS.draw_elements_base_vertex_tests.AEP_shader_stages and ESEXT-CTS.texture_cube_map_array.texture_size_tesselation_con_sh. Signed-off-by: Kenneth Graunke --- src/compiler/glsl/ast_to_hir.cpp | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/compiler

[Mesa-dev] [PATCH 3/3] mesa: Move buffers-unmapped earlier in check_valid_to_render().

2016-09-15 Thread Kenneth Graunke
This needs to be above the switch on API, as that can return true (valid to render) before this error check even had a chance to run. Fixes ESEXT-CTS.draw_elements_base_vertex_tests.invalid_mapped_bos, which worked before commit 72f1566f90c434c7752d8405193eec68d6743246. Signed-off-by: Kenneth

Re: [Mesa-dev] [PATCH] mesa: check for no matrix change in _mesa_LoadMatrixf()

2016-09-15 Thread Kenneth Graunke
gt; > Tested with Piglit, ETQW, Sauerbraten, Google Earth, etc. ^^^ Is that a texture compression test suite? :) Reviewed-by: Kenneth Graunke > --- > src/mesa/main/matr

Re: [Mesa-dev] [PATCH 1/4] i965/fs: Use sample interpolation for interpolateAtCentroid in persample mode

2016-09-15 Thread Kenneth Graunke
e.multisample_interpolation.* Vulkan CTS > tests that specifically validate consistency between the "sample" qualifier > and interpolateAtSample() > > Signed-off-by: Jason Ekstrand > --- > src/mesa/drivers/dri/i965/brw_fs.cpp | 26 ++ > 1 fi

Re: [Mesa-dev] [PATCH 2/3] glsl: Skip "unsized arrays aren't allowed" check for TCS/TES vars.

2016-09-15 Thread Kenneth Graunke
On Thursday, September 15, 2016 3:35:27 PM PDT Ilia Mirkin wrote: > On Thu, Sep 15, 2016 at 5:10 AM, Kenneth Graunke > wrote: > > Fixes ESEXT-CTS.draw_elements_base_vertex_tests.AEP_shader_stages and > > ESEXT-CTS.texture_cube_map_array.texture_size_tesselation_con_sh. >

<    1   2   3   4   5   6   7   8   9   10   >