Kristian Høgsberg Kristensen [Mon, 25 Jan 2016 23:12:43 +0000 (15:12 -0800)]
anv: Remove stale assert
This goes back to when we didn't have the subpass number in the command
buffer begin info.
Nanley Chery [Thu, 31 Dec 2015 00:00:47 +0000 (16:00 -0800)]
anv/meta: Fix CopyBuffer when size matches HW limit
Perform a copy when the copy_size matches the HW limit (max_copy_size).
Otherwise the current behavior is that we fail the following assertion:
assert(height < max_surface_dim);
because the values are equal.
Kristian Høgsberg Kristensen [Mon, 25 Jan 2016 19:34:32 +0000 (11:34 -0800)]
anv: Don't use uninitialized barycentric_interp_modes
If we don't have a fragment shader, wm_prog_data in undefined.
Kristian Høgsberg Kristensen [Mon, 25 Jan 2016 19:24:19 +0000 (11:24 -0800)]
anv: Disable fs dispatch for depth/stencil only pipelines
Fixes most renderpass bugs.
Jason Ekstrand [Sat, 23 Jan 2016 06:57:02 +0000 (22:57 -0800)]
anv/cmd_buffer: Zero out binding tables and samplers in state_reset
This fixes a use of an undefined value if the client uses push constants in
a stage without ever setting any descriptors on GEN8-9.
Jason Ekstrand [Sat, 23 Jan 2016 06:04:09 +0000 (22:04 -0800)]
nir/opcodes: Properly flush denormals in fquantize2f16
Jason Ekstrand [Sat, 23 Jan 2016 05:24:53 +0000 (21:24 -0800)]
i965/nir: Properly flush denormals in nir_op_fquantize2f16
Jason Ekstrand [Sat, 23 Jan 2016 03:14:41 +0000 (19:14 -0800)]
anv/format: Add a helpful comment about format names
Jason Ekstrand [Sat, 23 Jan 2016 03:03:27 +0000 (19:03 -0800)]
anv/formats: Add support for 3 more formats
Jason Ekstrand [Sat, 23 Jan 2016 03:02:55 +0000 (19:02 -0800)]
anv/pipeline: Add a default L3$ setup
Chad Versace [Sat, 23 Jan 2016 01:51:24 +0000 (17:51 -0800)]
anv/formats: Rename ambiguous func parameter
vkGetPhysicalDeviceImageFormatProperties has multiple 'flags'
parameters.
Chad Versace [Sat, 23 Jan 2016 01:47:59 +0000 (17:47 -0800)]
anv/formats: Advertise multisample formats
Teach vkGetPhysicalDeviceImageFormatProperties() to advertise
multisampled formats.
Chad Versace [Sat, 23 Jan 2016 01:16:20 +0000 (17:16 -0800)]
anv/image: Drop assertion that samples == 1
Chad Versace [Sat, 23 Jan 2016 01:06:55 +0000 (17:06 -0800)]
isl: Fix gen8_choose_msaa_layout()
Gen8 requires any Y tiling, not any *standard* Y tiling.
Chad Versace [Sat, 23 Jan 2016 01:06:44 +0000 (17:06 -0800)]
isl: Add func isl_tiling_is_any_y()
Chad Versace [Thu, 21 Jan 2016 01:03:29 +0000 (17:03 -0800)]
anv/meta: Assert correct sample counts for blit funcs
Add assertions to:
anv_CmdBlitImage
anv_CmdCopyImage
anv_CmdCopyImageToBuffer
anv_CmdCopyBufferToImage
Chad Versace [Thu, 21 Jan 2016 00:34:23 +0000 (16:34 -0800)]
anv: Add anv_image::samples
It's set but not yet used.
Chad Versace [Thu, 21 Jan 2016 00:04:28 +0000 (16:04 -0800)]
anv: Use isl_device_get_sample_counts()
Use it in vkGetPhysicalDeviceProperties.
Chad Versace [Wed, 20 Jan 2016 23:53:54 +0000 (15:53 -0800)]
isl: Add func isl_device_get_sample_counts()
Nanley Chery [Fri, 22 Jan 2016 23:07:12 +0000 (15:07 -0800)]
gen8/state: Remove SKL special-casing for MinimumArrayElement
MinimumArrayElement carries the same meaning for BDW and SKL.
Suggested by Jason.
No regressions in dEQP-VK.pipeline.image.view_type.cube_array.*
Fixes a number of cube tests, including cube_array_base_slice
and cube_base_slice tests.
Chad Versace [Fri, 22 Jan 2016 22:48:36 +0000 (14:48 -0800)]
anv/state: Dedupe code for lowering surface format
Add helper anv_surface_format().
Francisco Jerez [Fri, 22 Jan 2016 23:57:02 +0000 (15:57 -0800)]
anv/meta: Set sampler type and instruction arrayness consistently in blit shader.
Francisco Jerez [Fri, 22 Jan 2016 23:57:01 +0000 (15:57 -0800)]
anv/meta: Fix meta blit fragment shader for 1D arrays.
Jason Ekstrand [Sat, 23 Jan 2016 00:34:13 +0000 (16:34 -0800)]
genX/state: Set CubeSurfaceControlMode to OVERRIDE
This makes it act like the address mode is set to TEXCOORDMODE_CUBE
whenever this sampler is combined with a cube surface. This *should* be
what we need for Vulkan. Interestingly, the PRM contains a programming
note for this field that says simply, "This field must be set to
CUBECTRLMODE_PROGRAMMED". However, emprical evidence suggests that it does
what the PRM says it does and OVERRIDE is just fine.
Jason Ekstrand [Sat, 23 Jan 2016 00:13:36 +0000 (16:13 -0800)]
gen8/state: Divide depth by 6 for cube maps for GEN8
For Broadwell cube maps, MinimumArrayElement is in terms of 2d slices (a
multiple of 6) but Depth is in terms of whole cubes.
Nanley Chery [Fri, 22 Jan 2016 20:17:25 +0000 (12:17 -0800)]
gen8_state: Enable all cube faces
These fields are ignored for non-cube surfaces. For cube surfaces
these fields should be enabled when using TEXCOORDMODE_CLAMP and
TEXCOORDMODE_CUBE.
TODO: Determine if these are the only two modes used in Vulkan.
Jason Ekstrand [Fri, 22 Jan 2016 19:57:49 +0000 (11:57 -0800)]
isl/format_layout: R11G11B10_FLOAT is unsigned
Jason Ekstrand [Fri, 22 Jan 2016 19:57:01 +0000 (11:57 -0800)]
anv/image: Move common code to anv_image.c
Jason Ekstrand [Fri, 22 Jan 2016 19:40:56 +0000 (11:40 -0800)]
anv/state: Refactor surface state setup into a "fill" function
Francisco Jerez [Fri, 22 Jan 2016 03:21:35 +0000 (19:21 -0800)]
anv/state: Add missing clflushes for storage image surface state.
Francisco Jerez [Fri, 22 Jan 2016 03:21:34 +0000 (19:21 -0800)]
anv/state: Factor out surface state calculation from genX_image_view_init.
Some fields of the surface state template were dependent on the
surface type, which is dependent on the usage of the image view, which
wasn't known until the bottom of the function after the template had
been constructed. This caused failures in all image load/store CTS
tests using cubemaps. Refactor the surface state calculation into a
function that is called once for each required usage.
Jason Ekstrand [Fri, 22 Jan 2016 19:09:24 +0000 (11:09 -0800)]
i965/nir: Temporariliy disable mul+add fusion
We don't want to do this in the long-run but it's needed for passing the
NoContraction tests at the moment. Eventually, we want to plumb this
through NIR properly.
Chad Versace [Fri, 22 Jan 2016 17:48:11 +0000 (09:48 -0800)]
isl: Fix indentation of isl_format_layout comment
Chad Versace [Fri, 22 Jan 2016 17:46:48 +0000 (09:46 -0800)]
isl/tests: Give tests less cryptic names
Chad Versace [Fri, 22 Jan 2016 16:32:00 +0000 (08:32 -0800)]
isl: Fix isl_surf_get_image_offset_sa for gen4_3d layout
Bug found by unit test
test_bdw_3d_r8g8b8a8_unorm_256x256x256_levels09_tiley0.
Chad Versace [Fri, 22 Jan 2016 16:31:29 +0000 (08:31 -0800)]
isl/tests: Add test for bdw 3d surface
test_bdw_3d_r8g8b8a8_unorm_256x256x256_levels09_tiley0
Currently fails.
Chad Versace [Fri, 22 Jan 2016 15:17:34 +0000 (07:17 -0800)]
isl/tests: Remove copy-paste assertion
Chad Versace [Fri, 22 Jan 2016 15:17:06 +0000 (07:17 -0800)]
isl/tests: Fix build
isl_device_init() acquired a new param for bit6 swizzling.
Francisco Jerez [Thu, 21 Jan 2016 22:14:07 +0000 (14:14 -0800)]
anv/batch_chain: Fix patching up of block pool relocations on Gen8+.
Relocations are 64 bits on Gen8+. Most CTS tests that send
non-trivial work to the GPU would fail when run from a single deqp-vk
invocation because they were effectively relying on reloc presumed
offsets to be wrong so the kernel would come and apply relocations
correctly.
Jason Ekstrand [Fri, 22 Jan 2016 00:03:06 +0000 (16:03 -0800)]
nir/spirv: Ignore cull distance
Jason Ekstrand [Fri, 22 Jan 2016 00:00:47 +0000 (16:00 -0800)]
nir/lower_system_values: Use the correct invication id for CS
Jason Ekstrand [Thu, 21 Jan 2016 20:41:45 +0000 (12:41 -0800)]
nir/spirv: Properly assign locations to split structures
Jason Ekstrand [Thu, 21 Jan 2016 18:58:53 +0000 (10:58 -0800)]
nir/spirv: Improve handling of variable loads and copies
Before we were asuming that a deref would either be something in a block or
something that we could pass off to NIR directly. However, it is possible
that someone would choose to load/store/copy a split structure all in one
go. We need to be able to handle that.
Jason Ekstrand [Thu, 21 Jan 2016 18:58:03 +0000 (10:58 -0800)]
nir/spirv: Make vectors a proper array time with an array_element
This makes dealing with single-component derefs easier
Jason Ekstrand [Thu, 21 Jan 2016 18:20:50 +0000 (10:20 -0800)]
nir/spirv: Rework access chains a bit to allow for literals
This makes them much easier to construct because you can also just specify
a literal number and it doesn't have to be a valid SPIR-V id.
Jason Ekstrand [Thu, 21 Jan 2016 16:53:04 +0000 (08:53 -0800)]
vtn/variables: Compact local loads/stores into one function
This is similar to what we did for block loads/stores.
Jason Ekstrand [Thu, 21 Jan 2016 10:09:38 +0000 (02:09 -0800)]
nir/spirv: Add an actual variable struct to spirv_to_nir
This allows us, among other things, to do structure splitting on-the-fly to
more correctly handle input/output structs.
Jason Ekstrand [Thu, 21 Jan 2016 01:40:49 +0000 (17:40 -0800)]
nir/spirv: Split variable handling out into its own file
It's 1300 lines all by itself and it will only grow.
Jason Ekstrand [Thu, 21 Jan 2016 01:11:55 +0000 (17:11 -0800)]
nir/spirv: Rework access chains
Previously, we were creating nir_deref's immediately. Now, instead, we
have an intermediate vtn_access_chain structure. While a little more
awkward initially, this will allow us to more easily do structure splitting
on-the-fly.
Kenneth Graunke [Thu, 21 Jan 2016 22:56:34 +0000 (14:56 -0800)]
nir/spirv: Implement ModfStruct opcode.
Kenneth Graunke [Thu, 21 Jan 2016 22:53:44 +0000 (14:53 -0800)]
nir/spirv: Delete stray fmod remnants.
Jason left these stray code fragments in
22804de110b97dce1415318fd02c1003e16ef14a.
Kristian Høgsberg Kristensen [Thu, 21 Jan 2016 22:14:01 +0000 (14:14 -0800)]
vk: Do render cache flush for GEN8+
This is needed for SKL as well.
Kristian Høgsberg Kristensen [Thu, 21 Jan 2016 21:52:41 +0000 (13:52 -0800)]
vk: Emit surface state base address before renderpass
If we're continuing a render pass, make sure we don't emit the depth and
stencil buffer addresses before we set the state base addresses.
Fixes crucible func.cmd-buffer.small-secondaries
Kristian Høgsberg Kristensen [Thu, 21 Jan 2016 18:43:32 +0000 (10:43 -0800)]
vk: Fix indirect push constants
This currently sets the base and size of all push constants to the
entire push constant block. The idea is that we'll use the base and size
to eventually optimize the amount we actually push, but for now we don't
do that.
Kristian Høgsberg Kristensen [Thu, 21 Jan 2016 19:07:09 +0000 (11:07 -0800)]
Merge remote-tracking branch 'jekstrand/wip/i965-uniforms' into vulkan
Jordan Justen [Sun, 10 Jan 2016 19:12:17 +0000 (11:12 -0800)]
nir/spirv: Handle compute shared atomics
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Jordan Justen [Sat, 9 Jan 2016 03:45:45 +0000 (19:45 -0800)]
nir/spirv: Support workgroup (shared) variable translation
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Jordan Justen [Sat, 9 Jan 2016 09:28:40 +0000 (01:28 -0800)]
anv/gen8: Set SLM size in interface descriptor
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Jordan Justen [Thu, 21 Jan 2016 01:26:41 +0000 (17:26 -0800)]
anv/gen8+9: Invalidate color calc state when switching to the GPGPU pipeline
Port
044acb9256046bebec890cac7e42043754459fc2 to anv.
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Jordan Justen [Sat, 9 Jan 2016 09:18:24 +0000 (01:18 -0800)]
anv/gen8: Enable SLM in L3 cache control register
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Jordan Justen [Mon, 18 Jan 2016 18:00:49 +0000 (10:00 -0800)]
anv/pipeline: Set size of shared variables in prog_data
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Jordan Justen [Mon, 18 Jan 2016 17:45:46 +0000 (09:45 -0800)]
i965/nir: Lower nir compute shader shared variables
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Jordan Justen [Mon, 18 Jan 2016 17:59:19 +0000 (09:59 -0800)]
nir: Lower shared var atomics during nir_lower_io
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Jordan Justen [Mon, 18 Jan 2016 17:44:31 +0000 (09:44 -0800)]
nir: Add support for lowering load/stores of shared variables
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Jordan Justen [Mon, 18 Jan 2016 17:53:44 +0000 (09:53 -0800)]
nir: Add atomic operations on variables
This allows us to first generate atomic operations for shared
variables using these opcodes, and then later we can lower those to
the shared atomics intrinsics with nir_lower_io.
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Jordan Justen [Sat, 9 Jan 2016 01:16:29 +0000 (17:16 -0800)]
nir: Add compute shader shared variable storage class
Previously we were receiving shared variable accesses via a lowered
intrinsic function from glsl. This change allows us to send in
variables instead. For example, when converting from SPIR-V.
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Jordan Justen [Sun, 17 Jan 2016 07:11:16 +0000 (23:11 -0800)]
nir/print: Add space after shader_storage var mode
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Jordan Justen [Sat, 16 Jan 2016 02:38:19 +0000 (18:38 -0800)]
i965/fs/nir: Move shared variable load/store to nir_emit_cs_intrinsic
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Chad Versace [Wed, 20 Jan 2016 23:41:25 +0000 (15:41 -0800)]
anv/image: Stop including gen8_pack.h in common file
Chad Versace [Fri, 15 Jan 2016 18:00:13 +0000 (10:00 -0800)]
isl: Add a README
Most of the file-level comment in isl.h is moved to the README.
Kristian Høgsberg Kristensen [Wed, 20 Jan 2016 22:36:52 +0000 (14:36 -0800)]
vk: Make maxSamplerAllocationCount more reasonable
We can't allocate 4 billion samplers. Let's go with 64k.
Kristian Høgsberg Kristensen [Wed, 20 Jan 2016 21:46:54 +0000 (13:46 -0800)]
vk/tests: Add stub for anv_gem_get_bit6_swizzle()
Kristian Høgsberg Kristensen [Wed, 20 Jan 2016 21:45:25 +0000 (13:45 -0800)]
vk/tests: Add isl include path
Kenneth Graunke [Wed, 20 Jan 2016 20:09:29 +0000 (12:09 -0800)]
nir/spirv/glsl450: Use fabs not iabs in ldexp.
This was just wrong.
Kristian Høgsberg Kristensen [Wed, 20 Jan 2016 20:02:48 +0000 (12:02 -0800)]
isl: Add ish.h to libsil_la_SOURCES
Jason Ekstrand [Wed, 20 Jan 2016 19:36:41 +0000 (11:36 -0800)]
nir/spirv/glsl450: Implement FrexpStruct
Jason Ekstrand [Wed, 20 Jan 2016 19:36:26 +0000 (11:36 -0800)]
spirv/nir/glsl450: Use vtn_create_ssa_value to create SSA values
Jason Ekstrand [Wed, 20 Jan 2016 19:16:44 +0000 (11:16 -0800)]
anv/device: Default to scalar GS on BDW+
Jason Ekstrand [Wed, 20 Jan 2016 19:11:30 +0000 (11:11 -0800)]
nir/spirv: Pull texture dimensionality out of the image when available
Jason Ekstrand [Wed, 20 Jan 2016 15:56:48 +0000 (07:56 -0800)]
anv/meta: fix UpdateBuffer in the case where we do multiple updates
Jason Ekstrand [Wed, 20 Jan 2016 15:33:41 +0000 (07:33 -0800)]
anv/meta: Fix a finishme
Jason Ekstrand [Wed, 20 Jan 2016 02:58:31 +0000 (18:58 -0800)]
nir/spirv: Move OpPhi handling to vtn_cfg.c
Phi handling is somewhat intrinsically tied to the CFG. Moving it here
makes it a bit easier to handle that. In particular, we can now do SSA
repair after we've done the phi node second-pass. This fixes 6 CTS tests.
Jason Ekstrand [Wed, 20 Jan 2016 02:44:44 +0000 (18:44 -0800)]
nir/spirv: Handle OpLine and OpNoLine in foreach_instruction
This way we don't have to explicitly handle them everywhere.
Kenneth Graunke [Wed, 20 Jan 2016 01:40:58 +0000 (17:40 -0800)]
nir: Lower ldexp to arithmetic.
This is a port of Matt's GLSL IR lowering pass to NIR. It's required
because we translate SPIR-V directly to NIR, bypassing GLSL IR.
I haven't introduced a lower_ldexp flag, as I believe all current NIR
consumers would set the flag. i965 wants this, vc4 doesn't implement
this feature, and st_glsl_to_tgsi currently lowers ldexp
unconditionally anyway.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Kenneth Graunke [Wed, 20 Jan 2016 01:34:24 +0000 (17:34 -0800)]
nir: Let nir_opt_algebraic rules contain unsigned constants > INT_MAX.
struct.pack('i', val) interprets `val` as a signed integer, and dies
if `val` > INT_MAX. For larger constants, we need to use 'I' which
interprets it as an unsigned value.
This patch makes us use 'I' for all values >= 0, and 'i' for negative
values. This should work in all cases.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Jason Ekstrand [Wed, 20 Jan 2016 00:39:48 +0000 (16:39 -0800)]
anv/meta: Implement UpdateBuffer
Jason Ekstrand [Wed, 20 Jan 2016 00:17:13 +0000 (16:17 -0800)]
anv/meta: Implement CmdFillBuffer
Jason Ekstrand [Tue, 19 Jan 2016 23:52:03 +0000 (15:52 -0800)]
anv/meta_clear: Call emit_clear directly in ClearImage
Using the load op means that we end up with recursive meta. We shouldn't
be doing that.
Jason Ekstrand [Tue, 19 Jan 2016 23:27:20 +0000 (15:27 -0800)]
anv/meta_clear: Do save/restore in actual entry points
Jason Ekstrand [Tue, 19 Jan 2016 23:01:10 +0000 (15:01 -0800)]
anv: Add support for VK_WHOLE_SIZE several places
Kenneth Graunke [Wed, 20 Jan 2016 00:46:03 +0000 (16:46 -0800)]
nir/spirv/glsl450: Implement Frexp.
Kenneth Graunke [Tue, 19 Jan 2016 23:56:50 +0000 (15:56 -0800)]
nir/spirv/glsl450: Blindly implement Atan2.
This is untested and probably broken.
We already passed the atan2 CTS tests before implementing this opcode.
Presumably, glslang or something was giving us a plain Atan opcode
instead of Atan2. I don't know why.
Kenneth Graunke [Tue, 19 Jan 2016 22:30:02 +0000 (14:30 -0800)]
nir/spirv/glsl450: Implement Atan.
Kenneth Graunke [Tue, 19 Jan 2016 20:15:36 +0000 (12:15 -0800)]
nir/spirv/glsl450: Implement Asin and Acos.
Jason Ekstrand [Tue, 19 Jan 2016 20:02:53 +0000 (12:02 -0800)]
anv/pipeline: Fix point size
Jason Ekstrand [Tue, 19 Jan 2016 01:45:12 +0000 (17:45 -0800)]
getX/state: Set LOD pre-clamp to OpenGL mode
This gets us another couple hundred sampler tests
Jason Ekstrand [Tue, 5 Jan 2016 21:53:05 +0000 (13:53 -0800)]
isl/device: Add a flag for bit 6 swizzling
Jason Ekstrand [Mon, 18 Jan 2016 23:42:41 +0000 (15:42 -0800)]
anv/gem: Add a helper for getting bit6 swizzling information
Jason Ekstrand [Tue, 19 Jan 2016 00:01:00 +0000 (16:01 -0800)]
nir/spirv: Patch through image qualifiers
Jason Ekstrand [Tue, 5 Jan 2016 22:03:58 +0000 (14:03 -0800)]
nir/spirv: Implement ImageQuerySize for storage iamges
SPIR-V only has one ImageQuerySize opcode that has to work for both
textures and storage images. Therefore, we have to special-case that one a
bit and look at the type of the incoming image handle.