mesa.git
8 years agoanv: Remove a few finished finishme
Kristian Høgsberg Kristensen [Mon, 25 Jan 2016 23:14:47 +0000 (15:14 -0800)]
anv: Remove a few finished finishme

8 years agoanv: Remove stale assert
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.

8 years agoanv/meta: Fix CopyBuffer when size matches HW limit
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.

8 years agoanv: Don't use uninitialized barycentric_interp_modes
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.

8 years agoanv: Disable fs dispatch for depth/stencil only pipelines
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.

8 years agoanv/cmd_buffer: Zero out binding tables and samplers in state_reset
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.

8 years agonir/opcodes: Properly flush denormals in fquantize2f16
Jason Ekstrand [Sat, 23 Jan 2016 06:04:09 +0000 (22:04 -0800)]
nir/opcodes: Properly flush denormals in fquantize2f16

8 years agoi965/nir: Properly flush denormals in nir_op_fquantize2f16
Jason Ekstrand [Sat, 23 Jan 2016 05:24:53 +0000 (21:24 -0800)]
i965/nir: Properly flush denormals in nir_op_fquantize2f16

8 years agoanv/format: Add a helpful comment about format names
Jason Ekstrand [Sat, 23 Jan 2016 03:14:41 +0000 (19:14 -0800)]
anv/format: Add a helpful comment about format names

8 years agoanv/formats: Add support for 3 more formats
Jason Ekstrand [Sat, 23 Jan 2016 03:03:27 +0000 (19:03 -0800)]
anv/formats: Add support for 3 more formats

8 years agoanv/pipeline: Add a default L3$ setup
Jason Ekstrand [Sat, 23 Jan 2016 03:02:55 +0000 (19:02 -0800)]
anv/pipeline: Add a default L3$ setup

8 years agoanv/formats: Rename ambiguous func parameter
Chad Versace [Sat, 23 Jan 2016 01:51:24 +0000 (17:51 -0800)]
anv/formats: Rename ambiguous func parameter

vkGetPhysicalDeviceImageFormatProperties has multiple 'flags'
parameters.

8 years agoanv/formats: Advertise multisample formats
Chad Versace [Sat, 23 Jan 2016 01:47:59 +0000 (17:47 -0800)]
anv/formats: Advertise multisample formats

Teach vkGetPhysicalDeviceImageFormatProperties() to advertise
multisampled formats.

8 years agoanv/image: Drop assertion that samples == 1
Chad Versace [Sat, 23 Jan 2016 01:16:20 +0000 (17:16 -0800)]
anv/image: Drop assertion that samples == 1

8 years agoisl: Fix gen8_choose_msaa_layout()
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.

8 years agoisl: Add func isl_tiling_is_any_y()
Chad Versace [Sat, 23 Jan 2016 01:06:44 +0000 (17:06 -0800)]
isl: Add func isl_tiling_is_any_y()

8 years agoanv/meta: Assert correct sample counts for blit funcs
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

8 years agoanv: Add anv_image::samples
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.

8 years agoanv: Use isl_device_get_sample_counts()
Chad Versace [Thu, 21 Jan 2016 00:04:28 +0000 (16:04 -0800)]
anv: Use isl_device_get_sample_counts()

Use it in vkGetPhysicalDeviceProperties.

8 years agoisl: Add func isl_device_get_sample_counts()
Chad Versace [Wed, 20 Jan 2016 23:53:54 +0000 (15:53 -0800)]
isl: Add func isl_device_get_sample_counts()

8 years agogen8/state: Remove SKL special-casing for MinimumArrayElement
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.

8 years agoanv/state: Dedupe code for lowering surface format
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().

8 years agoanv/meta: Set sampler type and instruction arrayness consistently in blit shader.
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.

8 years agoanv/meta: Fix meta blit fragment shader for 1D arrays.
Francisco Jerez [Fri, 22 Jan 2016 23:57:01 +0000 (15:57 -0800)]
anv/meta: Fix meta blit fragment shader for 1D arrays.

8 years agogenX/state: Set CubeSurfaceControlMode to OVERRIDE
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.

8 years agogen8/state: Divide depth by 6 for cube maps for GEN8
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.

8 years agogen8_state: Enable all cube faces
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.

8 years agoisl/format_layout: R11G11B10_FLOAT is unsigned
Jason Ekstrand [Fri, 22 Jan 2016 19:57:49 +0000 (11:57 -0800)]
isl/format_layout: R11G11B10_FLOAT is unsigned

8 years agoanv/image: Move common code to anv_image.c
Jason Ekstrand [Fri, 22 Jan 2016 19:57:01 +0000 (11:57 -0800)]
anv/image: Move common code to anv_image.c

8 years agoanv/state: Refactor surface state setup into a "fill" function
Jason Ekstrand [Fri, 22 Jan 2016 19:40:56 +0000 (11:40 -0800)]
anv/state: Refactor surface state setup into a "fill" function

8 years agoanv/state: Add missing clflushes for storage image surface state.
Francisco Jerez [Fri, 22 Jan 2016 03:21:35 +0000 (19:21 -0800)]
anv/state: Add missing clflushes for storage image surface state.

8 years agoanv/state: Factor out surface state calculation from genX_image_view_init.
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.

8 years agoi965/nir: Temporariliy disable mul+add fusion
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.

8 years agoisl: Fix indentation of isl_format_layout comment
Chad Versace [Fri, 22 Jan 2016 17:48:11 +0000 (09:48 -0800)]
isl: Fix indentation of isl_format_layout comment

8 years agoisl/tests: Give tests less cryptic names
Chad Versace [Fri, 22 Jan 2016 17:46:48 +0000 (09:46 -0800)]
isl/tests: Give tests less cryptic names

8 years agoisl: Fix isl_surf_get_image_offset_sa for gen4_3d layout
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.

8 years agoisl/tests: Add test for bdw 3d surface
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.

8 years agoisl/tests: Remove copy-paste assertion
Chad Versace [Fri, 22 Jan 2016 15:17:34 +0000 (07:17 -0800)]
isl/tests: Remove copy-paste assertion

8 years agoisl/tests: Fix build
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.

8 years agoanv/batch_chain: Fix patching up of block pool relocations on Gen8+.
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.

8 years agonir/spirv: Ignore cull distance
Jason Ekstrand [Fri, 22 Jan 2016 00:03:06 +0000 (16:03 -0800)]
nir/spirv: Ignore cull distance

8 years agonir/lower_system_values: Use the correct invication id for CS
Jason Ekstrand [Fri, 22 Jan 2016 00:00:47 +0000 (16:00 -0800)]
nir/lower_system_values: Use the correct invication id for CS

8 years agonir/spirv: Properly assign locations to split structures
Jason Ekstrand [Thu, 21 Jan 2016 20:41:45 +0000 (12:41 -0800)]
nir/spirv: Properly assign locations to split structures

8 years agonir/spirv: Improve handling of variable loads and copies
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.

8 years agonir/spirv: Make vectors a proper array time with an array_element
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

8 years agonir/spirv: Rework access chains a bit to allow for literals
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.

8 years agovtn/variables: Compact local loads/stores into one function
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.

8 years agonir/spirv: Add an actual variable struct to spirv_to_nir
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.

8 years agonir/spirv: Split variable handling out into its own file
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.

8 years agonir/spirv: Rework access chains
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.

8 years agonir/spirv: Implement ModfStruct opcode.
Kenneth Graunke [Thu, 21 Jan 2016 22:56:34 +0000 (14:56 -0800)]
nir/spirv: Implement ModfStruct opcode.

8 years agonir/spirv: Delete stray fmod remnants.
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.

8 years agovk: Do render cache flush for GEN8+
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.

8 years agovk: Emit surface state base address before renderpass
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

8 years agovk: Fix indirect push constants
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.

8 years agoMerge remote-tracking branch 'jekstrand/wip/i965-uniforms' into vulkan
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

8 years agonir/spirv: Handle compute shared atomics
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>
8 years agonir/spirv: Support workgroup (shared) variable translation
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>
8 years agoanv/gen8: Set SLM size in interface descriptor
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>
8 years agoanv/gen8+9: Invalidate color calc state when switching to the GPGPU pipeline
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>
8 years agoanv/gen8: Enable SLM in L3 cache control register
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>
8 years agoanv/pipeline: Set size of shared variables in prog_data
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>
8 years agoi965/nir: Lower nir compute shader shared variables
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>
8 years agonir: Lower shared var atomics during nir_lower_io
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>
8 years agonir: Add support for lowering load/stores of shared variables
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>
8 years agonir: Add atomic operations on variables
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>
8 years agonir: Add compute shader shared variable storage class
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>
8 years agonir/print: Add space after shader_storage var mode
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>
8 years agoi965/fs/nir: Move shared variable load/store to nir_emit_cs_intrinsic
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>
8 years agoanv/image: Stop including gen8_pack.h in common file
Chad Versace [Wed, 20 Jan 2016 23:41:25 +0000 (15:41 -0800)]
anv/image: Stop including gen8_pack.h in common file

8 years agoisl: Add a README
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.

8 years agovk: Make maxSamplerAllocationCount more reasonable
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.

8 years agovk/tests: Add stub for anv_gem_get_bit6_swizzle()
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()

8 years agovk/tests: Add isl include path
Kristian Høgsberg Kristensen [Wed, 20 Jan 2016 21:45:25 +0000 (13:45 -0800)]
vk/tests: Add isl include path

8 years agonir/spirv/glsl450: Use fabs not iabs in ldexp.
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.

8 years agoisl: Add ish.h to libsil_la_SOURCES
Kristian Høgsberg Kristensen [Wed, 20 Jan 2016 20:02:48 +0000 (12:02 -0800)]
isl: Add ish.h to libsil_la_SOURCES

8 years agonir/spirv/glsl450: Implement FrexpStruct
Jason Ekstrand [Wed, 20 Jan 2016 19:36:41 +0000 (11:36 -0800)]
nir/spirv/glsl450: Implement FrexpStruct

8 years agospirv/nir/glsl450: Use vtn_create_ssa_value to create SSA values
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

8 years agoanv/device: Default to scalar GS on BDW+
Jason Ekstrand [Wed, 20 Jan 2016 19:16:44 +0000 (11:16 -0800)]
anv/device: Default to scalar GS on BDW+

8 years agonir/spirv: Pull texture dimensionality out of the image when available
Jason Ekstrand [Wed, 20 Jan 2016 19:11:30 +0000 (11:11 -0800)]
nir/spirv: Pull texture dimensionality out of the image when available

8 years agoanv/meta: fix UpdateBuffer in the case where we do multiple updates
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

8 years agoanv/meta: Fix a finishme
Jason Ekstrand [Wed, 20 Jan 2016 15:33:41 +0000 (07:33 -0800)]
anv/meta: Fix a finishme

8 years agonir/spirv: Move OpPhi handling to vtn_cfg.c
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.

8 years agonir/spirv: Handle OpLine and OpNoLine in foreach_instruction
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.

8 years agonir: Lower ldexp to arithmetic.
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>
8 years agonir: Let nir_opt_algebraic rules contain unsigned constants > INT_MAX.
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>
8 years agoanv/meta: Implement UpdateBuffer
Jason Ekstrand [Wed, 20 Jan 2016 00:39:48 +0000 (16:39 -0800)]
anv/meta: Implement UpdateBuffer

8 years agoanv/meta: Implement CmdFillBuffer
Jason Ekstrand [Wed, 20 Jan 2016 00:17:13 +0000 (16:17 -0800)]
anv/meta: Implement CmdFillBuffer

8 years agoanv/meta_clear: Call emit_clear directly in ClearImage
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.

8 years agoanv/meta_clear: Do save/restore in actual entry points
Jason Ekstrand [Tue, 19 Jan 2016 23:27:20 +0000 (15:27 -0800)]
anv/meta_clear: Do save/restore in actual entry points

8 years agoanv: Add support for VK_WHOLE_SIZE several places
Jason Ekstrand [Tue, 19 Jan 2016 23:01:10 +0000 (15:01 -0800)]
anv: Add support for VK_WHOLE_SIZE several places

8 years agonir/spirv/glsl450: Implement Frexp.
Kenneth Graunke [Wed, 20 Jan 2016 00:46:03 +0000 (16:46 -0800)]
nir/spirv/glsl450: Implement Frexp.

8 years agonir/spirv/glsl450: Blindly implement Atan2.
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.

8 years agonir/spirv/glsl450: Implement Atan.
Kenneth Graunke [Tue, 19 Jan 2016 22:30:02 +0000 (14:30 -0800)]
nir/spirv/glsl450: Implement Atan.

8 years agonir/spirv/glsl450: Implement Asin and Acos.
Kenneth Graunke [Tue, 19 Jan 2016 20:15:36 +0000 (12:15 -0800)]
nir/spirv/glsl450: Implement Asin and Acos.

8 years agoanv/pipeline: Fix point size
Jason Ekstrand [Tue, 19 Jan 2016 20:02:53 +0000 (12:02 -0800)]
anv/pipeline: Fix point size

8 years agogetX/state: Set LOD pre-clamp to OpenGL mode
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

8 years agoisl/device: Add a flag for bit 6 swizzling
Jason Ekstrand [Tue, 5 Jan 2016 21:53:05 +0000 (13:53 -0800)]
isl/device: Add a flag for bit 6 swizzling

8 years agoanv/gem: Add a helper for getting bit6 swizzling information
Jason Ekstrand [Mon, 18 Jan 2016 23:42:41 +0000 (15:42 -0800)]
anv/gem: Add a helper for getting bit6 swizzling information

8 years agonir/spirv: Patch through image qualifiers
Jason Ekstrand [Tue, 19 Jan 2016 00:01:00 +0000 (16:01 -0800)]
nir/spirv: Patch through image qualifiers