Commit Graph

78866 Commits

Author SHA1 Message Date
Kristian Høgsberg Kristensen 3baf8af947 anv: Remove excess whitespace 2016-03-05 13:50:07 -08:00
Kristian Høgsberg Kristensen ab36eae5e7 anv: Remove left-over bits of sparse-descriptor code 2016-03-05 13:50:07 -08:00
Jason Ekstrand 1afdfc3e6e anv/pipeline: Implement the depth compare EQUAL workaround on gen8+ 2016-03-05 09:59:28 -08:00
Jason Ekstrand 7c1660aa14 anv: Don't allow D16_UNORM to be combined with stencil
Among other things, this can cause the depth or stencil test to spurriously
fail when the fragment shader uses discard.
2016-03-05 09:59:28 -08:00
Jason Ekstrand 9a90176d48 anv/pipeline: Calculate the correct max_source_attr for 3DSTATE_SBE 2016-03-05 09:59:28 -08:00
Jordan Justen 81f30e2f50 anv/hsw: Move query code to genX file for Haswell
This fixes many CTS cases, but will require an update to the kernel
command parser register whitelist. (The CS GPRs and TIMESTAMP
registers need to be whitelisted.)

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
2016-03-05 01:08:07 -08:00
Nanley Chery 4e75f9b219 anv: Implement VK_REMAINING_{MIP_LEVELS,ARRAY_LAYERS}
v2: Subtract the baseMipLevel and baseArrayLayer (Jason)

Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
2016-03-04 21:25:23 -08:00
Jason Ekstrand c1436e80ef anv/meta_clear: Set the right number of dynamic states 2016-03-04 19:18:20 -08:00
Jason Ekstrand cc57efc67a anv/pipeline: Fix depthBiasEnable on gen7
The first time I tried to fix this, I set the wrong fields.
2016-03-04 17:56:12 -08:00
Jason Ekstrand 653261285e anv/cmd_buffer: Reset the state streams when resetting the command buffer 2016-03-04 17:54:29 -08:00
Jason Ekstrand f700d16a89 anv/cmd_buffer: Include Haswell in set_subpass 2016-03-04 17:54:29 -08:00
Nanley Chery a6fb62a864 isl: Fix RenderTargetViewExtent for mipmapped 3D surfaces
Match the comment stated above the assignment.

Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
2016-03-04 13:20:44 -08:00
Nanley Chery b80c8ebc45 isl: Get rid of isl_surf_fill_state_info::level0_extent_px
This field is no longer needed.

Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
2016-03-04 13:20:03 -08:00
Jason Ekstrand d154a5ebd6 anv/cmd_buffer: Let the pipeline set StencilBufferWriteEnable on gen9 2016-03-04 12:23:01 -08:00
Jason Ekstrand f374765ce6 anv/cmd_buffer: Mask stencil reference values 2016-03-04 12:22:32 -08:00
Jason Ekstrand d61dcec64d anv/clear: Pull the stencil write mask from the pipeline
The stencil write mask wasn't getting set at all so we were using whatever
write mask happend to be left over by the application.
2016-03-04 12:03:00 -08:00
Jason Ekstrand ec18fef88d anv/pipeline: Set StencilBufferWriteEnable from the pipeline
The hardware docs say that StencilBufferWriteEnable should only be set if
StencilTestEnable is set.  It seems reasonable to set them together.
2016-03-04 12:03:00 -08:00
Jason Ekstrand fcd8e57185 anv/pipeline: More competent gen8 clipping 2016-03-04 12:03:00 -08:00
Jason Ekstrand a8afd29653 anv/pipeline: Use the right provoking vertex for triangle fans 2016-03-04 12:03:00 -08:00
Jason Ekstrand fa8539dd6b anv/pipeline: Respect pRasterizationState->depthBiasEnable 2016-03-04 12:03:00 -08:00
Kenneth Graunke 9d7faadd8a anv: Fix backwards shadow comparisons
sample_c is backwards from what GL and Vulkan expect.

See intel_state.c in i965.

v2: Drop unused vk_to_gen_compare_op.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2016-03-04 11:35:46 -08:00
Kenneth Graunke 3ed260f54c hack to make dota 2 menus work 2016-03-03 16:21:09 -08:00
Jason Ekstrand 56ba13c994 isl/surface_state: Set L2 bypass disable for certain BC* formats 2016-03-03 16:16:57 -08:00
Kenneth Graunke 623ce595a9 anv: Compile shader stages in pipeline order.
Instead of the arbitrary order modules might be specified in.

Acked-by: Jason Ekstrand <jason.ekstrand@intel.com>
2016-03-03 11:36:19 -08:00
Nanley Chery 8dddc3fb1e anv/meta: Delete unused functions
Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
2016-03-03 11:26:44 -08:00
Nanley Chery d20f6abc85 anv/meta: Use blitter API for state-handling in Buffer Update/Copy
Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
2016-03-03 11:26:42 -08:00
Nanley Chery 318b67d157 anv/meta: Use blitter API in do_buffer_copy()
v2: Keep pitch in units of bytes (Jason)

Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
2016-03-03 11:26:36 -08:00
Nanley Chery 96ff4d0679 anv/meta: Use blitter API in anv_CmdCopyImage()
Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
2016-03-03 11:26:35 -08:00
Nanley Chery 9b6c95d46e anv/meta: Use blitter API for copies between Images and Buffers
Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
2016-03-03 11:25:20 -08:00
Nanley Chery 91640c34c6 anv/meta: Add function which copies between Buffers and Images
v2: Keep pitch in units of bytes (Jason)

Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
2016-03-03 11:25:15 -08:00
Nanley Chery 61ad78d0d1 anv/meta: Add function to create anv_meta_blit2d_surf from anv_image
v2: Keep pitch in units of bytes (Jason)

Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
2016-03-03 11:25:10 -08:00
Nanley Chery 2e9b08b9b8 anv/meta: Implement the blitter API functions
Most of the code in anv_meta_blit2d() is borrowed from do_buffer_copy().

Create an image and image view for each rectangle.
Note: For tiled RGB images, ISL will align the image's row_pitch up to
the nearest tile width.

v2 (Jason):
    Keep pitch in units of bytes
    Make src_format and dst_format variables
    s/dest/dst/ in every usage
v3: Fix dst_image width

Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
2016-03-03 11:25:04 -08:00
Nanley Chery 032bf172b4 anv/meta: Modify blitter API fields
Some fields are unnecessary. The variables "pitch" and "bs" are used
for consistency with ISL.

v2: Keep pitch in units of bytes (Jason)

Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
2016-03-03 11:24:53 -08:00
Jason Ekstrand 654f79a045 anv/meta: Add the beginnings of a blitter API
This API is designed to be an abstraction that sits between the VkCmdCopy
commands and the hardware.  The idea is that it is simple enough that it
*should* be implementable using the blitter but with enough extra data that
we can implement it with the 3-D pipeline efficiently.  One design
objective is to allow the user to supply enough information that we can
handle most blit operations with a single draw call even if they require
copying multiple rectangles.
2016-03-03 11:24:45 -08:00
Nanley Chery d1e48b9945 anv/meta: Remove redundancies in do_buffer_copy()
Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
2016-03-03 11:24:42 -08:00
Nanley Chery cfe7036750 anv/meta: Replace copy_format w/ block size in do_buffer_copy()
This is a preparatory commit that will simplify the future usage of
this function.

Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
2016-03-03 11:24:38 -08:00
Nanley Chery d50ff250ec anv/meta: Add missing command to exit meta in anv_CmdUpdateBuffer()
Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
2016-03-03 11:24:21 -08:00
Nanley Chery 1d9d90d9a6 anv/image: Create a linear image when requested
If a linear image is requested, the only possible result should be a
linearly-tiled surface.

Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
2016-03-03 11:24:17 -08:00
Nanley Chery 091f1da902 isl: Don't filter tiling flags if a specific tiling bit is set
If a specific bit is set, the intention to create a surface with a
specific tiling format should be respected.

Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
2016-03-03 11:23:40 -08:00
Nanley Chery 456f5b0314 isl: Add function to get intratile offsets from x/y offsets
Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
2016-03-03 10:56:15 -08:00
Jason Ekstrand 206414f92e anv/util: Fix vector resizing
It wasn't properly handling the fact that wrap-around in the source may not
translate to wrap-around in the destination.  This really needs unit tests.
2016-03-03 08:17:36 -08:00
Jordan Justen 98cdce1ce4 anv/gen7: Use predicated rendering for indirect compute
For OpenGL, see commit 9a939ebb47.

Fixes:
 * dEQP-VK.compute.indirect_dispatch.upload_buffer.empty_command
 * dEQP-VK.compute.indirect_dispatch.gen_in_compute.empty_command

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
2016-03-02 12:03:05 -08:00
Jordan Justen da4745104c anv: Save batch to local variable for indirect compute
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
2016-03-02 12:03:05 -08:00
Jason Ekstrand b0867ca4b2 anv: Fix make check 2016-03-02 11:45:29 -08:00
Jason Ekstrand 2168082a48 isl: Fix make check 2016-03-02 11:31:22 -08:00
Jason Ekstrand 8f5a64e44f gen8/cmd_buffer: Properly return flushed push constant stages
This is required on SKL so that we can properly re-emit binding table
pointers commands.
2016-03-02 10:48:40 -08:00
Jason Ekstrand 5b70aa11ee anv/meta_blit: Use unorm formats for 8 and 16-bit RGB and RGBA values
While Broadwell is very good about UINT formats, HSW is more restrictive.
Neither R8G8B8_UINT nor R16G16B16_UINT really exist on HSW.  It should be
safe to just use the unorm formats.
2016-03-01 21:45:20 -08:00
Kenneth Graunke 89e421369c Merge remote-tracking branch 'origin/master' into vulkan 2016-03-01 17:11:29 -08:00
Jason Ekstrand e941fd8470 genxml: Make the border color pointer consistent across gens 2016-03-01 14:43:05 -08:00
Jason Ekstrand eecd1f8001 gen7/pipeline: Add competent blending
This is mostly a copy-and-paste from gen8.  Blending still isn't 100% but
it fixes about 1100 CTS blend tests on HSW.
2016-03-01 13:51:58 -08:00