summaryrefslogtreecommitdiffstats
path: root/src/intel
Commit message (Collapse)AuthorAgeFilesLines
* intel: add new common header gen_defines.hTapani Pälli2018-02-282-0/+55
| | | | | | Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Chris Wilson <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* anv: set maxResourceSize to the respective value for each generationSamuel Iglesias Gonsálvez2018-02-281-1/+14
| | | | | | | | v2: - Add the proper values to gen9+ (Jason) Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* nir: add lower_ldexp to nir compiler optionsTimothy Arceri2018-02-281-0/+1
| | | | Reviewed-by: Marek Olšák <[email protected]>
* intel/ir: Fix invalid type aliasing with undefined behavior in test_eu_compact.Francisco Jerez2018-02-271-3/+3
| | | | | | | | | | | | | | | | | test_fuzz_compact_instruction() was attempting to modify the uint64_t data array of a brw_inst through a pointer to uint32_t, which has undefined behavior. This was causing the test_eu_compact unit test to fail mysteriously for me on GCC 7 with some additional harmless-looking changes I had applied to my tree, which happened to affect the order instructions are emitted by GCC causing the bit twiddling to be done after the clear_pad_bits() call which is supposed to overwrite the same data through a pointer of different type, leading to data corruption. A similar failure has been reported by Vinson Lee on the master branch built with GCC 8. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105052 Tested-by: Vinson Lee <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* intel/tools: Use gen_device_name_to_pci_device_id in aubinatorJordan Justen2018-02-271-24/+6
| | | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Scott D Phillips <[email protected]>
* intel/common: Add gen_device_name_to_pci_device_idJordan Justen2018-02-272-6/+14
| | | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Scott D Phillips <[email protected]>
* intel/vulkan: Support INTEL_DEVID_OVERRIDE environment variableJordan Justen2018-02-271-4/+10
| | | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Scott D Phillips <[email protected]>
* intel/common: Add gen_get_pci_device_id_overrideJordan Justen2018-02-272-0/+52
| | | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Scott D Phillips <[email protected]>
* intel/vulkan: Support INTEL_NO_HW environment variableJordan Justen2018-02-273-1/+6
| | | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Scott D Phillips <[email protected]>
* android: fix source files path for libmesa_anv_gen11Harish Krupo2018-02-271-1/+1
| | | | | Signed-off-by: Harish Krupo <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* intel: aubinator_error_decode: fix segfault on missing registerLionel Landwerlin2018-02-261-1/+2
| | | | | | | | Some register might be missing in our genxmls. Don't try to decode them. Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* android: anv: add dependency on libnativewindow for O and laterMauro Rossi2018-02-261-8/+14
| | | | | | | | | | | | | | | | | | | | | | | | Similar to 90dd6e5 ("Android: egl: add dependency on libnativewindow") Fixes the following building errors: In file included from external/mesa/src/intel/vulkan/gen7_cmd_buffer.c:30: In file included from external/mesa/src/intel/vulkan/anv_private.h:72: external/mesa/include/vulkan/vk_android_native_buffer.h:22:10: fatal error: 'system/window.h' file not found ^~~~~~~~~~~~~~~~~ 1 error generated. ... In file included from external/mesa/src/intel/vulkan/anv_gem.c:32: In file included from external/mesa/src/intel/vulkan/anv_private.h:72: external/mesa/include/vulkan/vk_android_native_buffer.h:22:10: fatal error: 'system/window.h' file not found ^~~~~~~~~~~~~~~~~ 1 error generated. Cc: "18.0" <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* android: anv/extensions: fix generated sources buildMauro Rossi2018-02-261-3/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | Building rules are aligned to automake ones The correct script to build anv_extensions.{c,h} is anv_extensions_gen.py Generation rules for anv_extensions.c requires --out-c option Generation rules for anv_extensions.h were missing Necessary include paths are added to avoid following build errors: cp: cannot stat '.../gen/STATIC_LIBRARIES/libmesa_vulkan_common_intermediates/vulkan/anv_extensions.c': No such file or directory In file included from external/mesa/src/intel/vulkan/anv_gem.c:32: external/mesa/src/intel/vulkan/anv_private.h:75:10: fatal error: 'anv_extensions.h' file not found ^~~~~~~~~~~~~~~~~~ 1 error generated. In file included from external/mesa/src/intel/vulkan/anv_batch_chain.c:30: external/mesa/src/intel/vulkan/anv_private.h:75:10: fatal error: 'anv_extensions.h' file not found ^~~~~~~~~~~~~~~~~~ 1 error generated. Fixes: dd088d4bec7 ("anv/extensions: Generate a header file with extension tables") Cc: "18.0" <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* anv/blorp: multisample resolve all attachment layersIago Toral Quiroga2018-02-221-11/+20
| | | | | | | | | | | | | | | | | | | | | | | | | We were only resolving the first. v2: - Do not require that the number of layers on dst and src are an exact match, it is okay if the dst has more layers so long as it has at least the same that we are going to resolve. - Do not always resolve array_len layers, we should resolve only from base_array_layer to array_len. v3: - v2 was assuming that array_len represented the total number of layers in the image, but it represents the number of layers starting at the base array ayer. v4: - The number of layers to resolve should be taken from the framebuffer (Nanley). Fixes new CTS tests for multisampled layered rendering: dEQP-VK.renderpass.multisample_resolve.layers_* Reviewed-by: Nanley Chery <[email protected]>
* intel/isl: Improve the documentation on get_default_aux_stateJason Ekstrand2018-02-211-4/+20
| | | | Reviewed-by: Chad Versace <[email protected]>
* anv/image: Add support for modifiers for WSIJason Ekstrand2018-02-214-4/+104
| | | | | | This adds support for the modifiers portion of the WSI "extension". Reviewed-by: Daniel Stone <[email protected]>
* anv/image: Separate modifiers from legacy scanoutJason Ekstrand2018-02-213-38/+21
| | | | | | | | | | | | | | | | | | | For a bit there, we had a bug in i965 where it ignored the tiling of the modifier and used the one from the BO instead. At one point, we though this was best fixed by setting a tiling from Vulkan. However, we've decided that i965 was just doing the wrong thing and have fixed it as of 50485723523d2948a44570ba110f02f726f86a54. The old assumptions also affected the solution we used for legacy scanout in Vulkan. Instead of treating it specially, we just treated it like a modifier like we do in GL. This commit goes back to making it it's own thing so that it's clear in the driver when we're using modifiers and when we're using legacy paths. v2 (Jason Ekstrand): - Rename legacy_scanout to needs_set_tiling Reviewed-by: Daniel Stone <[email protected]>
* anv: Don't assert that stencil HiZ clears are single-sliceJason Ekstrand2018-02-211-3/+6
| | | | | | | | | It's true for depth HiZ clears because we only have HiZ on single-slice images right now. However, for stencil-only clears there is no such restriction. Tested-by: Rafael Antognolli <[email protected]> Reviewed-by: Nanley Chery <[email protected]>
* anv: Only copy clear dwords if we're rendering to the first sliceJason Ekstrand2018-02-211-1/+4
| | | | Reviewed-by: Rafael Antognolli <[email protected]>
* i965: Fix compiler warning about write being undefined.Eric Anholt2018-02-201-1/+1
| | | | | | | This looks like it should be protected by the assume() about nr_color_regions, but my compiler warns anyway. Reviewed-by: Matt Turner <[email protected]>
* anv/blorp: Use layout_to_aux_usage when a layout is providedJason Ekstrand2018-02-201-25/+46
| | | | | | | | | | Instead of having aux usage and ANV_AUX_USAGE_DEFAULT to mean "give me something reasonable" we now use anv_layout_to_aux_usage whenever a layout is available. If a layout is available, we ignore the aux_usage parameter. For the cases where we have an explicit aux usage such as clears and aux ops, we have a new ANV_IMAGE_LAYOUT_EXPLICIT_AUX layout. Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* anv/cmd_buffer: Delete some assert-only variablesJason Ekstrand2018-02-201-4/+1
| | | | | | Checking the sample count is almost as good as aux usage in this case. Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* anv/cmd_buffer: Use layout_to_* helpers in compute_aux_usageJason Ekstrand2018-02-201-18/+35
| | | | Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* anv/cmd_buffer: Simplify transition_depth_bufferJason Ekstrand2018-02-201-12/+0
| | | | | | | | | If we don't have HiZ, then anv_layout_to_aux_usage will return NONE for both layouts. If the two layouts are the same, they will get the aux usage. In either case, the code below will give us ISL_AUX_OP_NONE and we'll return without doing anything. Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* anv/cmd_buffer: Do subpass image transitions in begin/end_subpassJason Ekstrand2018-02-201-132/+88
| | | | Reviewed-by: Nanley Chery <[email protected]>
* anv/cmd_buffer: Mark depth/stencil surfaces written in begin_subpassJason Ekstrand2018-02-201-21/+29
| | | | Reviewed-by: Nanley Chery <[email protected]>
* anv/cmd_buffer: Sync clear values in begin_subpassJason Ekstrand2018-02-201-100/+48
| | | | | | | | | This is quite a bit cleaner because we now sync the clear values at the same time as we do the fast clear. For loading the clear values into the surface state, we now do it once when we handle the LOAD_OP_LOAD instead of every subpass. Reviewed-by: Nanley Chery <[email protected]>
* anv/pass: Store usage in each subpass attachmentJason Ekstrand2018-02-203-14/+39
| | | | | | | | | This requires us to ditch the VkAttachmentReference struct in favor of an anv-specific struct. However, we can now easily identify from just the subpass attachment what kind of an attachment it is. This will make iteration over anv_subpass::attachments a little easier in some case. Reviewed-by: Nanley Chery <[email protected]>
* anv/cmd_buffer: Add a concept of pending load aspectsJason Ekstrand2018-02-202-6/+17
| | | | | | | These are the same as pending clear aspects only for the "load" operation. Reviewed-by: Nanley Chery <[email protected]>
* anv/cmd_buffer: Iterate all subpass attachments when clearingJason Ekstrand2018-02-201-45/+33
| | | | | | | This unifies things a bit because we now handle depth and stencil at the same time. Reviewed-by: Nanley Chery <[email protected]>
* anv/cmd_buffer: Decide whether or not to HiZ clear up-frontJason Ekstrand2018-02-201-35/+72
| | | | | | | | | | | | | This moves the decision out of begin_subpass and into BeginRenderPass like the decision for color clears. We use a similar name for the function for depth/stencil as for color even though no aux usage is really getting computed. v2 (Jason Ekstrand): - Don't always disable HiZ clears by accident - Use the initial layout to decide whether to do fast clears Reviewed-by: Nanley Chery <[email protected]>
* anv/cmd_buffer: Move the rest of clear_subpass into begin_subpassJason Ekstrand2018-02-203-140/+185
| | | | Reviewed-by: Nanley Chery <[email protected]>
* intel/blorp: Add a blorp_hiz_clear_depth_stencil helperJason Ekstrand2018-02-202-0/+64
| | | | | | | This is similar to blorp_gen8_hiz_clear_attachments except that it takes actual images instead of trusting in the already set depth state. Reviewed-by: Nanley Chery <[email protected]>
* anv/cmd_buffer: Move the color portion of clear_subpass into begin_subpassJason Ekstrand2018-02-203-92/+94
| | | | | | | | | | This doesn't really change much now but it will give us more/better control over clears in the future. The one interesting functional change here is that we are now re-emitting 3DSTATE_DEPTH_BUFFERS and friends for each clear. However, this only happens at begin_subpass time so it shouldn't be substantially more expensive. Reviewed-by: Nanley Chery <[email protected]>
* anv/cmd_buffer: Pass a subpass id into begin_subpassJason Ekstrand2018-02-201-7/+5
| | | | | | | This is a bit less awkward than passing in the subpass because it means we don't have to extract the subpass id from the subpass. Reviewed-by: Nanley Chery <[email protected]>
* anv/cmd_buffer: Add begin/end_subpass helpersJason Ekstrand2018-02-201-24/+31
| | | | | | | Having begin/end_subpass is a bit nicer than the begin/next/end hooks that Vulkan gives us. Reviewed-by: Nanley Chery <[email protected]>
* anv/cmd_buffer: Apply subpass flushes before set_subpassJason Ekstrand2018-02-201-4/+4
| | | | | | | This seems slightly more correct because it means that the flushes happen before any clears or resolves implied by the subpass transition. Reviewed-by: Nanley Chery <[email protected]>
* anv: Use framebuffer layers for implicit subpass transitionsJason Ekstrand2018-02-201-1/+1
| | | | | Fixes: de3be618016 "anv/cmd_buffer: Rework aux tracking" Reviewed-by: Nanley Chery <[email protected]>
* anv: Be more careful about fast-clear colorsJason Ekstrand2018-02-201-27/+19
| | | | | | | | | | | | | Previously, we just used all the channels regardless of the format. This is less than ideal because some channels may have undefined values and this should be ok from the client's perspective. Even though the driver should do the correct thing regardless of what is in the undefined value, it makes things less deterministic. In particular, the driver may choose to fast-clear or not based on undefined values. This level of nondeterminism is bad. Cc: [email protected] Reviewed-by: Nanley Chery <[email protected]>
* intel/isl: Add an isl_color_value_is_zero helperJason Ekstrand2018-02-202-0/+23
| | | | | Cc: [email protected] Reviewed-by: Nanley Chery <[email protected]>
* anv/gpu_memcpy: CS Stall before a MI memcpy on gen7Jason Ekstrand2018-02-202-0/+32
| | | | | | | | | | | | | | | | | | | This fixes a pile of hangs caused by the recent shuffling of resolves and transitions. The particularly problematic case is when you have at least three attachments with load ops of CLEAR, LOAD, CLEAR. In this case, we execute the first CLEAR followed by a MI memcpy to copy the clear values over for the LOAD followed by a second CLEAR. The MI commands cause the first CLEAR to hang which causes us to get stuck on the 3DSTATE_MULTISAMPLE in the second CLEAR. We also add guards for BLORP to fix the same issue. These shouldn't actually do anything right now because the only use of indirect clears in BLORP today is for resolves which are already guarded by a render cache flush and CS stall. However, this will guard us against potential issues in the future. Acked-by: Kenneth Graunke <[email protected]> Acked-by: Nanley Chery <[email protected]>
* anv/entrypoints: make vkGetDeviceProcAddr return NULL for instance commandsIago Toral Quiroga2018-02-201-1/+1
| | | | | Reviewed-by: Lionel Landwerlin <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv/icl: Add render target flush after uploading binding tableAnuj Phogat2018-02-161-0/+20
| | | | | | | | | | | | | The PIPE_CONTROL command description says: "Whenever a Binding Table Index (BTI) used by a Render Taget Message points to a different RENDER_SURFACE_STATE, SW must issue a Render Target Cache Flush by enabling this bit. When render target flush is set due to new association of BTI, PS Scoreboard Stall bit must be set in this packet." Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv/icl: Enable float blend optimizationAnuj Phogat2018-02-161-1/+1
| | | | | Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv/icl: Use gen11 functionsAnuj Phogat2018-02-162-0/+6
| | | | | Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv/icl: Build anv libs for gen11Anuj Phogat2018-02-164-2/+32
| | | | | Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv/icl: Generate gen11 entry point functionsAnuj Phogat2018-02-161-1/+5
| | | | | Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv/icl: Don't use DISPATCH_MODE_SIMD4X2Anuj Phogat2018-02-161-0/+5
| | | | | Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv/icl: Don't use SingleVertexDispatchAnuj Phogat2018-02-161-0/+2
| | | | | Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv/icl: Don't set ResetGatewayTimerAnuj Phogat2018-02-161-0/+2
| | | | | Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>