Chad Versace [Tue, 1 Sep 2015 00:44:08 +0000 (17:44 -0700)]
vk/meta: Partially fix vkCmdCopyBufferToImage for S8_UINT
Create R8_UINT VkAttachmentView and VkImageView for the stencil data.
This fixes a crash, but the pixels in the destination image are still
incorrect. They are not properly tiled.
Fixes crashes in Crucible tests func.miptree.s8-uint.aspect-stencil.* as
of crucible-7471449. Test results improve 'lost' -> 'fail'.
Jason Ekstrand [Tue, 1 Sep 2015 22:16:06 +0000 (15:16 -0700)]
vk/meta: Use SPIR-V for shaders
We are also now using glslc for compiling the Vulkan driver like we do in
curcible.
Jason Ekstrand [Tue, 1 Sep 2015 22:15:04 +0000 (15:15 -0700)]
vk/compiler: Handle interpolation qualifiers for SPIR-V shaders
Jason Ekstrand [Tue, 1 Sep 2015 19:23:48 +0000 (12:23 -0700)]
vk/extensions: count needs to be <= number of extensions
Jason Ekstrand [Tue, 1 Sep 2015 18:57:28 +0000 (11:57 -0700)]
vk/compiler: Properly reference/delete programs when using SPIR-V
Jason Ekstrand [Tue, 1 Sep 2015 04:12:59 +0000 (21:12 -0700)]
vk/meta: Add a helper for making an image from a buffer
Jason Ekstrand [Tue, 1 Sep 2015 00:16:01 +0000 (17:16 -0700)]
nir/spirv: Use VERTEX_ID_ZERO_BASE for VertexId
In Vulkan, VertexId and InstanceId will be zero-based and new intrinsics,
VertexIndex and InstanceIndex, will be added for non-zer-based. See also,
Khronos bug #14255
Jason Ekstrand [Tue, 1 Sep 2015 00:14:47 +0000 (17:14 -0700)]
Merge remote-tracking branch 'fdo-personal/nir-spirv' into vulkan
From now on, the majority of SPIR-V improvements should happen on the spirv
branch which will also be public. It will be frequently merged into the
vulkan driver.
Jason Ekstrand [Mon, 31 Aug 2015 19:48:04 +0000 (12:48 -0700)]
nir/spirv: Update to the latest revision
Jason Ekstrand [Mon, 31 Aug 2015 23:54:02 +0000 (16:54 -0700)]
nir/builder: Use nir_after_instr to advance the cursor
This *should* ensure that the cursor gets properly advanced in all cases.
We had a problem before where, if the cursor was created using
nir_after_cf_node on a non-block cf_node, that would call nir_before_block
on the block following the cf node. Instructions would then get inserted
in backwards order at the top of the block which is not at all what you
would expect from nir_after_cf_node. By just resetting to after_instr, we
avoid all these problems.
Jason Ekstrand [Mon, 31 Aug 2015 22:54:21 +0000 (15:54 -0700)]
nir/intrinsics: Move to a two-dimensional binding model for UBO's
Jason Ekstrand [Mon, 31 Aug 2015 22:34:56 +0000 (15:34 -0700)]
nir/nir_variable: Add a descriptor set field
We need this for SPIR-V
Jason Ekstrand [Mon, 31 Aug 2015 21:55:49 +0000 (14:55 -0700)]
mesa: Move gl_vert_attrib from mtypes.h to shader_enums.h
It is a shader enum after all...
Jason Ekstrand [Mon, 31 Aug 2015 21:48:10 +0000 (14:48 -0700)]
nir/cursor: Add a helper for getting the current block
Connor Abbott [Fri, 19 Jun 2015 00:34:55 +0000 (17:34 -0700)]
nir/builder: add a nir_fdot() convenience function
Jason Ekstrand [Sat, 29 Aug 2015 00:09:02 +0000 (17:09 -0700)]
nir: Add a pass to lower outputs to temporary variables
This pass can be used as a helper for NIR producers so they don't have to
worry about creating the temporaries themselves.
Jason Ekstrand [Sat, 29 Aug 2015 00:17:39 +0000 (17:17 -0700)]
nir/cursor: Add a constructor for the end of a block but before the jump
Connor Abbott [Thu, 16 Jul 2015 04:58:32 +0000 (21:58 -0700)]
nir/types: add more nir_type_is_xxx() wrappers
Connor Abbott [Fri, 19 Jun 2015 00:34:12 +0000 (17:34 -0700)]
nir/types: add a helper to transpose a matrix type
Jason Ekstrand [Sat, 16 May 2015 19:34:32 +0000 (12:34 -0700)]
nir/spirv: Don't assert that the current block is empty
It's possible that someone will give us SPIR-V code in which someone
needlessly branches to new blocks. We should handle that ok now.
Jason Ekstrand [Sat, 16 May 2015 19:34:15 +0000 (12:34 -0700)]
nir/spirv: Add initial support for samplers
Jason Ekstrand [Sat, 16 May 2015 19:33:29 +0000 (12:33 -0700)]
nir/spirv: Move Exp and Log to the list of currently unhandled ALU ops
NIR doesn't have the native opcodes for them anymore
Jason Ekstrand [Sat, 16 May 2015 19:32:58 +0000 (12:32 -0700)]
nir/types: Add support for sampler types
Jason Ekstrand [Wed, 6 May 2015 22:36:54 +0000 (15:36 -0700)]
nir/spirv: Make the global constants in spirv.h static
I've been promissed in a bug that this will be fixed in a future version of
the header. However, in the interest of my branch building, I'm adding
these changes in myself for the moment.
Jason Ekstrand [Wed, 6 May 2015 22:33:21 +0000 (15:33 -0700)]
nir/spirv: Handle jump-to-loop in a more general way
Jason Ekstrand [Wed, 6 May 2015 19:54:02 +0000 (12:54 -0700)]
nir/spirv: Handle boolean uniforms correctly
Jason Ekstrand [Wed, 6 May 2015 19:37:10 +0000 (12:37 -0700)]
nir/spirv: Handle control-flow with loops
Jason Ekstrand [Wed, 6 May 2015 19:36:31 +0000 (12:36 -0700)]
nir/spirv: Set a name on temporary variables
Jason Ekstrand [Wed, 6 May 2015 19:36:09 +0000 (12:36 -0700)]
nir/spirv: Use the correct length for copying string literals
Jason Ekstrand [Wed, 6 May 2015 19:35:30 +0000 (12:35 -0700)]
nir/spirv: Make vtn_ssa_value handle constants as well as ssa values
Jason Ekstrand [Mon, 4 May 2015 22:17:56 +0000 (15:17 -0700)]
nir/spirv: Add initial support for GLSL 4.50 builtins
Jason Ekstrand [Mon, 4 May 2015 19:25:09 +0000 (12:25 -0700)]
nir/spirv: Split the core datastructures into a header file
Jason Ekstrand [Mon, 4 May 2015 19:12:23 +0000 (12:12 -0700)]
nir/spirv: Use the builder for all instructions
We don't actually use it to create all the instructions but we do use it
for insertion always. This should make things far more consistent for
implementing extended instructions.
Jason Ekstrand [Mon, 4 May 2015 19:04:02 +0000 (12:04 -0700)]
nir/spirv: Add support for a bunch of ALU operations
Jason Ekstrand [Mon, 4 May 2015 19:02:57 +0000 (12:02 -0700)]
nir/spirv: Add support for indirect array accesses
Jason Ekstrand [Mon, 4 May 2015 19:02:24 +0000 (12:02 -0700)]
nir/spirv: Explicitly type constants and SSA values
Jason Ekstrand [Mon, 4 May 2015 17:23:09 +0000 (10:23 -0700)]
nir/spirv: Handle OpBranchConditional
We do control-flow handling as a two-step process. The first step is to
walk the instructions list and record various information about blocks and
functions. This is where the acutal nir_function_overload objects get
created. We also record the start/stop instruction for each block. Then
a second pass walks over each of the functions and over the blocks in each
function in a way that's NIR-friendly and actually parses the instructions.
Jason Ekstrand [Mon, 4 May 2015 17:22:52 +0000 (10:22 -0700)]
nir/spirv: Add a helper for getting a value as an SSA value
Jason Ekstrand [Fri, 1 May 2015 21:00:57 +0000 (14:00 -0700)]
nir/spirv: Split instruction handling into preamble and body sections
Jason Ekstrand [Fri, 1 May 2015 18:28:18 +0000 (11:28 -0700)]
nir/spirv: Implement load/store instructiosn
Jason Ekstrand [Mon, 4 May 2015 17:19:24 +0000 (10:19 -0700)]
nir: Add a helper for getting the tail of a deref chain
Jason Ekstrand [Fri, 1 May 2015 18:28:01 +0000 (11:28 -0700)]
nir/spirv: Actaully add variables to the funciton or shader
Jason Ekstrand [Fri, 1 May 2015 18:27:44 +0000 (11:27 -0700)]
nir/spirv: Add a vtn_untyped_value helper
Jason Ekstrand [Fri, 1 May 2015 18:27:21 +0000 (11:27 -0700)]
nir/spirv: Use vtn_value in the types code and fix a off-by-one error
Jason Ekstrand [Fri, 1 May 2015 18:26:40 +0000 (11:26 -0700)]
nir/types: Add an is_vector_or_scalar helper
Jason Ekstrand [Thu, 30 Apr 2015 03:56:36 +0000 (20:56 -0700)]
nir/spirv: Add support for deref chains
Jason Ekstrand [Thu, 30 Apr 2015 03:56:17 +0000 (20:56 -0700)]
nir/types: Add a scalar type constructor
Jason Ekstrand [Thu, 30 Apr 2015 03:19:34 +0000 (20:19 -0700)]
nir/spirv: Add support for OpLabel
Jason Ekstrand [Thu, 30 Apr 2015 03:10:20 +0000 (20:10 -0700)]
nir/spirv: Add support for declaring functions
Jason Ekstrand [Thu, 30 Apr 2015 03:09:36 +0000 (20:09 -0700)]
nir/types: Add accessors for function parameter/return types
Jason Ekstrand [Thu, 30 Apr 2015 02:37:41 +0000 (19:37 -0700)]
nir/spirv: Add support for declaring variables
Deref chains and variable load/store operations are still missing.
Jason Ekstrand [Thu, 30 Apr 2015 01:14:11 +0000 (18:14 -0700)]
nir/spirv: Add support for constants
Jason Ekstrand [Wed, 29 Apr 2015 21:36:01 +0000 (14:36 -0700)]
nir/spirv: Add basic support for types
Jason Ekstrand [Wed, 29 Apr 2015 21:28:37 +0000 (14:28 -0700)]
nir/types: Add more helpers for creating types
Jason Ekstrand [Wed, 29 Apr 2015 21:48:12 +0000 (14:48 -0700)]
glsl/types: Expose the function_param and struct_field structs to C
Previously, they were hidden behind a #ifdef __cplusplus so C wouldn't find
them. This commit simpliy moves the #ifdef and adds #ifdef's around
constructors.
Jason Ekstrand [Wed, 25 Feb 2015 00:29:33 +0000 (16:29 -0800)]
glsl/types: Add support for function types
Jason Ekstrand [Wed, 25 Feb 2015 00:27:32 +0000 (16:27 -0800)]
glsl: Add GLSL_TYPE_FUNCTION to the base types enums
Jason Ekstrand [Wed, 29 Apr 2015 21:34:06 +0000 (14:34 -0700)]
nir/spirv: Rework the way values are added
Instead of having functions to add values and set various things, we just
have a function that does a few asserts and then returns the value. The
caller is then responsible for setting the various fields.
Jason Ekstrand [Wed, 29 Apr 2015 21:32:55 +0000 (14:32 -0700)]
nir/spirv: Add stub support for extension instructions
Jason Ekstrand [Wed, 29 Apr 2015 21:29:38 +0000 (14:29 -0700)]
REVERT: Add a simple helper program for testing SPIR-V -> NIR translation
Jason Ekstrand [Wed, 29 Apr 2015 21:30:22 +0000 (14:30 -0700)]
glsl/compiler: Move the error_no_memory stub to standalone_scaffolding.cpp
Jason Ekstrand [Wed, 29 Apr 2015 00:43:16 +0000 (17:43 -0700)]
nir: Add the start of a SPIR-V to NIR translator
At the moment, it can handle the very basics of strings and can ignore
debug instructions. It also has basic support for decorations.
Jason Ekstrand [Tue, 28 Apr 2015 04:13:44 +0000 (21:13 -0700)]
nir: Import the revision 30 SPIR-V header from Khronos
Jason Ekstrand [Mon, 31 Aug 2015 23:30:07 +0000 (16:30 -0700)]
Merge remote-tracking branch 'mesa-public/master' into vulkan
Nanley Chery [Wed, 12 Aug 2015 21:41:50 +0000 (14:41 -0700)]
mesa/texformat: use format conversion function in _mesa_choose_tex_format
This function's cases for non-generic compressed formats duplicate
the GL to MESA translation in _mesa_glenum_to_compressed_format().
This patch replaces the switch cases with a call to the translation
function. This change teaches this function about ASTC, thus enabling
ASTC for glTex*Storage*() calls.
Reviewed-by: Chad Versace <chad.versace@intel.com>
Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Nanley Chery [Wed, 26 Aug 2015 19:01:38 +0000 (12:01 -0700)]
mesa/texcompress: correct mapping of S3TC formats in conversion function
MESA_FORMAT_RGBA_DXT5 should actually be reserved for GL_RGBA[4]_DXT5_S3TC.
Also, Gallium and other dri drivers (radeon and nouveau) follow this mapping
scheme.
Reviewed-by: Chad Versace <chad.versace@intel.com>
Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Dave Airlie [Mon, 31 Aug 2015 04:22:23 +0000 (14:22 +1000)]
r600/sb: update last_cf for finalize if.
As Glenn did for finalize_loop we need to update_cf when we
add a POP at the end of a shader.
I think this fixes one of the earlier shader going off end
of memory problems we've stopped.
Reviewed-by: Glenn Kennard <glenn.kennard@gmail.com>
Cc: "10.6" "11.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Matt Turner [Sat, 29 Aug 2015 00:10:00 +0000 (17:10 -0700)]
i965/fs: Use greater-equal cmod to implement maximum.
The docs specifically call out SEL with .l and .ge as the
implementations of MIN and MAX respectively. Among other things,
SEL with these conditional mods are commutative.
See commit
3b7f683f.
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Ben Widawsky [Thu, 9 Jul 2015 00:04:10 +0000 (17:04 -0700)]
i965/chv|skl: Apply sampler bypass w/a
Certain compressed formats require this setting. The docs don't go into much
detail as to why it's needed exactly.
This patch introduces no piglit regressions on gen9 (bsw is untested). Note that
the SKL "regressions" are fixed tests, and the egl_khr_gl_colorspace tests are
WTF. The patch also fixes nothing I can find.
http://otc-mesa-ci.jf.intel.com/job/Leeroy/127820/
v2:
Reworded commit message (Matt); Added piglit results link.
Restructured condition (Matt)
Moved check out to function (Nanley). I left the setting of the bit in the
surface state open coded because it seems to go better with the existing code.
v3:
Use and inline function only in gen8_emit_texture_surface_state() (Matt).
Cc: Matt Turner <mattst88@gmail.com>
Cc: Nanley Chery <nanleychery@gmail.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Dave Airlie [Thu, 27 Aug 2015 01:13:14 +0000 (02:13 +0100)]
st/mesa: move to renumbering registers in a group
This can be done with a single pass for the instruction base,
and takes renumber_registers out of its spot on the profile.
Acked-by: Marek Olšák <marek.olsak@amd.com
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Thu, 27 Aug 2015 00:46:33 +0000 (01:46 +0100)]
st/mesa: reduce time spent in calculating temp read/writes
The glsl->tgsi convertor does some temporary register reduction
however in profiling shader-db this shows up quite highly,
so optimise things to reduce the number of loops through
all the instructions we do. This drops merge_registers
from 4-5% on the profile to 1%. I think this can be reduced
further by possibly optimising the renumber pass.
Acked-by: Marek Olšák <marek.olsak@amd.com
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Thu, 27 Aug 2015 00:01:00 +0000 (01:01 +0100)]
st/mesa: cache tgsi opcode info in the instruction
Instead of looking this up lots, lets just cache it in the instruction
translation up front. I just noticed this function what high in a profile
of shader-db on radeonsi.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Sun, 30 Aug 2015 10:40:31 +0000 (20:40 +1000)]
r600: move prim convert from geom shader to function.
This should avoid C++ fail including this header.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Timothy Arceri [Sun, 9 Aug 2015 06:25:50 +0000 (16:25 +1000)]
glsl: remove specical case subroutine type counting
Unlike samplers we can get the correct value for subroutines from
component_slots()
Reviewed-by: Dave Airlie <airlied@redhat.com>
Edward O'Callaghan [Sat, 29 Aug 2015 08:31:09 +0000 (18:31 +1000)]
r600g: Use TGSI parse results instead of manually exfiltrating
This makes better use of the work that the TGSI API has done for
us.
Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
Edward O'Callaghan [Sat, 29 Aug 2015 08:31:08 +0000 (18:31 +1000)]
r600g: Set geometry properties in r600_create_shader_state()
The selector is shared by all shader variants, so the
individual shaders shouldn't change it. Use tgsi_shader_scan()
results to set geometry properties within a
r600_create_shader_state() call and treat said propertices in
the selector as read-only within r600_shader_from_tgsi().
Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
Edward O'Callaghan [Sat, 29 Aug 2015 08:31:07 +0000 (18:31 +1000)]
r600g: Move geometry properties state from shader to selector
Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
Edward O'Callaghan [Sat, 29 Aug 2015 08:31:06 +0000 (18:31 +1000)]
r600g: Remove dead assigment to 'gs_input_prim' in shader state
Note that 'geometry shader properties' should be carried in the
selector state over the shader state in any case.
Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
Marek Olšák [Tue, 25 Aug 2015 17:21:38 +0000 (19:21 +0200)]
radeonsi: don't use the emit qt keyword in si_init_atom
It confuses my editor.
Marek Olšák [Sun, 23 Aug 2015 11:05:53 +0000 (13:05 +0200)]
radeonsi: remove no-op 32-bit masking
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Marek Olšák [Sun, 23 Aug 2015 10:57:09 +0000 (12:57 +0200)]
gallium/radeon: fix the ADDRESS_HI mask for EVENT_WRITE CIK packets
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Marek Olšák [Sat, 22 Aug 2015 16:05:37 +0000 (18:05 +0200)]
winsys/radeon: handle non-zero finite timeout when waiting for buffers
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Ilia Mirkin [Wed, 26 Aug 2015 04:11:23 +0000 (00:11 -0400)]
freedreno/a3xx: implement half-z clipping
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Ilia Mirkin [Tue, 25 Aug 2015 03:31:00 +0000 (23:31 -0400)]
freedreno/a3xx: add basic clip plane support
The hardware is capable of dealing with GL1-style user clip planes.
No clip vertex, no clip distances. Fixes a number of ucp tests, as well
as neverball.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "11.0" <mesa-stable@lists.freedesktop.org>
Samuel Pitoiset [Sat, 29 Aug 2015 08:58:49 +0000 (10:58 +0200)]
nvc0: change prefix of MP performance counters to HW_SM
According to NVIDIA, local performance counters (MP) are prefixed
with SM, while global performance counters (PCOUNTER) are called PM.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Samuel Pitoiset [Fri, 28 Aug 2015 17:09:33 +0000 (19:09 +0200)]
nvc0: sort performance counter queries by name
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Samuel Pitoiset [Fri, 28 Aug 2015 16:41:16 +0000 (18:41 +0200)]
nvc0: make names of performance counter queries consistent
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Samuel Pitoiset [Fri, 28 Aug 2015 16:30:13 +0000 (18:30 +0200)]
nvc0: use enumerations for driver queries
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Samuel Pitoiset [Fri, 28 Aug 2015 16:15:13 +0000 (18:15 +0200)]
nvc0: remove commented out code related to PCOUNTER queries
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Jason Ekstrand [Sat, 29 Aug 2015 05:31:03 +0000 (22:31 -0700)]
vk/SPIR-V: Pull num_uniform_components out of the NIR shader
Jason Ekstrand [Sat, 29 Aug 2015 00:21:19 +0000 (17:21 -0700)]
spirv: lower outputs to temporaries
Jason Ekstrand [Sat, 29 Aug 2015 00:09:02 +0000 (17:09 -0700)]
nir: Add a pass to lower outputs to temporary variables
This pass can be used as a helper for NIR producers so they don't have to
worry about creating the temporaries themselves.
Jason Ekstrand [Fri, 28 Aug 2015 23:17:45 +0000 (16:17 -0700)]
spirv: Only do a block load if you're actually loading a uniform
Jason Ekstrand [Fri, 28 Aug 2015 23:08:29 +0000 (16:08 -0700)]
spirv: Use VERTEX_ID_ZERO_BASE for vertex id
Dave Airlie [Fri, 28 Aug 2015 00:46:10 +0000 (10:46 +1000)]
r600: port si_conv_prim_to_gs_out from radeonsi
This code was broken by the tess merge, and I totally missed it
until now. I'm not sure this fixes anything but it stops the assert.
Cc: "11.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Glenn Kennard <glenn.kennard@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Thu, 27 Aug 2015 23:58:15 +0000 (09:58 +1000)]
r600g: use PRIi64 for some compute debug printfs
Otherwise this will crash on 32-bit, and it gets rid of
warnings building on 32-bit.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Thu, 27 Aug 2015 23:57:04 +0000 (09:57 +1000)]
gallium/util: fix debug_get_flags_option on 32-bit
On 32-bit we need to use PRIu64 flags for printfs,
otherwise this segfaults in R600_DEBUG=help otherwise.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Cc: "11.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Ilia Mirkin [Fri, 21 Aug 2015 01:55:52 +0000 (21:55 -0400)]
glsl: provide the option of using BFE for unpack builting lowering
This greatly improves generated code, especially for the snorm variants,
since it is able to get rid of the lshift/rshift for sext, as well as
replacing each shift + mask with a single op.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Ilia Mirkin [Fri, 21 Aug 2015 00:52:32 +0000 (20:52 -0400)]
glsl: use bitfield_insert instead of and + shift + or for packing
It is fairly tricky to detect the proper conditions for using bitfield
insert, but easy to just use it up front. This removes a lot of
instructions on nvc0 when invoking the packing builtins.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Jason Ekstrand [Fri, 28 Aug 2015 19:13:17 +0000 (12:13 -0700)]
vk/compiler: Pass the correct is_scalar value to brw_process_nir