Commit graph

77643 commits

Author SHA1 Message Date
Jason Ekstrand
b2b7c93318 glsl/enums: Add an enum for Vulkan instance index 2016-01-26 14:56:37 -08:00
Jason Ekstrand
da75492879 genX/pipeline: Break emit_vertex_input out into common code
It's mostly the same and contains some non-trivial logic, so it really
should be shared.  Also, we're about to make some modifications here that
we would really like to share.
2016-01-26 14:56:37 -08:00
Kristian Høgsberg Kristensen
fe6ccb6031 anv: Remove long unused anv_aub.h 2016-01-26 14:53:00 -08:00
Kristian Høgsberg Kristensen
074a7c7d7c anv: Dirty fragment shader descriptors in meta restore
We need to reemit render targets, so dirtying VK_SHADER_STAGE_VERTEX_BIT
doesn't help us much.
2016-01-26 14:44:02 -08:00
Kristian Høgsberg Kristensen
725d969753 anv: Reemit STATE_BASE_ADDRESS after second level cmd buffers
Otherwise the primary batch will continue using the state base addresses
set by the secondary.  Fixes remaining renderpass tests.
2016-01-26 14:44:02 -08:00
Chad Versace
df5f6d824b anv/meta: Fix sample mask in clear pipelines
Once we begin emitting the correct sample mask,
genX_3DSTATE_SAMPLE_MASK_pack will hit an assertion if the mask contains
too many bits.
2016-01-26 11:04:44 -08:00
Jason Ekstrand
725fb3623f i965/compiler: Set nir_options.vertex_id_zero_based 2016-01-25 16:10:28 -08:00
Jason Ekstrand
6b6a8a99f8 HACK/i965: Default to scalar GS on BDW+ 2016-01-25 15:52:53 -08:00
Jason Ekstrand
e462d4d815 Merge remote-tracking branch 'mattst88/nir-lower-pack-unpack' into vulkan 2016-01-25 15:50:31 -08:00
Jason Ekstrand
6bbf3814dc gen7/state: Apply min/mag filters individually for samplers
This fixes tests which apply different min and mag filters, and depend on
the min filter to be correct.
2016-01-25 15:33:08 -08:00
Ben Widawsky
9c69f4632d gen8/state: Apply min/mag filters individually for samplers
This fixes tests which apply different min and mag filters, and depend on the
min filter to be correct.
2016-01-25 15:29:18 -08:00
Jason Ekstrand
2434ceabf4 i965/fs: Feel free to spill partial reads/writes
Now that we properly handle write-masking, this should be safe.
2016-01-25 15:23:10 -08:00
Jason Ekstrand
9c0109a1f6 i965/fs: Properly write-mask spills
For unspills (scratch reads), we can just set WE_all all the time because
we always unspill into a new GRF.  For spills, we have two options: If the
instruction has a 32-bit-per-channel destination and "normal" regioning,
then we just do a regular write and it will interleave channels from
different control-flow paths properly.  If, on the other hand, the the
regioning is non-normal, then we have to unspill, run the instruction, and
spill afterwards.  In this second case, we need to do the spill with
we_ALL.
2016-01-25 15:23:10 -08:00
Kristian Høgsberg Kristensen
8e07f7942e anv: Remove a few finished finishme 2016-01-25 15:16:13 -08:00
Kristian Høgsberg Kristensen
76c096f0e7 anv: Remove stale assert
This goes back to when we didn't have the subpass number in the command
buffer begin info.
2016-01-25 15:15:59 -08:00
Matt Turner
874ede4983 i965/gen7+: Use NIR for lowering of pack/unpack opcodes. 2016-01-25 14:48:34 -08:00
Matt Turner
5deba3f00a i965/vec4: Implement nir_op_pack_uvec2_to_uint.
And mark nir_op_pack_uvec4_to_uint unreachable, since it's only produced
by lowering pack[SU]norm4x8 which the vec4 backend does not need.
2016-01-25 14:24:07 -08:00
Matt Turner
8bb22dc351 nir: Add lowering support for unpacking opcodes. 2016-01-25 14:24:07 -08:00
Matt Turner
d7781038f5 nir: Add lowering support for packing opcodes. 2016-01-25 14:24:07 -08:00
Matt Turner
6c1b3bc950 i965/fs: Implement support for extract_word.
The vec4 backend will lower it.
2016-01-25 14:24:07 -08:00
Matt Turner
26f0444ead nir: Add opcodes to extract bytes or words.
The uint versions zero extend while the int versions sign extend.
2016-01-25 14:24:07 -08:00
Nanley Chery
2c94f659e8 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.
2016-01-25 12:26:39 -08:00
Kristian Høgsberg Kristensen
c21de2bf04 anv: Don't use uninitialized barycentric_interp_modes
If we don't have a fragment shader, wm_prog_data in undefined.
2016-01-25 11:34:32 -08:00
Kristian Høgsberg Kristensen
292031a1a5 anv: Disable fs dispatch for depth/stencil only pipelines
Fixes most renderpass bugs.
2016-01-25 11:26:19 -08:00
Matt Turner
26b2cc6f3a glsl: Remove 2x16 half-precision pack/unpack opcodes.
i965/fs was the only consumer, and we're now doing the lowering in NIR.
2016-01-25 11:12:36 -08:00
Matt Turner
24d385f85c i965/fs: Switch from GLSL IR to NIR for un/packHalf2x16 lowering. 2016-01-25 11:11:56 -08:00
Matt Turner
5eb1145434 nir: Add lowering of nir_op_unpack_half_2x16. 2016-01-25 11:11:56 -08:00
Matt Turner
84166aed92 i965: Make separate nir_options for scalar/vector stages.
We'll want to have different lowering options set for scalar/vector
stages.
2016-01-25 11:11:26 -08:00
Matt Turner
b6bb3b9bcd i965: Move brw_compiler_create() to new brw_compiler.c.
A future patch will want to use designated initalizers, which aren't
available in C++, but this is C.
2016-01-25 11:11:25 -08:00
Matt Turner
b126039784 nir: Make argument order of unop_convert match binop_convert.
Strangely the return and parameter types were reversed.
2016-01-25 11:11:08 -08:00
Jason Ekstrand
a804d82ef6 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.
2016-01-22 22:57:05 -08:00
Jason Ekstrand
9e0bc29f80 nir/opcodes: Properly flush denormals in fquantize2f16 2016-01-22 22:18:31 -08:00
Jason Ekstrand
89672d81f3 i965/nir: Properly flush denormals in nir_op_fquantize2f16 2016-01-22 22:18:31 -08:00
Jason Ekstrand
2bfb9f29b8 anv/format: Add a helpful comment about format names 2016-01-22 19:14:41 -08:00
Jason Ekstrand
259e1bdf79 anv/formats: Add support for 3 more formats 2016-01-22 19:03:27 -08:00
Jason Ekstrand
0b6c1275d0 anv/pipeline: Add a default L3$ setup 2016-01-22 19:02:55 -08:00
Chad Versace
99a4885328 anv/formats: Rename ambiguous func parameter
vkGetPhysicalDeviceImageFormatProperties has multiple 'flags'
parameters.
2016-01-22 17:51:24 -08:00
Chad Versace
149d5ba64d anv/formats: Advertise multisample formats
Teach vkGetPhysicalDeviceImageFormatProperties() to advertise
multisampled formats.
2016-01-22 17:50:15 -08:00
Chad Versace
d96d78c3b6 anv/image: Drop assertion that samples == 1 2016-01-22 17:19:57 -08:00
Chad Versace
fda074b23f isl: Fix gen8_choose_msaa_layout()
Gen8 requires any Y tiling, not any *standard* Y tiling.
2016-01-22 17:19:57 -08:00
Chad Versace
2fa1f745ea isl: Add func isl_tiling_is_any_y() 2016-01-22 17:19:57 -08:00
Chad Versace
fa5f45e8aa anv/meta: Assert correct sample counts for blit funcs
Add assertions to:
    anv_CmdBlitImage
    anv_CmdCopyImage
    anv_CmdCopyImageToBuffer
    anv_CmdCopyBufferToImage
2016-01-22 17:19:57 -08:00
Chad Versace
dfcb4ee6df anv: Add anv_image::samples
It's set but not yet used.
2016-01-22 17:19:57 -08:00
Chad Versace
1c5d7b38e2 anv: Use isl_device_get_sample_counts()
Use it in vkGetPhysicalDeviceProperties.
2016-01-22 17:19:57 -08:00
Chad Versace
14b753f666 isl: Add func isl_device_get_sample_counts() 2016-01-22 17:19:57 -08:00
Nanley Chery
d4de918ad0 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.
2016-01-22 17:10:14 -08:00
Chad Versace
6a03c69adb anv/state: Dedupe code for lowering surface format
Add helper anv_surface_format().
2016-01-22 16:49:17 -08:00
Francisco Jerez
11d5c1905c anv/meta: Set sampler type and instruction arrayness consistently in blit shader. 2016-01-22 16:43:18 -08:00
Francisco Jerez
bf151b8892 anv/meta: Fix meta blit fragment shader for 1D arrays. 2016-01-22 16:43:15 -08:00
Jason Ekstrand
53b83899e0 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.
2016-01-22 16:34:13 -08:00