Commit Graph

75519 Commits

Author SHA1 Message Date
Jason Ekstrand 83c305f8ef anv/meta_clear: Don't try to clear depth-stencil without LOAD_OP_CLEAR 2015-11-21 00:05:18 -08:00
Jason Ekstrand 438eaa3ae7 anv/meta: Add initial support for multi-slice array and 3-D copies
We still need to fix up a few bits once we have real CPP values, but this
should get us a long ways.
2015-11-20 18:25:06 -08:00
Jason Ekstrand d6a7c659c7 anv/meta: Use array textures for 2D
This a total of 1 extra instruction in the shader and gives us a lot more
flexibility in how we do blits.
2015-11-20 16:00:34 -08:00
Jason Ekstrand e3ec964e44 anv/meta: Keep z coordinate flat while blitting 2015-11-20 15:48:03 -08:00
Jason Ekstrand 1157b0360d nir/spirv: Rework decoration iteration
The old code didn't work correctly if you had member decorations after
non-member decorations.  Since glslang never gave us any of those, it
wasn't properly tested.
2015-11-20 15:15:40 -08:00
Jason Ekstrand cff74d6fb8 nir/spirv: Handle OpNop 2015-11-20 15:02:45 -08:00
Jason Ekstrand 1d42f773d3 gen8_state: Clamp sampler values to HW limitations 2015-11-20 14:45:44 -08:00
Jason Ekstrand 48228c114e nir/spirv: Add support for runtime arrays 2015-11-20 12:49:20 -08:00
Jason Ekstrand 55d16c090e gen8/pipeline: Properly handle MIN/MAX blend ops 2015-11-20 11:53:10 -08:00
Jason Ekstrand b43ce6768d gen8/pipeline: Set IndependentAlphaBlendEnable properly 2015-11-20 11:52:54 -08:00
Jason Ekstrand e69db9159b gen8/pipeline: Minor blending fixes
This makes various fields match upstream mesa
2015-11-20 11:52:30 -08:00
Jason Ekstrand fa8db0dfcc anv: Put all of the descriptor set stuff together in one file
The stuff to take descriptor sets and turn them into binding tables and
sampler tables is still in anv_cmd_buffer.c.  We may want to consider
putting it in anv_descriptor_set.c eventually.
2015-11-18 14:58:43 -08:00
Jason Ekstrand 828b1a6eb6 anv/device: Update the right sampler in UpdateDescriptorSets 2015-11-18 14:48:28 -08:00
Jason Ekstrand 6f613abc2b anv/cmd_buffer: Add a new genX_cmd_buffer file for shared code
This file contains code that can be shared across gens modulo recompiling.
In particular, we can share STATE_BASE_ADDRESS setup and handling of the
vkPipelineBarrier call.  Not sharing STATE_BASE_ADDRESS setup has already
been a source of bugs and the gen7 and gen8 implementations of
PipelineBarrier were line-for-line identical.

Incidentally, this should fix MOCS settings for dynamic and surface state
on Haswell.
2015-11-18 12:26:57 -08:00
Jason Ekstrand fb8b2f5f9e anv/gen7: A bunch of depth-stencil fixes
There are various bits which move around between Haswell and Ivy Bridge
that we weren't taking into account.  This also makes us actually set the
StencilWriteEnable in a sane way.
2015-11-18 11:43:52 -08:00
Jason Ekstrand e9d634f4ad gen7/pipeline: Re-arrange stencil parameters to match gen8 2015-11-17 19:10:31 -08:00
Jason Ekstrand 9e39bdabad anv/gen7: Implement CmdPipelineBarrier 2015-11-17 17:09:27 -08:00
Jason Ekstrand b707e90b6e anv/gen7: Don't use the upper bound on dynamic state base address
It doesn't do much for us and, if we have to resize the dynamic state block
pool for any reason, it becomes out-of-date.
2015-11-17 17:08:44 -08:00
Jason Ekstrand f0390bcad6 anv: Add initial Haswell support 2015-11-17 12:14:24 -08:00
Jason Ekstrand 45320f677b anv: Add macros for doing per-gen compilation 2015-11-17 08:27:51 -08:00
Jason Ekstrand 92d164b1c3 anv/entrypoints: Add dispatch support for haswell 2015-11-17 08:27:51 -08:00
Jason Ekstrand aa3002bd42 anv/entrypoints: Use devinfo instead of a gen number 2015-11-17 08:27:51 -08:00
Jason Ekstrand 0508046dc8 anv/cmd_buffer: Pack the 3DSTATE_VF packet on-demand 2015-11-17 08:27:51 -08:00
Jason Ekstrand 34d55d69cf anv/formats: Don't advertise stencil texture/blit prior to Broadwell 2015-11-17 08:23:29 -08:00
Jason Ekstrand de54b4b18f anv: Only include the pack headers where needed
Previously, we were including gen7_pack.h, gen75_pack.h, and gen8_pack.h
in anv_private.h.  As we add more gens, this is going to become untenable.
This commit moves things around so that we only use the pack headers when
and if we need them.
2015-11-16 12:29:09 -08:00
Jason Ekstrand cb9e2305f8 anv/cmd_buffer: Move gen-specific stuff into the appropreate files 2015-11-16 12:10:11 -08:00
Jason Ekstrand 22d024e031 nir/spirv: Add support for separate samplers and textures
This gets tricky in a few places because we have to pass vtn_sampled_image
values through OpAccessChain, but it works ok.  At some point, it probably
needs to be cleaned up but it doesn't occur to me exactly how to do that at
the moment.  We'll see how this approach goes.
2015-11-14 22:32:54 -08:00
Jason Ekstrand 002db3ee15 anv/cmd_buffer: Add a default descriptor type case
This silences a bunch of compiler warnings.
2015-11-14 09:16:55 -08:00
Jason Ekstrand e9dba80430 anv/apply_pipeline_layout: Handle separate samplers and textures 2015-11-14 09:00:35 -08:00
Jason Ekstrand b5d4027c35 Merge branch 'wip/i965-separate-sampler-tex' into vulkan 2015-11-14 08:23:27 -08:00
Jason Ekstrand c7d504ad93 i965/vec4: Plumb separate surfaces and samplers through from NIR 2015-11-14 08:05:31 -08:00
Jason Ekstrand 3dd84822df i965/vec4: Separate the sampler from the surface in generate_tex 2015-11-14 08:05:31 -08:00
Jason Ekstrand c09e140b65 i965/fs: Plumb separate surfaces and samplers through from NIR 2015-11-14 08:04:47 -08:00
Jason Ekstrand c2a373ec85 i965/fs: Separate the sampler from the surface in generate_tex 2015-11-14 08:01:50 -08:00
Jason Ekstrand b169bb902a nir: Separate texture from sampler in nir_tex_instr
This commit adds the capability to NIR to support separate textures and
samplers.  As it currently stands, glsl_to_nir only sets the sampler and
leaves the texture alone as it did before and nir_lower_samplers assumes
this.  However, backends can, if they wish, assume that they are separate
because nir_lower_samplers sets both texture and sampler index (they are
the same in this case).
2015-11-14 07:57:31 -08:00
Jason Ekstrand 1469ccb746 Merge remote-tracking branch 'mesa-public/master' into vulkan
This pulls in Matt's big compiler refactor.
2015-11-14 07:56:10 -08:00
Ilia Mirkin f94e1d9738 nouveau: don't expose HEVC decoding support
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: mesa-stable@lists.freedesktop.org
2015-11-14 10:32:10 -05:00
Jason Ekstrand e8f51fe4de anv/gen8: Subtract 1 from num_elements when setting up buffer surface state 2015-11-13 22:50:54 -08:00
Jason Ekstrand 91bc4e7cec anv/pipeline: Don't free blend states that don't exist
Compute pipelines don't need a blend state so we shouldn't be
unconditionally freeing it.
2015-11-13 21:49:41 -08:00
Jason Ekstrand c1733886a6 nir/spirv: Add support for SSBO stores
This only handles vector stores, not component-of-a-vector stores.
2015-11-13 21:41:52 -08:00
Jason Ekstrand c68e28d766 nir/spirv: Refactor vtn_block_load
We pull the offset calculations out into their own function so we can
re-use it for stores.
2015-11-13 21:32:00 -08:00
Jason Ekstrand 99494b96f0 nir/spirv: Add support for image_load_store 2015-11-13 17:54:43 -08:00
Jason Ekstrand 164b3ca164 nir/builder: Add a nir_ssa_undef helper 2015-11-13 17:54:43 -08:00
Jason Ekstrand ffbc31d13b nir/spirv: Add support for creating image variables 2015-11-13 17:54:43 -08:00
Jason Ekstrand 453239f6a5 nir/spirv: Add support for image types 2015-11-13 17:54:43 -08:00
Jason Ekstrand 0572444a0e nir/types: Add image type helpers 2015-11-13 17:54:43 -08:00
Jason Ekstrand d5ba7a26d9 glsl/types: Add a get_image_instance helper 2015-11-13 17:54:43 -08:00
Vinson Lee 3a0fef0005 nir: Silence GCC maybe-uninitialized warnings.
nir/nir_control_flow.c: In function ‘split_block_cursor.isra.11’:
nir/nir_control_flow.c:460:15: warning: ‘after’ may be used uninitialized in this function [-Wmaybe-uninitialized]
       *_after = after;
               ^
nir/nir_control_flow.c:458:16: warning: ‘before’ may be used uninitialized in this function [-Wmaybe-uninitialized]
       *_before = before;
                ^

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
2015-11-13 16:19:11 -08:00
Kenneth Graunke 5480bbd90e i965: Add a SHADER_OPCODE_URB_READ_SIMD8_PER_SLOT opcode.
We need to use per-slot offsets when there's non-uniform indexing,
as each SIMD channel could have a different index.  We want to use
them for any non-constant index (even if uniform), as it lives in
the message header instead of the descriptor, allowing us to set
offsets in GRFs rather than immediates.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
2015-11-13 16:11:02 -08:00
Kenneth Graunke 511de1a80c glsl: Allow implicit int -> uint conversions for the % operator.
GLSL 4.00 and GL_ARB_gpu_shader5 introduced a new int -> uint implicit
conversion rule and updated the rules for modulus to use them.  (In
earlier languages, none of the implicit conversion rules did anything
relevant, so there was no point in applying them.)

This allows expressions such as:

   int foo;
   uint bar;
   uint mod = foo % bar;

Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2015-11-13 16:09:58 -08:00