summaryrefslogtreecommitdiffstats
path: root/src/intel
Commit message (Collapse)AuthorAgeFilesLines
* android: vulkan: add support for libmesa_vulkan_utilMauro Rossi2017-02-281-2/+6
| | | | | | | | | | | | | | | | | | | | The following changes are implemented: Add src/vulkan/Android.mk to build libmesa_vulkan_util Android.mk: add src/vulkan to SUBDIR to build new module intel/vulkan: fix libmesa_vulkan_util,vk_enum_to_str.h dependencies Add -o OUTPUT_PATH option in src/vulkan/util/gen_enum_to_str.py script Use -o OUTPUT_PATH option in automake generation rules for vk_enum_to_str.{c,h} Fixes: e9dcb17 "vulkan/util: Add generator for enum_to_str functions" Fixes: 8e03250 "vulkan: Combine wsi and util makefiles" Reviewed-by: Dylan Baker <[email protected]> Reviewed-by: Emil Velikov <[email protected]> [Emil Velikov] - Move parser within main() - Use --outdir instead of -o Signed-off-by: Emil Velikov <[email protected]>
* automake: anv: add missing include $(top_srcdir)/src/vulkan/utilEmil Velikov2017-02-281-0/+1
| | | | | | | Otherwise we'll fail to find the header and `make distcheck` will bail. Fixes: e9dcb17962f ("vulkan/util: Add generator for enum_to_str functions") Signed-off-by: Emil Velikov <[email protected]>
* anv: Bump advertised version to 1.0.42Jason Ekstrand2017-02-271-1/+1
| | | | | | | We've been following the spec changes. Reviewed-by: Lionel Landwerlin <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* vulkan/wsi/radv: add initial prime support (v1.1)Dave Airlie2017-02-272-3/+6
| | | | | | | | | | | | | | | | | | | This is a complete rewrite of my previous rfc patches. This adds the ability to present to a different GPU that rendering using a driver side operation that can copy from the tiled to linear shared image. This does prime support completely in the swapchain present code, and each queue has a precreated command buffer for each image and for the each queue family. This means presenting should work on graphics and compute queues and transfer in the future. v1.1: initialise needs_linear_copy in swapchain. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Tested-by: Mike Lothian <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* blorp: automake: add TODO to the tarballEmil Velikov2017-02-241-0/+2
| | | | | | Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Andreas Boll <[email protected]>
* anv: automake: add TODO to the tarballEmil Velikov2017-02-241-1/+2
| | | | | | Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Andreas Boll <[email protected]>
* anv: Enable MSAA compressionJason Ekstrand2017-02-235-2/+36
| | | | | | | | | | | This just enables basic MSAA compression (no fast clears) for all multisampled surfaces. This improves the framerate of the Sascha "multisampling" demo by 76% on my Sky Lake laptop. Running Talos on medium settings with 8x MSAA, this improves the framerate in the benchmark by 80%. Reviewed-by: Lionel Landwerlin <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* anv/blorp/clear_subpass: Only set surface clear color for fast clearsJason Ekstrand2017-02-231-2/+3
| | | | | | | | | | | | Not all clear colors are valid. In particular, on Broadwell and earlier, only 0/1 colors are allowed in surface state. No CTS tests are affected outright by this because, apparently, the CTS coverage for different clear colors is pretty terrible. However, when multisample compression is enabled, we do hit it with CTS tests and this commit prevents regressions when enabling MCS on Broadwell and earlier. Reviewed-by: Lionel Landwerlin <[email protected]> Cc: "13.0 17.0" <[email protected]>
* intel/isl: Apply render target alignment constraints for MCSPohjolainen, Topi2017-02-231-1/+16
| | | | | | | | v2: Instead of having the same block in isl_gen7,8,9.c add it once into isl.c::isl_choose_image_alignment_el() instead. Reviewed-by: Jason Ekstrand <[email protected]> Signed-off-by: Topi Pohjolainen <[email protected]>
* intel/isl: add MCS width constraint 16 samplesLionel Landwerlin2017-02-231-0/+10
| | | | | | | | v3 (Jason Ekstrand): Add a comment explaining why Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* intel/isl: Return surface creation success from aux helpersJason Ekstrand2017-02-233-41/+40
| | | | | | | | | The isl_surf_init call that each of these helpers make can, in theory, fail. We should propagate that up to the caller rather than just silently ignoring it. Reviewed-by: Topi Pohjolainen <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* isl/state: fix assert on raw buffer surface state minimum sizeSamuel Iglesias Gonsálvez2017-02-231-1/+1
| | | | | | | | | | | | | | | | | | | From IVB PRM, SURFACE_STATE::Height: "For typed buffer and structured buffer surfaces, the number of entries in the buffer ranges from 1 to 2^27 . For raw buffer surfaces, the number of entries in the buffer is the number of bytes which can range from 1 to 2^30." The minimum value is 1, according to the spec. The spec quote was already added into the code by 028f6d8317f00. Fixes crashing tests under: dEQP-VK.robustness.buffer_access.* Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv/Makefile: Gather all the genX files into one placeJason Ekstrand2017-02-221-22/+9
| | | | | | | While we're here, we also fix the alphabetization of the list of genx_* files. Reviewed-by: Emil Velikov <[email protected]>
* vulkan: Combine wsi and util makefilesDylan Baker2017-02-221-2/+2
| | | | Reviewed-by: Matt Turner <[email protected]>
* vulkan/util: Add generator for enum_to_str functionsDylan Baker2017-02-222-34/+4
| | | | | | | | | | | This adds a python generator to produce enum_to_str functions for Vulkan from the vk.xml API description. It supports extensions as well as core API features, and the generator works with both python2 and python3. Signed-off-by: Dylan Baker <[email protected]> Acked-by: Matt Turner <[email protected]> Acked-by: Jason Ekstrand <[email protected]>
* anv: Take a device parameter in anv_state_flushJason Ekstrand2017-02-219-52/+32
| | | | | | | This allows the helper to check for llc instead of having to do it manually at all the call sites. Reviewed-by: Lionel Landwerlin <[email protected]>
* anv: Pull all clflushing into a clflush_range helperJason Ekstrand2017-02-212-20/+13
| | | | | | | All this cache line address calculation stuff is tricky. Let's not duplicate it more places than we have to. Reviewed-by: Lionel Landwerlin <[email protected]>
* anv: Remove the unused state_pool_emit macroJason Ekstrand2017-02-211-14/+0
| | | | Reviewed-by: Lionel Landwerlin <[email protected]>
* anv: Rename clflush_range and state_clflushJason Ekstrand2017-02-2110-29/+29
| | | | | | | | It's a bit shorter and easier to work with. Also, we're about to add a helper called clflush which does the clflush but without any memory fencing. Reviewed-by: Lionel Landwerlin <[email protected]>
* intel/blorp: Explicitly flush all allocated stateJason Ekstrand2017-02-212-1/+29
| | | | | | | | Found by inspection. However, I expect it fixes real bugs when using blorp from Vulkan on little-core platforms. Reviewed-by: Lionel Landwerlin <[email protected]> Cc: "13.0 17.0" <[email protected]>
* anv: Put everything about queries in genX_query.cJason Ekstrand2017-02-214-478/+484
| | | | Reviewed-by: Lionel Landwerlin <[email protected]>
* anv/Makefile: alphabetizeJason Ekstrand2017-02-211-4/+4
| | | | Reviewed-by: Lionel Landwerlin <[email protected]>
* anv/query: Perform CmdResetQueryPool on the GPUJason Ekstrand2017-02-212-22/+30
| | | | | | | This fixes a some rendering corruption in The Talos Principle Reviewed-by: Lionel Landwerlin <[email protected]> Cc: "13.0 17.0" <[email protected]>
* genxml: Make MI_STORE_DATA_IMM more consistentJason Ekstrand2017-02-213-3/+3
| | | | | Reviewed-by: Lionel Landwerlin <[email protected]> Cc: "13.0 17.0" <[email protected]>
* anv/query: clflush the bo map on non-LLC platformsJason Ekstrand2017-02-211-0/+3
| | | | | | | Found by inspection Reviewed-by: Lionel Landwerlin <[email protected]> Cc: "13.0 17.0" <[email protected]>
* anv: Add an invalidate_range helperJason Ekstrand2017-02-211-0/+13
| | | | | | | | This is similar to clflush_range except that it puts the mfence on the other side to ensure caches are flushed prior to reading. Reviewed-by: Lionel Landwerlin <[email protected]> Cc: "13.0 17.0" <[email protected]>
* anv: remove unused anv_dispatch_table dtableEmil Velikov2017-02-212-4/+0
| | | | | | Fixes: 4c9dec80ede ("anv: Get rid of the ANV_CALL macro") Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eduardo Lima Mitev <[email protected]>
* anv: remove unneeded extern C notationEmil Velikov2017-02-211-8/+0
| | | | | | | | Analogous to previous commit - never used in any C++ code. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* vulkan/wsi/x11: add support to detect if we can support rendering (v3)Dave Airlie2017-02-205-5/+12
| | | | | | | | | | | | | | | | | This adds support to radv_GetPhysicalDeviceXlibPresentationSupportKHR and radv_GetPhysicalDeviceXcbPresentationSupportKHR to check if the local device file descriptor is compatible with the descriptor retrieved from the X server via DRI3. This will stop radv binding to an X server until we have prime support in place. Hopefully apps use this API before trying to render things. v2: drop unneeded function, don't leak memory. (jekstrand) v3: also check in surface_get_support callback. Reviewed-by: Jason Ekstrand <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* anv/TODO: Check off Storage Image Without FormatJason Ekstrand2017-02-171-1/+0
| | | | The code for this landed a few days ago.
* anv: Use build-id for pipeline cache UUID.Matt Turner2017-02-152-21/+8
| | | | | | | | The --build-id=... ld flag has been present since binutils-2.18, released 28 Aug 2007. Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* anv: wsi: report presentation error per image requestLionel Landwerlin2017-02-151-8/+15
| | | | | | | | | | | | | | | | vkQueuePresentKHR() takes VkPresentInfoKHR pointer and includes a pResults fields which must holds the results of all the images requested to be presented. Currently we're not filling this field. Also as a side effect we probably want to go through all the images rather than stopping on the first error. This commit also makes the QueuePresentKHR() implementation return the first error encountered. Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Cc: "17.0" <[email protected]>
* anv: Use vk_foreach_struct for handling extension structsJason Ekstrand2017-02-143-27/+21
| | | | Reviewed-by: Dave Airlie <[email protected]>
* anv: Implement the Skylake stencil PMA optimizationJason Ekstrand2017-02-143-6/+158
| | | | | | | | | | Unfortunately, this doesn't substantially improve the performance of any known apps. With Dota 2 on my Sky Lake gt4, it seems help by somewhere between 0% and 1% but there's enough noise that it's hard to get a clear picture. Reviewed-by: Lionel Landwerlin <[email protected]> Reviewed-by: Nanley Chery <[email protected]>
* genxml: Add the CACHE_MODE_0 register on gen9Jason Ekstrand2017-02-141-0/+28
| | | | Reviewed-by: Lionel Landwerlin <[email protected]>
* anv/pipeline: Be smarter about depth/stencil stateJason Ekstrand2017-02-141-34/+141
| | | | | | | | | It's a bit hard to measure because it almost gets lost in the noise, but this seemed to help Dota 2 by a percent or two on my Broadwell GT3e desktop. Reviewed-by: Lionel Landwerlin <[email protected]> Reviewed-by: Nanley Chery <[email protected]>
* anv/pipeline: Make a copy of VkPipelineDepthStencilStateCreateinfoJason Ekstrand2017-02-141-16/+18
| | | | | Reviewed-by: Lionel Landwerlin <[email protected]> Reviewed-by: Nanley Chery <[email protected]>
* anv: Add support for the PMA fix on BroadwellJason Ekstrand2017-02-149-2/+221
| | | | | | | | | | This helps Dota 2 on Broadwell by 8-9%. I also hacked up the driver and used the Sascha "shadowmapping" demo to get some results. Setting uses_kill to true dropped the framerate on the demo by 25-30%. Enabling the PMA fix brought it back up to around 90% of the original framerate. Reviewed-by: Lionel Landwerlin <[email protected]> Reviewed-by: Nanley Chery <[email protected]>
* genxml: Add the CACHE_MODE_1 register on gen8Jason Ekstrand2017-02-141-0/+21
| | | | Reviewed-by: Lionel Landwerlin <[email protected]>
* anv: Disable stencil writes when both write masks are zeroJason Ekstrand2017-02-144-2/+17
| | | | | | | | | | | | Vulkan doesn't have a stencilWriteEnable bit like it does for depth. Instead, you have a stencil mask. Since the stencil mask is handled as dynamic state, we have to handle it later during command buffer construction. This, combined with a later commit, seems to help Dota2 on my Broadwell GT3e desktop by a couple percent because it allows the hardware to move the depth and stencil writes to early in more cases. Reviewed-by: Lionel Landwerlin <[email protected]> Reviewed-by: Nanley Chery <[email protected]>
* anv/entrypoints: Only generate entrypoints for supported featuresJason Ekstrand2017-02-141-3/+41
| | | | | | | | | This changes the way anv_entrypoints_gen.py works from generating a table containing every single entrypoint in the XML to just the ones that we actually need. There's no reason for us to burn entrypoint table space on a bunch of NV extensions we never plan to implement. Reviewed-by: Lionel Landwerlin <[email protected]>
* anv: fix Get*MemoryRequirements for !LLCConnor Abbott2017-02-141-6/+8
| | | | | | | | | | Even though we supported both coherent and non-coherent memory types, we effectively forced apps to use the coherent types by accident. Found by inspection, only compile tested. Signed-off-by: Connor Abbott <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Cc: "17.0" <[email protected]>
* anv: Add support for shaderStorageImageWriteWithoutFormatAlex Smith2017-02-146-23/+65
| | | | | | | | | | | | | | | | | | | | | | This allows shaders to write to storage images declared with unknown format if they are decorated with NonReadable ("writeonly" in GLSL). Previously an image view would always use a lowered format for its surface state, however when a shader declares a write-only image, we should use the real format. Since we don't know at view creation time whether it will be used with only write-only images in shaders, create two surface states using both the original format and the lowered format. When emitting the binding table, choose between the states based on whether the image is declared write-only in the shader. Tested on both Sascha Willems' computeshader sample (with the original shaders and ones modified to declare images writeonly and omit their format qualifiers) and on our own shaders for which we need support for this. Signed-off-by: Alex Smith <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv/apply_pipeline_layout: Set image.write_only to falseJason Ekstrand2017-02-141-0/+12
| | | | | | | | | | This makes our driver robust to changes in spirv_to_nir which would set this flag on the variable. Right now, our driver relies on spirv_to_nir *not* setting var->data.image.write_only for correctness. Any patch which implements the shaderStorageImageWriteWithoutFormat will need to effectively revert this commit. Reviewed-by: Lionel Landwerlin <[email protected]>
* intel/isl: Add format metadata for typed reads/writesJason Ekstrand2017-02-142-251/+291
| | | | | | | | This adds two columns to the format table as well as two helpers for determining whether or not a given format is supported for typed reads and writes. Reviewed-by: Lionel Landwerlin <[email protected]>
* anv/cmd_buffer: Return a VkResult from verify_cmd_parserJason Ekstrand2017-02-141-7/+7
| | | | | | This fixes a "statement with no effect" compiler warning Reviewed-by: Lionel Landwerlin <[email protected]>
* anv/blorp: Don't sanitize the swizzle for blorp_clearJason Ekstrand2017-02-131-2/+1
| | | | | | | | | | | | | BLORP is now smart enough to handle any swizzle (even those that contain ZERO or ONE) in a reasonable manner. Just let BLORP handle it. This fixes the following Vulkan CTS tests on Haswell: - dEQP-VK.api.image_clearing.clear_color_image.1d_b4g4r4a4_unorm_pack16 - dEQP-VK.api.image_clearing.clear_color_image.2d_b4g4r4a4_unorm_pack16 - dEQP-VK.api.image_clearing.clear_color_image.3d_b4g4r4a4_unorm_pack16 Reviewed-by: Juan A. Suarez Romero <[email protected]> Cc: "17.0" <[email protected]>
* intel/blorp: Swizzle clear colors on the CPUJason Ekstrand2017-02-131-18/+30
| | | | | | | | | It's trivial to swizzle clear colors on the CPU, easily deals with the hardware restrictions for render target swizzles, and makes swizzled clears work on all hardware as opposed to just HSW+. Reviewed-by: Juan A. Suarez Romero <[email protected]> Cc: "17.0" <[email protected]>
* intel/blorp: do not return const data by get_px_size_sa()Emil Velikov2017-02-101-1/+1
| | | | | | | | | | | | | Not much point in the const qualifier since we provide a copy to the user. Resolves the following -Wignored-qualifiers warning. src/intel/blorp/blorp_blit.c:1857:8: warning: 'const' type qualifier on return type has no effect [-Wignored-qualifiers] v2: keep const qualifier of local variable. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv/pipeline: set ThreadDispatchEnable conditionallyJuan A. Suarez Romero2017-02-061-23/+26
| | | | | | | | Set 3DSTATE_WM/ThreadDispatchEnable bit on/off based on the same conditions as used in the GL version. Signed-off-by: Juan A. Suarez Romero <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>