Re: [Mesa-dev] [PATCH 10/10] egl/android: Add fallback to kms_swrast driver

2016-07-19 Thread Tomasz Figa
On Wed, Jul 20, 2016 at 7:40 AM, Rob Herring wrote: > On Fri, Jul 15, 2016 at 2:53 AM, Tomasz Figa wrote: >> If no hardware driver is present, it is possible to fall back to >> the kms_swrast driver with any DRI node that supports dumb GEM create >> and mmap

[Mesa-dev] [PATCH 1/2] nir: Silence missing field initializer warnings for vectors in nir_constant_expressions

2016-07-19 Thread Ian Romanick
From: Ian Romanick nir/nir_constant_expressions.c: In function 'evaluate_ball2': nir/nir_constant_expressions.c:279:7: warning: missing initializer for field 'z' of 'struct bool_vec' [-Wmissing-field-initializers] }; ^

[Mesa-dev] [PATCH 2/2] nir/algebraic: Optimize common array indexing sequence

2016-07-19 Thread Ian Romanick
From: Ian Romanick Some shaders include code that looks like: uniform int i; uniform vec4 bones[...]; foo(bones[i * 3], bones[i * 3 + 1], bones[i * 3 + 2]); CSE would do some work on this: x = i * 3 foo(bones[x], bones[x + 1], bones[x + 2]); The

Re: [Mesa-dev] introducing radv - proof of concept vulkan driver for AMD VI chipsets

2016-07-19 Thread Edward O'Callaghan
Yea, that is pretty sweet Bas & Dave! I also agree - open code is open, promises are just promises. Best Wishes, Edward. On 07/20/2016 06:16 AM, Jason Ekstrand wrote: > Good work guys! Welcome to the Open-source Vulkan club :) > > On Tue, Jul 19, 2016 at 12:59 PM, Dave Airlie

Re: [Mesa-dev] [PATCH 06/11] vl/util: add copy func for yv12image to nv12surface

2016-07-19 Thread Zhang, Boyuan
Hi Andy, Thanks for the confirmation. It seems like all basic functionality is working now. I will look into the cqp issue. And for the speed related issue, we understand the reason and have already planned to work on it after this bring-up. However, it will be a separate patch in future,

Re: [Mesa-dev] [PATCH 09/12] st/va: add functions for VAAPI encode

2016-07-19 Thread Zhang, Boyuan
>> - context->decoder->begin_frame(context->decoder, context->target, >> >desc.base); >> + if (context->decoder->entrypoint != PIPE_VIDEO_ENTRYPOINT_ENCODE) >> + context->decoder->begin_frame(context->decoder, context->target, >> >desc.base); >Why do we do so here? Could we avoid that?

Re: [Mesa-dev] [PATCH 05/12] st/va: add encode entrypoint

2016-07-19 Thread Zhang, Boyuan
>> @@ -150,7 +167,16 @@ vlVaCreateConfig(VADriverContextP ctx, VAProfile >> profile, VAEntrypoint entrypoin >> if (entrypoint != VAEntrypointVLD) >> return VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT; >> >> - *config_id = p; >> + if (entrypoint == VAEntrypointEncSlice || entrypoint ==

Re: [Mesa-dev] [PATCH v1 8/8] nvc0: disable MS images on GM107+

2016-07-19 Thread Ilia Mirkin
Series is Reviewed-by: Ilia Mirkin Note that you'll start using PBO downloads via images as a result of this change, please run some of the deqp pbo tests (might be in gles3, not gles31) to double-check that all's well. -ilia On Tue, Jul 19, 2016 at 4:15 PM, Samuel

Re: [Mesa-dev] [PATCH 56/56] glsl: Replace most assertions with unreachable()

2016-07-19 Thread Matt Turner
Certainly not necessary to do this, but if you care to include `size` output in commit messages, this one might be a good candidate. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 00/56] Die copy-and-paste code, die

2016-07-19 Thread Matt Turner
1-27 are Reviewed-by: Matt Turner ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 19/56] glsl: Use find_msb_uint to implement ir_unop_find_lsb

2016-07-19 Thread Matt Turner
On Tue, Jul 19, 2016 at 12:24 PM, Ian Romanick wrote: > From: Ian Romanick > > (X & -X) calculates a value with only the least significant bit of X > set. Since there is only one bit set, the LSB is the MSB. > > Signed-off-by: Ian Romanick

Re: [Mesa-dev] [PATCH 6/7] i965: Rewrite FS input handling to use the new NIR intrinsics.

2016-07-19 Thread Jason Ekstrand
On Tue, Jul 19, 2016 at 5:02 PM, Kenneth Graunke wrote: > On Tuesday, July 19, 2016 1:39:23 PM PDT Jason Ekstrand wrote: > > On Mon, Jul 18, 2016 at 1:26 PM, Kenneth Graunke > > wrote: > > > > > This eliminates the need to walk the list of input

Re: [Mesa-dev] [PATCH 2/7] nir: Add a nir_lower_io flag for using load_interpolated_input intrins.

2016-07-19 Thread Kenneth Graunke
On Tuesday, July 19, 2016 12:57:23 PM PDT Jason Ekstrand wrote: > On Mon, Jul 18, 2016 at 10:00 PM, Chris Forbes wrote: > > > Seems a little unfortunate to add a random bool to this interface which is > > otherwise fairly descriptive, but OK. > > > > I agree that this is a bit

Re: [Mesa-dev] [PATCH v2 23/36] isl: Remove duplicate px->sa conversions

2016-07-19 Thread Nanley Chery
On Tue, Jul 19, 2016 at 04:16:23PM -0700, Jason Ekstrand wrote: > On Tue, Jul 19, 2016 at 4:12 PM, Nanley Chery wrote: > > > On Fri, Jul 01, 2016 at 04:08:49PM -0700, Jason Ekstrand wrote: > > > In all three cases, we start with width and height taken from > > >

Re: [Mesa-dev] [PATCH 6/7] i965: Rewrite FS input handling to use the new NIR intrinsics.

2016-07-19 Thread Kenneth Graunke
On Tuesday, July 19, 2016 1:39:23 PM PDT Jason Ekstrand wrote: > On Mon, Jul 18, 2016 at 1:26 PM, Kenneth Graunke > wrote: > > > This eliminates the need to walk the list of input variables, recurse > > into their types (via logic largely redundant with nir_lower_io), and

Re: [Mesa-dev] [PATCH v2 23/36] isl: Remove duplicate px->sa conversions

2016-07-19 Thread Nanley Chery
On Tue, Jul 19, 2016 at 04:12:17PM -0700, Nanley Chery wrote: > On Fri, Jul 01, 2016 at 04:08:49PM -0700, Jason Ekstrand wrote: > > In all three cases, we start with width and height taken from > > isl_surf::phys_slice0_extent_sa which is already in samples. There is no > > need to do the

Re: [Mesa-dev] [PATCH v2 23/36] isl: Remove duplicate px->sa conversions

2016-07-19 Thread Jason Ekstrand
On Tue, Jul 19, 2016 at 4:12 PM, Nanley Chery wrote: > On Fri, Jul 01, 2016 at 04:08:49PM -0700, Jason Ekstrand wrote: > > In all three cases, we start with width and height taken from > > isl_surf::phys_slice0_extent_sa which is already in samples. There is no > > need

Re: [Mesa-dev] [PATCH v2 23/36] isl: Remove duplicate px->sa conversions

2016-07-19 Thread Nanley Chery
On Fri, Jul 01, 2016 at 04:08:49PM -0700, Jason Ekstrand wrote: > In all three cases, we start with width and height taken from > isl_surf::phys_slice0_extent_sa which is already in samples. There is no > need to do the conversion and doing so gives us an incorrect value. Thanks for noticing

Re: [Mesa-dev] [PATCH 10/10] egl/android: Add fallback to kms_swrast driver

2016-07-19 Thread Rob Herring
On Fri, Jul 15, 2016 at 2:53 AM, Tomasz Figa wrote: > If no hardware driver is present, it is possible to fall back to > the kms_swrast driver with any DRI node that supports dumb GEM create > and mmap IOCTLs with softpipe/llvmpipe drivers. This patch makes the > Android EGL

Re: [Mesa-dev] Testing patches 9987 and 9988

2016-07-19 Thread Marek Olšák
The first one just landed. The second one will take some time I guess. This branch contains both, but it won't be merged in this form: https://cgit.freedesktop.org/~mareko/mesa/log/?h=si-mid-ib-gfx-fence Marek On Tue, Jul 19, 2016 at 3:53 PM, ⚛ <0xe2.0x9a.0...@gmail.com> wrote: > Hello > > I

Re: [Mesa-dev] [PATCH] glsl/ast: don't allow subroutine uniform comparisons

2016-07-19 Thread Andres Gomez
On Tue, 2016-07-19 at 13:45 -0700, Ian Romanick wrote: > On 07/19/2016 06:54 AM, Andres Gomez wrote: ... > > So, what would be the conclusion? Do we allow subroutine variables > > comparison? > > There is no conclusion yet. I opened a Khronos gitlab tracker (right > after Dave sent his original

Re: [Mesa-dev] [PATCH] glsl/ast: don't allow subroutine uniform comparisons

2016-07-19 Thread Ian Romanick
On 07/19/2016 06:54 AM, Andres Gomez wrote: > Hi, > > Just dropped: > https://lists.freedesktop.org/archives/mesa-dev/2016-July/123485.html > > I didn't realize there was already this thread open. > > On Tue, 2016-06-07 at 09:59 -0700, Ian Romanick wrote: >> On 06/06/2016 10:20 PM, Dave Airlie

Re: [Mesa-dev] [PATCH 7/7] i965: Delete the FS_OPCODE_INTERPOLATE_AT_CENTROID virtual opcode.

2016-07-19 Thread Jason Ekstrand
Patches 2, 3, 4, and 7 are Reviewed-by: Jason Ekstrand I've left comments on a few others. On Mon, Jul 18, 2016 at 10:30 PM, Jason Ekstrand wrote: > On Jul 18, 2016 10:11 PM, "Chris Forbes" wrote: > > > > I remember arguing about

Re: [Mesa-dev] [PATCH 6/7] i965: Rewrite FS input handling to use the new NIR intrinsics.

2016-07-19 Thread Jason Ekstrand
On Mon, Jul 18, 2016 at 1:26 PM, Kenneth Graunke wrote: > This eliminates the need to walk the list of input variables, recurse > into their types (via logic largely redundant with nir_lower_io), and > interpolate all possible inputs up front. The backend no longer has >

Re: [Mesa-dev] [PATCH 4/4] radeonsi: emit PS exports last

2016-07-19 Thread Nicolai Hähnle
On 19.07.2016 18:32, Marek Olšák wrote: On Tue, Jul 19, 2016 at 3:43 PM, Nicolai Hähnle wrote: Patches 1, 3 & 4 are Reviewed-by: Nicolai Hähnle Why not patch 2? That was me being thoroughly confused today. 2 is 3 to a nearest approximation or

Re: [Mesa-dev] introducing radv - proof of concept vulkan driver for AMD VI chipsets

2016-07-19 Thread Jason Ekstrand
Good work guys! Welcome to the Open-source Vulkan club :) On Tue, Jul 19, 2016 at 12:59 PM, Dave Airlie wrote: > I was waiting for an open source driver to appear when I realised I > should really just write one myself, some talking with Bas later, and > we decided to see

[Mesa-dev] [PATCH v1 3/8] gm107/ir: lower surface operations

2016-07-19 Thread Samuel Pitoiset
Signed-off-by: Samuel Pitoiset --- .../nouveau/codegen/nv50_ir_lowering_nvc0.cpp | 76 +- .../nouveau/codegen/nv50_ir_lowering_nvc0.h| 2 + 2 files changed, 77 insertions(+), 1 deletion(-) diff --git

[Mesa-dev] [PATCH v1 2/8] nvc0: bind images for 3d/cp shaders on GM107+

2016-07-19 Thread Samuel Pitoiset
On Maxwell, images binding is slightly different (and much better) regarding Fermi and Kepler because a texture view needs to be uploaded for each image and this is going to simplify the thing a lot. v1: - use nvc0_create_texture_view() - always set NV50_TEXVIEW_SCALED_COORDS - create texture

[Mesa-dev] [PATCH v1 6/8] gm107/ir: add emission for SUREDx

2016-07-19 Thread Samuel Pitoiset
Signed-off-by: Samuel Pitoiset --- .../drivers/nouveau/codegen/nv50_ir_emit_gm107.cpp | 50 ++ 1 file changed, 50 insertions(+) diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gm107.cpp

[Mesa-dev] [PATCH v1 1/8] nvc0: increase the tex handles area size in the driver cb

2016-07-19 Thread Samuel Pitoiset
Currently, we can store 32 tex handles of 32-bits integer each and that fits perfectly with the underlying hardware except on GM107+ which requires to upload a texture view for each images. This patch increases the number of storable texture handles in the driver constant buffer from 32 to 40

[Mesa-dev] [PATCH v1 8/8] nvc0: disable MS images on GM107+

2016-07-19 Thread Samuel Pitoiset
MS images have to be handled explicitly and I don't plan to implement them for now. v1: - check that sample_count > 1 Signed-off-by: Samuel Pitoiset --- src/gallium/drivers/nouveau/nvc0/nvc0_screen.c | 7 +++ 1 file changed, 7 insertions(+) diff --git

[Mesa-dev] [PATCH v1 4/8] gm107/ra: fix constraints for surface operations

2016-07-19 Thread Samuel Pitoiset
Signed-off-by: Samuel Pitoiset --- src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp | 25 -- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp

[Mesa-dev] [PATCH v1 7/8] nv50/ir: print OP_SUREDB subops in debug mode

2016-07-19 Thread Samuel Pitoiset
Signed-off-by: Samuel Pitoiset --- src/gallium/drivers/nouveau/codegen/nv50_ir_print.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_print.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_print.cpp index

[Mesa-dev] [PATCH v1 5/8] gm107/ir: add emission for SUSTx and SULDx

2016-07-19 Thread Samuel Pitoiset
v1: - remove one occurence of TEX_TARGET_CUBE_ARRAY Signed-off-by: Samuel Pitoiset --- .../drivers/nouveau/codegen/nv50_ir_emit_gm107.cpp | 104 + 1 file changed, 104 insertions(+) diff --git

[Mesa-dev] [PATCH 06/12] glsl: Instead of walking the name pointer in get_intrinsic_opcode, advance an offset

2016-07-19 Thread Ian Romanick
From: Ian Romanick I think this makes the next patch more clear. textdata bss dec hex filename 7528883 273096 28584 7830563 777c23 /tmp/i965_dri-64bit-before.so 7528835 273096 28584 7830515 777bf3 /tmp/i965_dri-64bit-after.so Signed-off-by:

[Mesa-dev] [PATCH 01/12] glsl: Refactor code to find NIR opcode for an intrinsic and add unit test

2016-07-19 Thread Ian Romanick
From: Ian Romanick The next patches are going to significantly change the implementation, so I really want a unit test. textdata bss dec hex filename 7529123 273096 28584 7830803 777d13 /tmp/i965_dri-64bit-before.so 7529283 273096 28584

[Mesa-dev] [PATCH 05/12] glsl: Replace the linear search in get_intrinsic_opcode with a radix trie

2016-07-19 Thread Ian Romanick
From: Ian Romanick If there is a way to do this cleanly in mako, I'm very interested to hear about it. textdata bss dec hex filename 7529003 273096 28584 7830683 777c9b /tmp/i965_dri-64bit-before.so 7528883 273096 28584 7830563 777c23

[Mesa-dev] [PATCH 02/12] glsl: Replace big pile of hand-written code with a generator

2016-07-19 Thread Ian Romanick
From: Ian Romanick Right now the generator generates nearly identical code. There is no change in the binary size. textdata bss dec hex filename 7529283 273096 28584 7830963 777db3 /tmp/i965_dri-64bit-before.so 7529283 273096 28584 7830963

[Mesa-dev] [PATCH 00/12 RESEND] ARB_shader_atomic_counter_ops for NIR and i965

2016-07-19 Thread Ian Romanick
Most of the series has already be reviewed by Iago. However, patches 5 through 8 still need review. Dylan and Jason had provided some feedback on patch 5, and Ilia and I had some discussion (which is now mostly captured in the commit message) about patch 8.

[Mesa-dev] [PATCH 11/12] i965: Refactor emission of atomic counter operations

2016-07-19 Thread Ian Romanick
From: Ian Romanick This will make it easier to add more operations. Signed-off-by: Ian Romanick Reviewed-by: Iago Toral Quiroga --- src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 19 ---

[Mesa-dev] [PATCH 10/12] nir/intrinsics: Add more atomic_counter ops

2016-07-19 Thread Ian Romanick
From: Ian Romanick v2: Delete some stray debug code notice by Iago. Signed-off-by: Ian Romanick Reviewed-by: Iago Toral Quiroga --- src/compiler/glsl/glsl_to_nir.cpp | 39 +++---

[Mesa-dev] [PATCH 12/12] i965: Enable ARB_shader_atomic_counter_ops

2016-07-19 Thread Ian Romanick
From: Ian Romanick Signed-off-by: Ian Romanick Reviewed-by: Iago Toral Quiroga --- src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 23 --- src/mesa/drivers/dri/i965/brw_shader.cpp | 16

[Mesa-dev] [PATCH 03/12] glsl: Don't explicitly store "__intrinsic_"

2016-07-19 Thread Ian Romanick
From: Ian Romanick Every valid intrinsic function name starts with "__intrinsic_". Compare and store the string once instead of 41 times. textdata bss dec hex filename 7529283 273096 28584 7830963 777db3 /tmp/i965_dri-64bit-before.so 7529067

[Mesa-dev] [PATCH 07/12] glsl: Sometimes use a switch-statment in get_intrinsic_opcode

2016-07-19 Thread Ian Romanick
From: Ian Romanick All of this code operates on the assumption that get_intrinsic_opcode will only be called with valid names. If the first character of every node in the trie level is unique, the prefix can be uniquely identified by switching on just that first

[Mesa-dev] [PATCH 04/12] glsl: Refactor a little code in get_intrinsic_opcode

2016-07-19 Thread Ian Romanick
From: Ian Romanick textdata bss dec hex filename 7529067 273096 28584 7830747 777cdb /tmp/i965_dri-64bit-before.so 7529003 273096 28584 7830683 777c9b /tmp/i965_dri-64bit-after.so Signed-off-by: Ian Romanick

[Mesa-dev] [PATCH 08/12] glsl: Kill __intrinsic_atomic_sub

2016-07-19 Thread Ian Romanick
From: Ian Romanick Just generate an __intrinsic_atomic_add with a negated parameter. Some background on the non-obvious reasons for the the big change to builtin_builder::call()... this is cribbed from some discussion with Ilia on mesa-dev. Why change

[Mesa-dev] [PATCH 09/12] nir/intrinsics: Include atomic_counter_ in the names used in macro invocations

2016-07-19 Thread Ian Romanick
From: Ian Romanick Otherwise grepping for where atomic_counter_inc and friends are defined is a very frustrating experience. Signed-off-by: Ian Romanick Reviewed-by: Iago Toral Quiroga ---

Re: [Mesa-dev] [PATCH 5/7] i965: Move load_interpolated_input/barycentric_* intrinsics to the top.

2016-07-19 Thread Jason Ekstrand
On Mon, Jul 18, 2016 at 1:26 PM, Kenneth Graunke wrote: > Currently, i965 interpolates all FS inputs at the top of the program. > This has advantages and disadvantages, but I'd like to keep that policy > while reworking this code. We can consider changing it

Re: [Mesa-dev] [PATCH 2/7] nir: Add a nir_lower_io flag for using load_interpolated_input intrins.

2016-07-19 Thread Jason Ekstrand
On Mon, Jul 18, 2016 at 10:00 PM, Chris Forbes wrote: > Seems a little unfortunate to add a random bool to this interface which is > otherwise fairly descriptive, but OK. > I agree that this is a bit unfortunate. I was going to suggest adding a flags parameter and a bitfield

[Mesa-dev] introducing radv - proof of concept vulkan driver for AMD VI chipsets

2016-07-19 Thread Dave Airlie
I was waiting for an open source driver to appear when I realised I should really just write one myself, some talking with Bas later, and we decided to see where we could get. This is the point at which we were willing to show it to others, it's not really a vulkan driver yet, so far it's a

Re: [Mesa-dev] [PATCH 1/7] nir: Add new intrinsics for fragment shader input interpolation.

2016-07-19 Thread Jason Ekstrand
On Mon, Jul 18, 2016 at 1:26 PM, Kenneth Graunke wrote: > Backends can normally handle shader inputs solely by looking at > load_input intrinsics, and ignore the nir_variables in nir->inputs. > > One exception is fragment shader inputs. load_input doesn't capture > the

Re: [Mesa-dev] [PATCH 00/56] Die copy-and-paste code, die

2016-07-19 Thread Matt Turner
On Tue, Jul 19, 2016 at 12:24 PM, Ian Romanick wrote: > After seeing Dave's series to add support GL_ARB_shader_gpu_int64 and > thinking about adding support for 8- and 16-bit integers, I decided > that something had to be done about the cut-and-paste madness that is >

[Mesa-dev] [Bug 89599] symbol 'x86_64_entry_start' is already defined when building with LLVM/clang

2016-07-19 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=89599 --- Comment #12 from austinengl...@gmail.com --- (In reply to Matt Turner from comment #11) > I sent a modified version of Tomasz's patch last week to mesa-dev. > > Would anyone like to test it? > > [PATCH] mapi:

Re: [Mesa-dev] [PATCH] nir: Fix uninitialized use of 'replacement'.

2016-07-19 Thread Anuj Phogat
On Tue, Jul 19, 2016 at 12:25 PM, Kenneth Graunke wrote: > For intrinsics we don't care about, just skip to the next loop iteration > and process the next instruction. We don't want to execute the rest of > the code. > > This was a bug in commit

[Mesa-dev] [PATCH 55/56] glsl: Refactor handling of horizontal operations

2016-07-19 Thread Ian Romanick
From: Ian Romanick Signed-off-by: Ian Romanick --- src/compiler/glsl/ir_expression_operation.py | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/compiler/glsl/ir_expression_operation.py

[Mesa-dev] [PATCH 56/56] glsl: Replace most assertions with unreachable()

2016-07-19 Thread Ian Romanick
From: Ian Romanick Signed-off-by: Ian Romanick --- src/compiler/glsl/ir_expression_operation.py | 19 +-- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/compiler/glsl/ir_expression_operation.py

[Mesa-dev] [PATCH 51/56] glsl: Eliminate constant_template0

2016-07-19 Thread Ian Romanick
From: Ian Romanick This template is mostly an artefact of the development of the original patch series and to minimize the differences between the original code and the generated code. Signed-off-by: Ian Romanick ---

[Mesa-dev] [PATCH 52/56] glsl: Eliminate constant_template5

2016-07-19 Thread Ian Romanick
From: Ian Romanick constant_template_common can now handle the case where the result type is different from the input type by using type_signature_iter. Signed-off-by: Ian Romanick --- src/compiler/glsl/ir_expression_operation.py | 23

[Mesa-dev] [PATCH 29/56] glsl: Begin generating code for the most basic constant expressions

2016-07-19 Thread Ian Romanick
From: Ian Romanick Unary operations where all of the supported types use the same C expression to evaluate them. Signed-off-by: Ian Romanick --- src/compiler/glsl/ir_expression_operation.py | 175 --- 1 file changed,

[Mesa-dev] [PATCH 45/56] glsl: Generate code for constant ir_quadop_bitfield_insert expressions

2016-07-19 Thread Ian Romanick
From: Ian Romanick Signed-off-by: Ian Romanick --- src/compiler/glsl/ir_expression_operation.py | 25 + 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/src/compiler/glsl/ir_expression_operation.py

[Mesa-dev] [PATCH 24/56] glsl: Sort GLSL type enums in switch-statements in enum order

2016-07-19 Thread Ian Romanick
From: Ian Romanick Signed-off-by: Ian Romanick --- src/compiler/glsl/ir_constant_expression.cpp | 56 ++-- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/src/compiler/glsl/ir_constant_expression.cpp

[Mesa-dev] [PATCH 09/56] glsl: Generate the ir_last_* values

2016-07-19 Thread Ian Romanick
From: Ian Romanick This ensures that they remain correct if the list is rearranged or new opcodes are added. I checked a diff of before and after to ensure that each ir_last_ had the same value. Signed-off-by: Ian Romanick ---

[Mesa-dev] [PATCH 47/56] glsl: Generate code for constant ir_triop_lrp expressions

2016-07-19 Thread Ian Romanick
From: Ian Romanick Signed-off-by: Ian Romanick --- src/compiler/glsl/ir_expression_operation.py | 29 +++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/src/compiler/glsl/ir_expression_operation.py

[Mesa-dev] [PATCH 27/56] glsl: Compact a bunch of things onto one line

2016-07-19 Thread Ian Romanick
From: Ian Romanick Even though they are much too long for that. Signed-off-by: Ian Romanick --- src/compiler/glsl/ir_constant_expression.cpp | 86 +++- 1 file changed, 20 insertions(+), 66 deletions(-) diff --git

[Mesa-dev] [PATCH 36/56] glsl: Generate code for some constant binary expression that are horizontal

2016-07-19 Thread Ian Romanick
From: Ian Romanick Only operations where the implementation is identical code regardless of type. The only such operations are ir_binop_all_equal and ir_binop_any_nequal. Signed-off-by: Ian Romanick ---

[Mesa-dev] [PATCH 23/56] glsl: Always use correct float types in constant expression handling

2016-07-19 Thread Ian Romanick
From: Ian Romanick Signed-off-by: Ian Romanick --- src/compiler/glsl/ir_constant_expression.cpp | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/compiler/glsl/ir_constant_expression.cpp

[Mesa-dev] [PATCH 43/56] glsl: Generate code for constant ir_binop_vector_extract expressions

2016-07-19 Thread Ian Romanick
From: Ian Romanick Signed-off-by: Ian Romanick --- src/compiler/glsl/ir_expression_operation.py | 22 +- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/src/compiler/glsl/ir_expression_operation.py

[Mesa-dev] [PATCH 49/56] glsl: Use the generated constant expression code

2016-07-19 Thread Ian Romanick
From: Ian Romanick Immediately previous to this patch, diff -wud src/glsl/ir_constant_expression.cpp \ src/glsl/ir_expression_operation_constant.h should be "minimal." Signed-off-by: Ian Romanick ---

[Mesa-dev] [PATCH 30/56] glsl: Generate code for constant unary expression that map one type to another

2016-07-19 Thread Ian Romanick
From: Ian Romanick ir_unop_i2b is omitted because its source can either be int or uint. That makes it special. Signed-off-by: Ian Romanick --- src/compiler/glsl/ir_expression_operation.py | 81 +++- 1 file changed, 57

[Mesa-dev] [PATCH 50/56] glsl: Eliminate one of the templates for simpler operations

2016-07-19 Thread Ian Romanick
From: Ian Romanick The difference between these two templates were mostly an artefact of the development of the original patch series and to minimize the differences between the original code and the generated code. Signed-off-by: Ian Romanick

[Mesa-dev] [PATCH 33/56] glsl: Generate code for constant binary expressions that combine vector and scalar operands

2016-07-19 Thread Ian Romanick
From: Ian Romanick Signed-off-by: Ian Romanick --- src/compiler/glsl/ir_expression_operation.py | 66 +--- 1 file changed, 51 insertions(+), 15 deletions(-) diff --git a/src/compiler/glsl/ir_expression_operation.py

[Mesa-dev] [PATCH 15/56] glsl: Delete spurious comment about mod not taking integer operands

2016-07-19 Thread Ian Romanick
From: Ian Romanick This hasn't been true since we added support for GLSL 1.30. Signed-off-by: Ian Romanick --- src/compiler/glsl/ir_expression_operation.py | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git

[Mesa-dev] [PATCH 21/56] glsl: Extract ir_triop_bitfield_extract implementation to a separate function

2016-07-19 Thread Ian Romanick
From: Ian Romanick Signed-off-by: Ian Romanick --- src/compiler/glsl/ir_constant_expression.cpp | 66 ++-- 1 file changed, 42 insertions(+), 24 deletions(-) diff --git a/src/compiler/glsl/ir_constant_expression.cpp

[Mesa-dev] [PATCH 26/56] glsl: Sort constant expression handling by IR operand enum value

2016-07-19 Thread Ian Romanick
From: Ian Romanick Signed-off-by: Ian Romanick --- src/compiler/glsl/ir_constant_expression.cpp | 648 +-- 1 file changed, 324 insertions(+), 324 deletions(-) diff --git a/src/compiler/glsl/ir_constant_expression.cpp

[Mesa-dev] [PATCH 54/56] glsl: Use constant_template_horizontal instead of constant_template_horizontal_single_implementation for unops

2016-07-19 Thread Ian Romanick
From: Ian Romanick This changes the "shape" of all the pack and unpack operators, but they should function the same. Signed-off-by: Ian Romanick --- src/compiler/glsl/ir_expression_operation.py | 2 +- 1 file changed, 1 insertion(+), 1

[Mesa-dev] [PATCH 40/56] glsl: Generate code for constant ir_binop_dot expressions

2016-07-19 Thread Ian Romanick
From: Ian Romanick Signed-off-by: Ian Romanick --- src/compiler/glsl/ir_expression_operation.py | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/compiler/glsl/ir_expression_operation.py

[Mesa-dev] [PATCH 35/56] glsl: Generate code for constant unary expression that are horizontal

2016-07-19 Thread Ian Romanick
From: Ian Romanick Signed-off-by: Ian Romanick --- src/compiler/glsl/ir_expression_operation.py | 22 -- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/src/compiler/glsl/ir_expression_operation.py

[Mesa-dev] [PATCH 53/56] glsl: Eliminate constant_template2

2016-07-19 Thread Ian Romanick
From: Ian Romanick constant_template_common can now handle the case where the result type is different from the input type by using type_signature_iter. This changes the "shape" of all the cast-style operators, but they should function the same. Signed-off-by: Ian

[Mesa-dev] [PATCH 28/56] glsl: Convert tuple into a class

2016-07-19 Thread Ian Romanick
From: Ian Romanick This makes things a little more clear now, and it will make future changes... possible. Signed-off-by: Ian Romanick --- src/compiler/glsl/ir_expression_operation.py | 265 ++- 1 file changed, 138

[Mesa-dev] [PATCH 41/56] glsl: Generate code for constant ir_triop_fma and ir_triop_bitfield_extract expressions

2016-07-19 Thread Ian Romanick
From: Ian Romanick ir_triop_bitfield_extract is a little weird because the second and third operand and aways int, so they may differ in type from the first operand. Signed-off-by: Ian Romanick ---

[Mesa-dev] [PATCH 17/56] glsl: Extract ir_unop_bitfield_reverse implementation to a separate function

2016-07-19 Thread Ian Romanick
From: Ian Romanick Signed-off-by: Ian Romanick --- src/compiler/glsl/ir_constant_expression.cpp | 40 +++- 1 file changed, 27 insertions(+), 13 deletions(-) diff --git a/src/compiler/glsl/ir_constant_expression.cpp

[Mesa-dev] [PATCH 48/56] glsl: Generate code for constant ir_triop_csel expressions

2016-07-19 Thread Ian Romanick
From: Ian Romanick Signed-off-by: Ian Romanick --- src/compiler/glsl/ir_expression_operation.py | 24 +++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/src/compiler/glsl/ir_expression_operation.py

[Mesa-dev] [PATCH 02/56] glsl: Don't support integer types for operations that can't handle them

2016-07-19 Thread Ian Romanick
From: Ian Romanick ir_unop_fract already forbade integer types in ir_validate. ir_unop_rcp, ir_unop_rsq, and ir_unop_sqrt should also forbid them in ir_validate. Signed-off-by: Ian Romanick --- src/compiler/glsl/ir_constant_expression.cpp |

[Mesa-dev] [PATCH 38/56] glsl: Generate code for constant ir_binop_ldexp expressions

2016-07-19 Thread Ian Romanick
From: Ian Romanick ldexp is weird because its two operands have different types. Add support for directly specifying the exact signatures of all the possible variations of an operation. Signed-off-by: Ian Romanick ---

[Mesa-dev] [PATCH 19/56] glsl: Use find_msb_uint to implement ir_unop_find_lsb

2016-07-19 Thread Ian Romanick
From: Ian Romanick (X & -X) calculates a value with only the least significant bit of X set. Since there is only one bit set, the LSB is the MSB. Signed-off-by: Ian Romanick --- src/compiler/glsl/ir_constant_expression.cpp | 19

[Mesa-dev] [PATCH 42/56] glsl: Generate code for constant ir_binop_mul expressions

2016-07-19 Thread Ian Romanick
From: Ian Romanick Signed-off-by: Ian Romanick --- src/compiler/glsl/ir_expression_operation.py | 56 +++- 1 file changed, 54 insertions(+), 2 deletions(-) diff --git a/src/compiler/glsl/ir_expression_operation.py

[Mesa-dev] [PATCH 14/56] glsl: Delete spurious comment about updating ir_expression::get_num_operands

2016-07-19 Thread Ian Romanick
From: Ian Romanick This hasn't been necessary since 007f48815. Signed-off-by: Ian Romanick --- src/compiler/glsl/ir_expression_operation.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/compiler/glsl/ir_expression_operation.py

[Mesa-dev] [PATCH 46/56] glsl: Generate code for constant ir_quadop_vector expressions

2016-07-19 Thread Ian Romanick
From: Ian Romanick Signed-off-by: Ian Romanick --- src/compiler/glsl/ir_expression_operation.py | 22 -- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/src/compiler/glsl/ir_expression_operation.py

[Mesa-dev] [PATCH 18/56] glsl: Extract ir_unop_find_msb implementation to a separate function

2016-07-19 Thread Ian Romanick
From: Ian Romanick Signed-off-by: Ian Romanick --- src/compiler/glsl/ir_constant_expression.cpp | 49 +++- 1 file changed, 34 insertions(+), 15 deletions(-) diff --git a/src/compiler/glsl/ir_constant_expression.cpp

[Mesa-dev] [PATCH 44/56] glsl: Generate code for constant ir_triop_vector_insert expressions

2016-07-19 Thread Ian Romanick
From: Ian Romanick Signed-off-by: Ian Romanick --- src/compiler/glsl/ir_expression_operation.py | 27 +-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/src/compiler/glsl/ir_expression_operation.py

[Mesa-dev] [PATCH 22/56] glsl: Extract ir_quadop_bitfield_insert implementation to a separate function

2016-07-19 Thread Ian Romanick
From: Ian Romanick Signed-off-by: Ian Romanick --- src/compiler/glsl/ir_constant_expression.cpp | 48 +--- 1 file changed, 23 insertions(+), 25 deletions(-) diff --git a/src/compiler/glsl/ir_constant_expression.cpp

[Mesa-dev] [PATCH 39/56] glsl: Generate code for constant ir_binop_lshift and ir_binop_rshift expressions

2016-07-19 Thread Ian Romanick
From: Ian Romanick The code generated is quite different from what was previously used. I believe that it is still correct by the GLSL spec, and I believe, due to C rules about shifts, the behavior will be the same. Section 5.9 (Expressions) of the GLSL 4.50 spec

[Mesa-dev] [PATCH 34/56] glsl: Generate code for constant expressions that have an output type the differs from the input types

2016-07-19 Thread Ian Romanick
From: Ian Romanick Signed-off-by: Ian Romanick --- src/compiler/glsl/ir_expression_operation.py | 44 +--- 1 file changed, 33 insertions(+), 11 deletions(-) diff --git a/src/compiler/glsl/ir_expression_operation.py

[Mesa-dev] [PATCH 08/56] glsl: Generate ir_expression_operation.h from Python

2016-07-19 Thread Ian Romanick
From: Ian Romanick There are differences in where end-of-line comments are placed, but 'diff -wud' is clean. v2: Massive rebase. Signed-off-by: Ian Romanick --- src/compiler/Makefile.glsl.am| 8 +

[Mesa-dev] [PATCH 31/56] glsl: Generate code for constant unary expression that have different implementations for each source type

2016-07-19 Thread Ian Romanick
From: Ian Romanick Signed-off-by: Ian Romanick --- src/compiler/glsl/ir_expression_operation.py | 45 1 file changed, 33 insertions(+), 12 deletions(-) diff --git a/src/compiler/glsl/ir_expression_operation.py

[Mesa-dev] [PATCH 37/56] glsl: Generate code for constant unary expressions that don't assign the destination

2016-07-19 Thread Ian Romanick
From: Ian Romanick These are operations like the pack functions that have separate functions that assign multiple outputs from a single input. Signed-off-by: Ian Romanick --- src/compiler/glsl/ir_expression_operation.py | 26

[Mesa-dev] [PATCH 32/56] glsl: Generate code for constant binary expressions that have one operand type

2016-07-19 Thread Ian Romanick
From: Ian Romanick Signed-off-by: Ian Romanick --- src/compiler/glsl/ir_expression_operation.py | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/compiler/glsl/ir_expression_operation.py

[Mesa-dev] [PATCH 16/56] glsl: Use _mesa_bitcount to implement constant ir_unop_bit_count

2016-07-19 Thread Ian Romanick
From: Ian Romanick Signed-off-by: Ian Romanick --- src/compiler/glsl/ir_constant_expression.cpp | 11 ++- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/compiler/glsl/ir_constant_expression.cpp

[Mesa-dev] [PATCH 20/56] glsl: Extract ir_binop_ldexp implementation to a separate function

2016-07-19 Thread Ian Romanick
From: Ian Romanick --- src/compiler/glsl/ir_constant_expression.cpp | 39 1 file changed, 28 insertions(+), 11 deletions(-) diff --git a/src/compiler/glsl/ir_constant_expression.cpp b/src/compiler/glsl/ir_constant_expression.cpp index

[Mesa-dev] [PATCH 13/56] glsl: Do not generate comments or extra whitespace in expression files

2016-07-19 Thread Ian Romanick
From: Ian Romanick The comments and whitespace can live in the Python code. Signed-off-by: Ian Romanick --- src/compiler/glsl/ir_expression_operation.py | 517 +++ 1 file changed, 216 insertions(+), 301 deletions(-)

  1   2   3   >