summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan
Commit message (Collapse)AuthorAgeFilesLines
* anv: use do { } while (0) in the anv_finishme macroEmil Velikov2016-11-281-7/+8
| | | | | | | | Use the generic construct instead of the currect GCC specific one. Suggested-by: Kenneth Graunke <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* anv/pipeline: Make is_dual_src_blend_factor inlineJason Ekstrand2016-11-261-1/+1
| | | | | | It's not used on gen8+ so it causes unused function warnings. Reviewed-by: Ilia Mirkin <[email protected]>
* anv/pipeline: Make the temp blend attachment state pointer constJason Ekstrand2016-11-261-1/+3
| | | | | | This fixes a "discards const" warning since blend is const. Reviewed-by: Ilia Mirkin <[email protected]>
* anv/device: Remove a bogus finishme commentJason Ekstrand2016-11-251-1/+0
| | | | We've been properly detecting bit6 swizzling for a long time now.
* anv/state: if enabled, use anisotropic filtering also with VK_FILTER_NEARESTIago Toral Quiroga2016-11-251-1/+1
| | | | | | | | Fixes multiple Vulkan CTS tests that combine anisotropy and VK_FILTER_NEAREST in dEQP-VK.texture.filtering_anisotropy.* Reviewed-by: Lionel Landwerlin <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv/gen7: only enable dual-source blending when there are dual-source factorsIlia Mirkin2016-11-231-3/+33
| | | | | | | | Apparently the hw wedges otherwise, as mentioned in i965 comments. Reported-by: Emmanuel Gil Peyrot <[email protected]> Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv: fix enumeration of propertiesEmil Velikov2016-11-231-6/+8
| | | | | | | | | | | | | | | | | | | Driver should enumerate only up-to min2(num_available, num_requested) properties and return VK_INCOMPLETE if the # of requested props is smaller than the ones available. Presently we assert out in such cases. Inspired by a similar fix for RADV. v2: Use MIN2 + typed_memcpy (Jason). Should fix: dEQP-VK.api.info.device.extensions Cc: "13.0" <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> (v1) Reviewed-by: Jason Ekstrand <[email protected]>
* anv: fix segfault in anv_BindImageMemoryDave Airlie2016-11-231-1/+1
| | | | | | | | | | | | Since bind image memory started memsetting surfaces, the device node can't be NULL, since we lookup device->info.has_llc. Not sure why it ever was NULL before. Fixes some things on my Ivybridge. Reviewed-by: Jason Ekstrand <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* anv: Enable fast clears on gen7-8Jason Ekstrand2016-11-222-13/+36
| | | | Reviewed-by: Jordan Justen <[email protected]>
* anv: Add support for fast clears on gen9Jason Ekstrand2016-11-223-29/+176
| | | | Reviewed-by: Jordan Justen <[email protected]>
* anv/blorp: Rework flushing around resolvesJason Ekstrand2016-11-221-14/+18
| | | | | | | | It turns out that the flushing required around resolves is a bit more extensive than I first thought. You actually need render cache flush and a CS stall both before *and* after the resolve. Reviewed-by: Jordan Justen <[email protected]>
* anv/cmd_buffer: Apply remaining flushes in EndCommandBufferJason Ekstrand2016-11-221-0/+2
| | | | | | | | Otherwise, some pipe flushes may just never happen. This is unlikely to cause problems depending on how the kernel schedules batches, but we shouldn't count on it. Reviewed-by: Jordan Justen <[email protected]>
* anv/blorp: Use regular blorp clears for subpass clearsJason Ekstrand2016-11-221-10/+19
| | | | | | | | At vkCmdNextSubpass time, we have the actual framebuffer so we can use regular blorp_clear for subpass clears. For fast clears, there is no attachment version, so this will make fast clears a bit easier. Reviewed-by: Jordan Justen <[email protected]>
* anv: Add a vk_to_isl_color helperJason Ekstrand2016-11-222-7/+16
| | | | Reviewed-by: Jordan Justen <[email protected]>
* anv/cmd_buffer: Make setup_attachments take a RenderPassBeginInfoJason Ekstrand2016-11-221-7/+6
| | | | Reviewed-by: Jordan Justen <[email protected]>
* anv: Set up binding tables and surface states for input attachmentsJason Ekstrand2016-11-225-6/+85
| | | | | | | | | | | | | This commit adds the last remaining bits to support input attachments in the Intel Vulkan driver. For color and depth attachments, we allocate an input attachment surface state during vkCmdBeginRenderPass like we do for the render target surface states. This is so that we can incorporate the clear color and aux information as used in rendering. For stencil, we just treat it like a regular texture because we don't there is no aux. Also, only having to worry about at most one input attachment surface for each attachment makes some of the vkCmdBeginRenderPass code simpler. Reviewed-by: Jordan Justen <[email protected]>
* anv/pipeline: Handle depth/stencil self-dependenciesJason Ekstrand2016-11-223-6/+31
| | | | Reviewed-by: Jordan Justen <[email protected]>
* anv: Use pass attachment information to insert flushesJason Ekstrand2016-11-221-0/+88
| | | | | | | | | | | | Input and resolve attachments can cause an implicit dependency in the pipeline. It's our job to insert the needed flushes. Fortunately, we can easily reuse the usage tracking that we use for CCS resolves. This fixes 159 Vulkan CTS tests on Haswell because we're now flushing in between drawing and MSAA resolves. I have no idea how they were passing before on newer hardware. Reviewed-by: Jordan Justen <[email protected]>
* anv/cmd_buffer: Fix pipeline barriers for input attachmentsJason Ekstrand2016-11-221-1/+1
| | | | | | | | We were using VK_IMAGE_ACCESS_COLOR_ATTACHMENT_READ_BIT to detect an input attachment read. We should use VK_IMAGE_ACCESS_INPUT_ATTACHMENT_READ_BIT instead. Reviewed-by: Jordan Justen <[email protected]>
* anv/pipeline: Add a input_attachment_index to the bindingsJason Ekstrand2016-11-222-0/+30
| | | | | | | This allows us to go from the binding to either the descriptor or the input attachment at will. Reviewed-by: Jordan Justen <[email protected]>
* anv/pass: Calculate the combined image usage of attachmentsJason Ekstrand2016-11-222-1/+12
| | | | Reviewed-by: Jordan Justen <[email protected]>
* anv: Add an input attachment lowering passJason Ekstrand2016-11-224-0/+147
| | | | Reviewed-by: Jordan Justen <[email protected]>
* anv/cmd_buffer: Emit CS push constants after binding tablesJason Ekstrand2016-11-221-8/+8
| | | | | Emitting binding tables can cause push constants to be dirtied if the shader uses images so we need to handle push constants later.
* anv/cmd_buffer: Add an assert on emit_binding_table failureJason Ekstrand2016-11-221-0/+1
| | | | | | | The != VK_SUCCESS case is really only capable of handling the one error. This assert makes things a bit safer if something else goes wrong. Suggested-by: Lionel Landwerlin <[email protected]>
* anv/cmd_buffer: Emit a CS stall before setting a CS pipelineJason Ekstrand2016-11-221-1/+13
| | | | | | Reviewed-by: Lionel Landwerlin <[email protected]> Reviewed-by: Jordan Justen <[email protected]> Cc: "13.0" <[email protected]>
* anv/cmd_buffer: Re-emit MEDIA_CURBE_LOAD when CS push constants are dirtyJason Ekstrand2016-11-221-10/+13
| | | | | | | | | | This can happen even if the binding table isn't changed. For instance, you could have dynamic offsets with your descriptor set. This fixes the new stress.lots-of-surface-state.cs.dynamic cricible test. Reviewed-by: Lionel Landwerlin <[email protected]> Reviewed-by: Jordan Justen <[email protected]> Cc: "13.0" <[email protected]>
* anv/cmd_buffer: Handle running out of binding tables in compute shadersJason Ekstrand2016-11-221-5/+15
| | | | | | | | | | | If we try to allocate a binding table and fail, we have to get a new binding table block, re-emit STATE_BASE_ADDRESS, and then try again. We already handle this correctly for 3D and blorp but it never got handled for CS. This fixes the new stress.lots-of-surface-state.cs.static crucible test. Reviewed-by: Lionel Landwerlin <[email protected]> Reviewed-by: Jordan Justen <[email protected]> Cc: "13.0" <[email protected]>
* anv: Fix unintentional integer overflow in anv_CreateDmaBufImageINTELGwan-gyeong Mun2016-11-221-1/+1
| | | | | | | | | | | | | | | Since both pCreateInfo->strideInBytes and pCreateInfo->extent.height are of uint32_t type 32-bit arithmetic will be used. Fix unintentional integer overflow by casting to uint64_t before multifying. CID 1394321 Cc: "13.0" <[email protected]> Signed-off-by: Mun Gwan-gyeong <[email protected]> [Emil Velikov: cast only of the arguments] Reviewed-by: Emil Velikov <[email protected]>
* anv: Enable clip and cull distance support.Kenneth Graunke2016-11-222-6/+5
| | | | | | | Everything is now in place, and we appear to pass the tests on Gen7+. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv: Set clip/cull distances fields in packets.Kenneth Graunke2016-11-221-6/+26
| | | | | Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv: Combine ClipDistance and CullDistance arrays.Kenneth Graunke2016-11-221-0/+3
| | | | | Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv/state: enable coordinate address rounding for Min/Mag filtersIago Toral Quiroga2016-11-211-6/+11
| | | | | | | | | | | | | | This patch improves pass rate of dEQP-VK.texture.explicit_lod.2d.sizes.* from 68.0% (98/144) to 83.3% (120/144) by enabling sampler address rounding mode when the selected filter is not nearest, which is the same thing we do for OpenGL. These tests check texture filtering for various texture sizes and mipmap levels. The failures (without this patch) affect cases where the target texture has odd dimensions (like 57x35) and either the Min or the Mag filter is not nearest. Reviewed-by: Jason Ekstrand <[email protected]>
* anv: Implement a depth stall restriction on gen7Jason Ekstrand2016-11-203-0/+35
| | | | | | | Fixes around 60 Vulkan CTS tests on Haswell Reviewed-by: Jordan Justen <[email protected]> Cc: "13.0" <[email protected]>
* intel: Share URB configuration code between GL and Vulkan.Kenneth Graunke2016-11-194-156/+44
| | | | | | | | | This code is far too complicated to cut and paste. v2: Update the newly added genX_gpu_memcpy.c; const a few things. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* intel: Convert devinfo->urb.min_*_entries into an array.Kenneth Graunke2016-11-191-3/+3
| | | | | Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* intel: Convert devinfo->urb.max_*_entries into an array.Kenneth Graunke2016-11-191-4/+8
| | | | | Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* anv/cmd_buffer: Enable stencil-only HZ clearsNanley Chery2016-11-181-13/+33
| | | | | | | | The HZ sequence modifies less state than the blorp path and requires less CPU time to generate the necessary packets. Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv/cmd_buffer: Manage Anv state around HZ op emissionNanley Chery2016-11-181-7/+9
| | | | | | | Move the assignment to a less surprising location. Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv/cmd_buffer: Clarify HZ rectangle behaviorNanley Chery2016-11-181-1/+2
| | | | | | | | This behavior differs from what's described in the PRMs and was observed by analyzing CTS test results. Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv/TODO: Check off render buffer compressionJason Ekstrand2016-11-171-1/+0
| | | | | There's still a tiny bit of work to do for storage images but it's otherwise pretty much done at this point.
* anv: Enable "permanent" compression for immutable format imagesJason Ekstrand2016-11-172-1/+26
| | | | | | | | | | | This commit extends our support of color compression to surfaces without the VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT set. These images will never have an image view created with a different format then the one set at image creation time so it's safe to always use compression. We still bail if the image is used as a storage image because that sometimes ends up using a different format. Reviewed-by: Topi Pohjolainen <[email protected]>
* anv/image: Add an aux_usage field for "default" auxJason Ekstrand2016-11-174-19/+45
| | | | | | | Initially, the field is set to ISL_AUX_USAGE_NONE so this commit shouldn't bring any functional changes. Setting this field to something else will cause all sampled and storage image views to be created with AUX and blorp will start trying to respect it so set with care.
* anv: Add initial support for Sky Lake color compressionJason Ekstrand2016-11-174-34/+169
| | | | | | | This commit adds basic support for color compression. For the moment, color compression is only enabled within a render pass and a full resolve is done before the render pass finishes. All texturing operations still happen with CCS disabled.
* anv/pass: Precompute some subpass usage informationJason Ekstrand2016-11-172-7/+43
|
* anv/image: Memset all aux surfaces (not just HiZ) to 0Jason Ekstrand2016-11-171-4/+6
| | | | Reviewed-by: Topi Pohjolainen <[email protected]>
* anv/image: Rename hiz_surface to aux_surfaceJason Ekstrand2016-11-173-17/+18
|
* anv/blorp: Ignore clears for attachments first used as resolve destinationsJason Ekstrand2016-11-171-9/+11
| | | | | | | | Otherwise, we'll try to clear it the first time it's used as a draw so if you do some multisampled rendering, resolve to an attachment, and then draw on top of the single-sampled attachment, we might accidentally clear it. Cc: "13.0" <[email protected]>
* anv/cmd_buffer: Refactor surface state relocation handlingJason Ekstrand2016-11-171-13/+22
| | | | Reviewed-by: Topi Pohjolainen <[email protected]>
* anv/cmd_buffer: Pull add_surface_state_reloc into genX_cmd_buffer.cJason Ekstrand2016-11-172-16/+14
| | | | Reviewed-by: Topi Pohjolainen <[email protected]>
* anv/image: Stop force-disabling AUXJason Ekstrand2016-11-171-4/+0
| | | | | | | Auxiliary surfaces have to be created manually anyway so force-disabling it does nothing whatsoever at the moment. Reviewed-by: Topi Pohjolainen <[email protected]>