summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan
Commit message (Collapse)AuthorAgeFilesLines
* anv/cmd_buffer: Ensure fast-clear values are currentNanley Chery2017-07-221-0/+114
| | | | | | | v2: Rewrite functions, change location of synchronization. Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv/gpu_memcpy: Add a lighter-weight GPU memcpy functionNanley Chery2017-07-222-0/+45
| | | | | | | | | | | | | | | | We'll be performing a GPU memcpy in more places to copy small amounts of data. Add an alternate function that thrashes less state. v2: - Make a new function (Jason Ekstrand). - Move the #define into the function. v3: - Update the function name (Jason). - Update comments. v4: Use an indirect drawing register as TEMP_REG (Jason Ekstrand). Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv/cmd_buffer: Restrict fast clears in the GENERAL layoutNanley Chery2017-07-223-0/+40
| | | | | | | | | v2: Remove ::first_subpass_layout assertion (Jason Ekstrand). v3: Allow some fast clears in the GENERAL layout. v4: Remove extra '||' and adjust line break (Jason Ekstrand). Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv/cmd_buffer: Don't partially fast clear image layersNanley Chery2017-07-221-8/+23
| | | | | | | | v2: Don't pass in the command buffer (Jason Ekstrand). v3: Remove an incorrect assertion and an if condition for gen7. Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv/cmd_buffer: Initialize the clear values bufferNanley Chery2017-07-221-1/+78
| | | | | | | | | | v2: Rewrite functions. v3 (Jason Ekstrand): - Don't set ResourceMinLOD. - Fix clamp of level_count. Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv/image: Append CCS/MCS with a fast-clear state bufferNanley Chery2017-07-222-0/+90
| | | | | | | v2: Update comments, function signatures, and add assertions. Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv/image: Disable CCS if the image doesn't support renderingNanley Chery2017-07-221-0/+15
| | | | | Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv: Transition MCS buffers from the undefined layoutNanley Chery2017-07-223-18/+35
| | | | | | | | v2: Define MCS buffers with any sample count (Jason) Cc: <[email protected]> Suggested-by: Jason Ekstrand <[email protected]> Signed-off-by: Nanley Chery <[email protected]>
* anv/blorp: Assert isl_surf_init success in do_buffer_copyJason Ekstrand2017-07-221-13/+15
| | | | Reviewed-by: Topi Pohjolainen <[email protected]>
* anv/blorp: Explicitly set row_pitch in do_buffer_copyJason Ekstrand2017-07-221-1/+1
| | | | | | | | We have a very specific row pitch that we want and we don't want ISL to be changing it on us so just be explicit about it. Fixes: a40f0430347c07bf2d5794642fe02f5dd248a473 Reviewed-by: Topi Pohjolainen <[email protected]>
* anv/image: Fix VK_IMAGE_CREATE_CUBE_COMPATIBLE_BITChad Versace2017-07-191-3/+4
| | | | | | | | | | | We incorrectly detected VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT. We looked for the bit in VkImageCreateInfo::usage, but it's actually in VkImageCreateInfo::flags. Found by assertion failures while enabling VK_ANDROID_native_buffer. Cc: [email protected] Reviewed-by: Lionel Landwerlin <[email protected]>
* anv: Advertise support for VK_KHR_variable_pointersJason Ekstrand2017-07-183-0/+13
| | | | | | | | We don't support the general version yet because that requires us to lower shared variables up-front in SPIR-V -> NIR. This shouldn't be a whole lot of work but it's not something we support today. Reviewed-by: Iago Toral Quiroga <[email protected]>
* anv: Advertise support for VK_KHR_storage_buffer_storage_classJason Ekstrand2017-07-182-0/+5
| | | | Reviewed-by: Iago Toral Quiroga <[email protected]>
* intel/isl: Add a row_pitch parameter to surf_get_ccs_surfJason Ekstrand2017-07-171-1/+1
| | | | | Reviewed-by: Topi Pohjolainen <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* anv/image: Add INPUT_ATTACHMENT to the list of required usagesJason Ekstrand2017-07-171-0/+1
| | | | | | | | | | | | | | | From the Vulkan 1.0.53 spec VU for vkCreateImageView: "image must have been created with a usage value containing at least one of VK_IMAGE_USAGE_SAMPLED_BIT, VK_IMAGE_USAGE_STORAGE_BIT, VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, or VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT" We were missing VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT from out list. Reviewed-by: Lionel Landwerlin <[email protected]> Cc: [email protected]
* anv: Stop leaking the no_aux sampler surface stateJason Ekstrand2017-07-171-0/+5
| | | | | Reviewed-by: Lionel Landwerlin <[email protected]> Cc: [email protected]
* anv/cmd_buffer: Properly handle render passes with 0 attachmentsJason Ekstrand2017-07-171-12/+11
| | | | | | | | We were early returning and never created the NULL surface state. Reviewed-by: Lionel Landwerlin <[email protected]> Tested-by: James Legg <[email protected]> Cc: [email protected]
* anv: advertise v6 of the wayland surface extensionEmil Velikov2017-07-171-1/+1
| | | | | | | | | | | Jason updated the Khronos spec to explicitly state that Wayland surfaces must support VK_PRESENT_MODE_MAILBOX_KHR. ANV did so since day one (back in 2015) Cc: [email protected] Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv: ensure device name contains terminating characterLionel Landwerlin2017-07-171-2/+2
| | | | | | | | | | v2: Use sizeof() (Chris) CID: 1415113 Reported-by: Grazvydas Ignotas <[email protected]> Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* anv: Implement VK_KHR_external_memory_*Jason Ekstrand2017-07-153-5/+163
| | | | | Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* anv: Implement VK_KHR_dedicated_allocationJason Ekstrand2017-07-152-0/+19
| | | | | | | | We always recommend sub-allocation and don't do anything special for dedicated allocations. Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* anv: Implement VK_KHR_get_memory_requirements2Jason Ekstrand2017-07-152-0/+48
| | | | | Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* anv: Advertise version 1.0.54Jason Ekstrand2017-07-153-3/+3
| | | | | Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* vulkan: Update to the new 1.0.54 spec XML and headersJason Ekstrand2017-07-151-3/+3
| | | | | | | | | There is one small ANV change here because we used the VK_ERROR_INVALID_EXTERNAL_HANDLE_KHX enum in the BO cache and that had to be updated to have the _KHR suffix. Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* anv: Drop support for VK_KHX_external_semaphore_*Jason Ekstrand2017-07-153-125/+5
| | | | | | | | These have been formally deprecated by Khronos never to be shipped again. The KHR versions should be implemented/used instead. Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* anv: Drop support for VK_KHX_external_memory_*Jason Ekstrand2017-07-143-161/+5
| | | | | | | | These have been formally deprecated by Khronos never to be shipped again. The KHR versions should be implemented/used instead. Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* anv/pipeline: do not use BITFIELD64_BIT()Juan A. Suarez Romero2017-07-141-1/+1
| | | | | | | | | In the previous commit, forgot to apply v2 suggestions. Fixes: 28d0c38 (anv/pipeline: use unsigned long long constant to check enable vertex inputs) Signed-off-by: Juan A. Suarez Romero <[email protected]>
* anv/pipeline: use unsigned long long constant to check enable vertex inputsJuan A. Suarez Romero2017-07-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | When initializing the ANV pipeline, one of the tasks is checking which vertex inputs are enabled. This is done by checking if the enabled bits in inputs_read. But the mask to use is computed doing `(1 << (VERT_ATTRIB_GENERIC0 + desc->location))`. The problem here is that if location is 15 or greater, the sum is 32 or greater. But C is handling 1 as a 32-bit integer, which means the displaced bit is out of range and thus the full value is 0. Thus, use 1ull, which is an unsigned long long value. This fixes: dEQP-VK.pipeline.vertex_input.max_attributes.16_attributes.binding_one_to_one.interleaved v2: use 1ull instead of BITFIELD64_BIT() (Matt Turner) Reviewed-by: Lionel Landwerlin <[email protected]> Reviewed-by: Matt Turner <[email protected]> Signed-off-by: Juan A. Suarez Romero <[email protected]> Cc: [email protected]
* anv: don't use strcpy for copying stringsLionel Landwerlin2017-07-131-1/+2
| | | | | | CID: 1358935 Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* anv: Round u_vector element sizes to a power of twoJason Ekstrand2017-07-121-2/+3
| | | | | | | | | | | This fixes 32-bit builds of the driver. Commit 08413a81b93dc537fb0c3 changed things so that we now put struct anv_states in the u_vector for binding tables. On 64-bit builds, sizeof(struct anv_state) is a power of two but it isn't on 32-bit builds. Fixes: 08413a81b93dc537fb0c34327ad162f07e8c3427 Reviewed-by: Kenneth Graunke <[email protected]> Cc: [email protected]
* intel: Move clflush helpers from anv to common/gen_clflush.h.Kenneth Graunke2017-07-105-34/+6
| | | | | | | | | I want to use these in the OpenGL driver as well. v2: Add to COMMON_FILES in Makefile.sources (caught by Emil) Reviewed-by: Daniel Vetter <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* anv: Stop setting domains to RENDER on EXEC_OBJECT_WRITEJason Ekstrand2017-07-101-5/+2
| | | | | | | | | | | | The reason we were doing this was to ensure that the kernel did the appropriate cross-ring synchronization and flushing. However, the kernel only looks at EXEC_OBJECT_WRITE to determine whether or not to insert a fence. It only cares about the domain for determining whether or not it needs to clflush the BO before using it for scanout but the domain automatically gets set to RENDER internally by the kernel if EXEC_OBJECT_WRITE is set. Reviewed-by: Chris Wilson <[email protected]>
* anv: check support for enabled features in vkCreateDevice()Samuel Iglesias Gonsálvez2017-07-031-0/+13
| | | | | | | | | | | From Vulkan spec, 4.2.1. "Device Creation": "vkCreateDevice verifies that extensions and features requested in the ppEnabledExtensionNames and pEnabledFeatures members of pCreateInfo, respectively, are supported by the implementation." Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* anv: merge tessellation's primitive mode in merge_tess_info()Samuel Iglesias Gonsálvez2017-07-031-0/+4
| | | | | | | | | | | | SPIR-V tessellation shaders that were created from HLSL will have the primitive generation domain set in tessellation control shader (hull shader in HLSL) instead of the tessellation evaluation shader. v2: - Add assert (Kenneth) Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* anv: fix reported timestampPeriod valueLionel Landwerlin2017-07-021-1/+1
| | | | | | | | | | | We lost some precision on a previous change due to switching to integers. Since we report a float in timestampPeriod, we want the division to happen in floats. CID: 1413021 Fixes: c77d98ef32 ("intel: common: express timestamps units in frequency") Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv: use devinfo for number of thread/euLionel Landwerlin2017-06-291-2/+3
| | | | | | | It turns out Gen9LP has fewer threads per EU (6 vs 7). Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Plamena Manolova <[email protected]>
* intel/anv: Add missing break in anv_CreateDevice()Topi Pohjolainen2017-06-271-0/+1
| | | | | | | CID: 1413018 Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Nanley Chery <[email protected]> Signed-off-by: Topi Pohjolainen <[email protected]>
* anv/gpu_memcpy: Rename the gpu_memcpy functionNanley Chery2017-06-263-11/+11
| | | | | | | | | | | | | | | | | A GPU memcpy function could alternatively be implemented using MI_* commands. Provide more detail into how this one operates in case another memcpy function is created. v2: - Update the commit message. v3: - Use 'memcpy' instead of 'cpy' (Jason Ekstrand) - Shorten 'streamout' to 'so' Suggested-by: Jason Ekstrand <[email protected]> Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]> (v2) Reviewed-by: Jason Ekstrand <[email protected]>
* anv/blorp: Provide surface states for CCS resolvesNanley Chery2017-06-261-19/+10
| | | | | | | | | | | In the future, we plan on using this method to resolve images whose surface state fast-clear value is dynamically updated during command buffer execution. Start using it now for testing and to reduce churn later on. Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv/blorp: Add a surface-state-based CCS resolve functionNanley Chery2017-06-262-0/+44
| | | | | | | | | | | | This will be used in the next patch. v2: - Omit BLORP_BATCH_NO_EMIT_DEPTH_STENCIL (Jason Ekstrand) - Update commit message. Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv: Adjust params of color buffer transitioning functionsNanley Chery2017-06-263-36/+39
| | | | | | | | | | | Splitting out these fields will make the color buffer transitioning function simpler when it gains more features. v2: Remove unintended blank line (Iago Toral) Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv/blorp: Remove 3D subresource transition workaroundNanley Chery2017-06-261-4/+4
| | | | | | | | | | | | | | | | | | | For 3D image subresources undergoing a layout transition via PipelineBarrier, we increase the number of fast-cleared layers to match the intended behaviour of KHR_maintenance1. When such subresources undergo layout transitions between subpasses, we don't do this to avoid failing incorrect CTS tests. Instead, unify the behaviour in both scenarios, and wait for the CTS tests to catch up. See CL 1111 for the test fix and Vulkan issue #849 for more information. On SKL+, this causes 3 test failures under: dEQP-VK.pipeline.render_to_image.3d.* v2: Add a reference to the Vulkan issue (Iago Toral). Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]> (v1) Reviewed-by: Jason Ekstrand <[email protected]>
* anv/cmd_buffer: Adjust the image view reloc functionNanley Chery2017-06-261-20/+25
| | | | | | | | | | | | | Make the function take in an image instead of an image view. This enables us to record relocations for surfaces states created outside of the anv_CreateImageView path. v2 (Jason Ekstrand): - Use image->offset instead of surf_offset in aux_offset calculation. Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv/cmd_buffer: Adjust layout transition aspect checkingNanley Chery2017-06-261-5/+3
| | | | | | | | | Reflect the fact that an image view or subresource range with the color aspect cannot have any other aspect. Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv: Add and use color auxiliary buffer helpersNanley Chery2017-06-262-0/+32
| | | | | | | | | | | | | | v2: - Check for aux levels in layer helper (Jason Ekstrand) - Don't assert aux is present, return 0 if it isn't. - Use the helpers. v3: - Make the helpers aspect-agnostic (Jason Ekstrand) - Drop anv_image_has_color_aux() Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]> (v2) Reviewed-by: Jason Ekstrand <[email protected]>
* anv: use Mesa's u_atomic.h headerEric Engestrom2017-06-261-2/+3
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* anv/cnl: Don't write to Cache Mode Register 1 on gen10+Anuj Phogat2017-06-231-3/+1
| | | | | | | | | For PartialResolveDisableInVC field recommendation is to always set this to 0 and that's the default value of the bit. So, we have nothing left to write to CACHE_MODE_1. Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* anv: Fix -Wswitch in anv_layout_to_aux_usage()Chad Versace2017-06-221-0/+3
| | | | | | | | anv_layout_to_aux_usage() lacked a case for VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR. Add an unreachable case, because we don't support the extension. Acked-by: Jason Ekstrand <[email protected]>
* anv/cnl: Generate and use gen10 functionsAnuj Phogat2017-06-224-1/+13
| | | | | Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv/cnl: Don't set FloatBlendOptimizationEnable{Mask}Anuj Phogat2017-06-221-3/+6
| | | | | | | This field is remove from CACHE_MODE_1 register in gen10. Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>