summaryrefslogtreecommitdiffstats
path: root/src/intel
Commit message (Collapse)AuthorAgeFilesLines
* anv: fix viewport transformation for z componentSamuel Iglesias Gonsálvez2017-09-251-2/+2
| | | | | | | | | | | | | | | | | | In Vulkan, for 'z' (depth) component, the scale and translate values for the viewport transformation are: pz = maxDepth - minDepth oz = minDepth zf = pz × zd + oz Being zd, the third component in vertex's normalized device coordinates. Fixes: dEQP-VK.draw.inverted_depth_ranges.* Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Cc: [email protected]
* Revert "intel: Remove unused device info for KBL GT1.5"Anuj Phogat2017-09-211-0/+11
| | | | | | | | This reverts commit 4c4c28ca70b2267a2563047e35498b1c9252664f. GT1.5 device info is required for few reserved pci-id's. Signed-off-by: Anuj Phogat <[email protected]>
* i965: Handle unwritten PSIZ/VIEWPORT/LAYER outputs in vec4 shaders.Kenneth Graunke2017-09-211-3/+3
| | | | | | | | This can occur if the shader is capturing some of the values from the VUE header for transform feedback, but the shader hasn't written all of them. Reviewed-by: Juan A. Suarez Romero <[email protected]>
* intel/blorp/hiz: Always set sample numberTopi Pohjolainen2017-09-211-0/+11
| | | | | | Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Signed-off-by: Topi Pohjolainen <[email protected]>
* anv: Advertise VK_KHR_maintenance2Jason Ekstrand2017-09-201-0/+1
| | | | Reviewed-by: Lionel Landwerlin <[email protected]>
* anv/image: Use RENDER_SURFACE_STATE::X/Y Offset on SKL+Jason Ekstrand2017-09-201-7/+16
| | | | | | | | | | | | The Broadwell method of handling uncompressed views of compressed textures was to make the texture linear and have a tiled shadow copy. This isn't needed on Sky Lake because the HALIGN and VALIGN parameters are specified in surface elements and required to be a multiple of 4. This means that we can just use the X/Y Offset fields and we can avoid the shadow copy song and dance. This also makes ASTC work because ASTC can't be linear and so the shadow copy method doesn't work there. Reviewed-by: Lionel Landwerlin <[email protected]>
* intel/blorp: Handle clearing compressed surfacesJason Ekstrand2017-09-201-7/+17
| | | | Reviewed-by: Lionel Landwerlin <[email protected]>
* intel/blorp: Internally expose surf_convert_to_uncompressedJason Ekstrand2017-09-202-13/+21
| | | | Reviewed-by: Lionel Landwerlin <[email protected]>
* anv/image: Support creating uncompressed views of compressed imagesJason Ekstrand2017-09-204-5/+187
| | | | | | | | | | | | | | | | | | | | | | | | | | | In order to get support everywhere, this gets a bit complicated. On Sky Lake and later, everything is fine because HALIGN/VALIGN are specified in surface elements and are required to be at least 4 so any offsetting we may need to do falls neatly within the heavy restrictions placed on the X/Y Offset parameter of RENDER_SURFACE_STATE. On Broadwell and earlier, HALIGN/VALIGN are specified in pixels and are hard-coded to align to exactly the block size of the compressed texture. This means that, when reinterpreted as a non-compressed texture, the tile offsets may be anything and we can't rely on X/Y Offset. In order to work around this issue, we fall back to linear where we can trivially offset to whatever element we so choose. However, since linear texturing performance is terrible, we create a tiled shadow copy of the image to use for texturing. Whenever the user does a layout transition from anything to SHADER_READ_ONLY_OPTIMAL, we use blorp to copy the contents of the texture from the linear copy to the tiled shadow copy. This assumes that the client will use the image far more for texturing than as a storage image or render target. Even though we don't need the shadow copy on Sky Lake, we implement it this way first to make testing easier. Due to the hardware restriction that ASTC must not be linear, ASTC does not work yet. Reviewed-by: Lionel Landwerlin <[email protected]>
* anv: Add a new anv_surface_state structJason Ekstrand2017-09-204-109/+110
| | | | | | | | | | | | | | This struct represents a full surface state including the addresses of the referenced main and auxiliary surfaces (if any). This makes relocation setup substantially simpler and allows us to move 100% of the surface state setup logic into anv_image where it belongs. Before, we were manually fishing data out of surface states when emitting relocations so we knew how to offset aux address. It's best to keep all of the surface state emit logic together. This also gets us closer, at least cosmetically, to a world of no relocations where addresses are placed in surface states up-front. Reviewed-by: Lionel Landwerlin <[email protected]>
* anv/image: Break surface state fill logic into a helperJason Ekstrand2017-09-203-112/+151
| | | | | | | This gives us a single centralized place where we take an image view and use it to fill out a surface state. Reviewed-by: Lionel Landwerlin <[email protected]>
* anv/image: Add support for the VkImageViewUsageCreateInfoKHR structJason Ekstrand2017-09-201-8/+14
| | | | Reviewed-by: Lionel Landwerlin <[email protected]>
* anv: Advertise point clipping propertiesSamuel Iglesias Gonsálvez2017-09-201-0/+8
| | | | | Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv: Add support for tessellation domain origin controlJason Ekstrand2017-09-201-10/+21
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* spirv: Flip the tessellation winding orderJason Ekstrand2017-09-201-1/+12
| | | | | | | | It's not SPIR-V that's backwards from GLSL, it's Vulkan that's backwards from GL. Let's make NIR consistent with the source language and do the flipping inside the Vulkan driver instead. Reviewed-by: Kenneth Graunke <[email protected]>
* anv/image: Add support for the new depth/stencil layoutsJason Ekstrand2017-09-201-0/+2
| | | | Reviewed-by: Lionel Landwerlin <[email protected]>
* anv/entrypoints_gen: Dedent the C codeJason Ekstrand2017-09-201-196/+195
| | | | | | This makes the C code be justified over to the left. Reviewed-by: Lionel Landwerlin <[email protected]>
* anv: Fix descriptors copyingJózef Kucia2017-09-201-1/+1
| | | | | | | Trivial. Cc: [email protected] Reviewed-by: Jason Ekstrand <[email protected]>
* anv: Advertise support VK_FORMAT_R8_SRGBJason Ekstrand2017-09-191-1/+2
| | | | | | | | | Unreal Engine 4 seems to really like this format for some reason. We don't technically have the hardware format but we do have L8_SRGB. It's easy enough to fake with that and a swizzle. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* intel/blorp: Support clearing L8_UNORM_SRGB surfacesJason Ekstrand2017-09-191-0/+4
| | | | | | | | Vulkan needs to be able to clear any texture you can create. We want to add support for VK_FORMAT_R8_SRGB and we need to use L8_UNORM_SRGB to do that so we need to be able to clear it. Reviewed-by: Kenneth Graunke <[email protected]>
* configure.ac: split the wayland client/server confusionEmil Velikov2017-09-191-2/+2
| | | | | | | | | | | | | | | | | | | | At the moment wayland-clients, such as the Vulkan drivers were over-linking against libwayland-server.so. That went unnoticed, since both client and server code uses the wl*interface symbols, which are present in both libwayland-client.so and libwayland-server.so. I've looked at correcting that, although that's orthogonal to this fix. Note: wayland-egl does _not_ depend on wayland-client, although it does need wayland-egl.h. There's no distinct package that provides it (I have a WIP on the topic) so current solution will do for now. v2: Rebase with the "...inline wayland_drm_buffer_get" patch removed. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
* intel: automake: add isl_genX_priv.h in the source listJuan A. Suarez Romero2017-09-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes: CC isl/isl_format_layout.lo In file included from ../../../../src/intel/isl/isl_storage_image.c:24:0: ../../../../src/intel/isl/isl_priv.h:170:29: fatal error: isl_genX_priv.h: No such file or directory compilation terminated. Makefile:2936: recipe for target 'isl/isl_storage_image.lo' failed make[5]: *** [isl/isl_storage_image.lo] Error 1 make[5]: *** Waiting for unfinished jobs.... In file included from ../../../../src/intel/isl/isl.c:36:0: ../../../../src/intel/isl/isl_priv.h:170:29: fatal error: isl_genX_priv.h: No such file or directory compilation terminated. make[5]: *** [isl/isl.lo] Error 1 Makefile:2936: recipe for target 'isl/isl.lo' failed make[4]: *** [all] Error 2 when running `make distcheck`. v2: Fix commit title (Emil) Reviewed-by: Emil Velikov <[email protected]>
* anv/android: Disable surface and swapchain extensions (v2)Chad Versace2017-09-181-3/+20
| | | | | | | | | | | | | Android's Vulkan loader implements VK_KHR_surface and VK_KHR_swapchain, and applications cannot access the driver's implementation. Moreoever, if the driver exposes the those extension strings, then tests dEQP-VK.api.info.instance.extensions and dEQP-VK.api.info.device fail due to the duplicated strings. v2: Replace !ANDROID with ANV_HAS_SURFACE. (for jekstrand) Reviewed-by: Tapani Pälli <[email protected]> Tested-by: Tapani Pälli <[email protected]>
* anv: Feed vk_android_native_buffer.xml to generators (v2)Chad Versace2017-09-183-6/+28
| | | | | | | | | | | | | | Feed the XML to anv_extensions.py and anv_entrypoints_gen.py. Do it on all platforms, not just Android. Tested on Android and Fedora. We always parse the Android XML, regardless of target platform, to help reduce the chance that people working on non-Android break the Android build. v2: - Squash in Tapani's changes to Android.*.mk. Reviewed-by: Tapani Pälli <[email protected]> (v1)
* anv: Teach generator scripts how to parse mutliple XML filesChad Versace2017-09-182-10/+23
| | | | | | | | | | | | | | The taught scripts are anv_extensions.py and anv_entrypoints_gen.py. To give a script multiple XML files, call it like so: anv_extensions.py --xml a.xml --xml b.xml --xml c.xml ... The scripts parse the XML files in the given order. This will allow us to feed the scripts XML files for extensions that are missing from the official vk.xml, such as VK_ANDROID_native_buffer. Reviewed-by: Tapani Pälli <[email protected]>
* intel/isl: Add a drm_modifier_get_default_aux_state helperJason Ekstrand2017-09-181-0/+20
| | | | | | Reviewed-by: Topi Pohjolainen <[email protected]> Reviewed-by: Daniel Stone <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* anv: Implement VK_KHR_image_format_listJason Ekstrand2017-09-182-2/+36
| | | | Reviewed-by: Lionel Landwerlin <[email protected]>
* anv: Implement VK_KHR_bind_memory2Jason Ekstrand2017-09-183-17/+68
| | | | Reviewed-by: Lionel Landwerlin <[email protected]>
* i965: Add an INTEL_DEBUG=reemit option.Kenneth Graunke2017-09-152-0/+2
| | | | | | | | | Jason and I use this for debugging all the time. Recompiling the driver to enable it is kind of annoying. It's a great thing to try along with always_flush_batch=true and always_flush_cache=true to detect a class of problems - namely, atoms listening to an insufficient set of dirty bits. Reviewed-by: Matt Turner <[email protected]>
* i965: Add an INTEL_DEBUG=submit option for printing batch statistics.Kenneth Graunke2017-09-132-1/+2
| | | | | | | | | | | | | | | | | | | When a batch is submitted, INTEL_DEBUG=bat prints a message indicating which part of the code triggered the flush, and some statistics about the batch/state buffer utilization. It also decodes the batchbuffer in debug builds...which is so much output that it drowns out the utilization messages, if that's all you care about. INTEL_DEBUG=submit now just does the utilization messages. INTEL_DEBUG=bat continues to do both (as the message is a good indicator that we're starting decode of a new batch). v2: Rename from "flush" to "submit" (suggested by Chris) because we might want "flush" for PIPE_CONTROL debugging someday. Reviewed-by: Chris Wilson <[email protected]>
* util: Query build-id by symbol address, not library nameChad Versace2017-09-131-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch renames build_id_find_nhdr() to build_id_find_nhdr_for_addr(), and changes it to never examine the library name. Tested on Fedora by confirming that build_id_get_data() returns the same build-id as the file(1) tool. For BSD, I confirmed that the API used (dladdr() and struct Dl_info) is documented in FreeBSD's manpages. This solves two problems: - We can now the query the build-id without knowing the installed library's filename. This matters because Android requires specific filenames for HAL modules, such as "/vendor/lib/hw/vulkan.${board}.so". The HAL filenames do not follow the Unix convention of "libfoo.so". In other words, the same query code will now work on Linux and Android. - Querying the build-id now works correctly when the process contains multiple shared objects with the same basename. (Admittedly, this is a highly unlikely scenario). Cc: Jonathan Gray <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* intel/eu/validate: Look up types on demand in execution_type()Jason Ekstrand2017-09-121-4/+2
| | | | | | | | | | We are looking up the execution type prior to checking how many sources we have. This leads to looking for a type for src1 on MOV instructions which is bogus. On BDW+, the src1 register type overlaps with the 64-bit immediate and causes us problems. Reviewed-by: Matt Turner <[email protected]> Cc: [email protected]
* anv: fix build issues on release buildTapani Pälli2017-09-121-1/+1
| | | | | | Fixes: d083bc1c4b ("anv: wire up vk_errorf macro to do debug reporting") Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
* anv: remove extra 'debug:' from anv_debug_ignored_stypeTapani Pälli2017-09-121-1/+1
| | | | | | | | anv_debug adds 'debug:' already, this is to clean following: debug: debug: anv_CreateDebugReportCallbackEXT: ignored VkStructureType 1000011000 Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv: move brw_process_intel_debug_variable to happen earlyTapani Pälli2017-09-121-2/+2
| | | | | | | | | Currently anv_perf_warn call in anv_compute_heap_size does not ever report a perf warning. Move debug variable read as the first thing in case there will be other perf_warn calls added. Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv: wire up vk_errorf macro to do debug reportingTapani Pälli2017-09-129-33/+74
| | | | | Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv: wire up anv_perf_warn macro to do debug reportingTapani Pälli2017-09-125-16/+141
| | | | | Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv: implementation of VK_EXT_debug_report extensionTapani Pälli2017-09-125-0/+180
| | | | | | | | | | | | | | | | | | | Patch adds required functionality for extension to manage a list of application provided callbacks and handle debug reporting from driver and application side. v2: remove useless helper anv_debug_report_call add locking around callbacks list use vk_alloc2, vk_free2 refactor CreateDebugReportCallbackEXT fix bugs found with crucible testing v3: provide ANV_FROM_HANDLE and use it misc fixes for issues Jason found use vk_find_struct_const for finding ctor_cb Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv: Annotate entrypoint table with index and func nameChad Versace2017-09-061-2/+2
| | | | | | This helps when debugging a broken entrypoint table. Reviewed-by: Jason Ekstrand <[email protected]>
* intel: Remove unused device info for KBL GT1.5Anuj Phogat2017-09-061-11/+0
| | | | | Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* anv: fix off by one in array checkEric Engestrom2017-09-041-1/+1
| | | | | | | | | | | | `anv_formats[ARRAY_SIZE(anv_formats)]` is already one too far. Spotted by Coverity. CovID: 1417259 Fixes: 242211933a0682696170 "anv/formats: Nicely handle unknown VkFormat enums" Cc: Jason Ekstrand <[email protected]> Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* genxml: Make Border Color Pointer an address on Gen4-5, not an offset.Kenneth Graunke2017-09-023-3/+3
| | | | Reviewed-by: Jason Ekstrand <[email protected]>
* aubinator: remove duplicate initialisationEric Engestrom2017-09-011-1/+0
| | | | | Reviewed-by: Lionel Landwerlin <[email protected]> Signed-off-by: Eric Engestrom <[email protected]>
* anv/formats: Nicely handle unknown VkFormat enumsJason Ekstrand2017-08-311-5/+14
| | | | | | | | | | | This fixes some crashes in the dEQP-VK.memory.requirements.core.* tests. I'm not sure whether or not passing out-of-bound formats into the query is supposed to be allowed but there's no harm in protecting ourselves from it. Reviewed-by: Lionel Landwerlin <[email protected]> Bugzilla: https://bugs.freedesktop.org/101956 Cc: [email protected]
* anv: fix build errors on androidTapani Pälli2017-08-311-2/+3
| | | | | | | | | error: incompatible pointer to integer conversion initializing 'VkFence' (aka 'unsigned long long') with an expression of type 'void *' [-Werror,-Wint-conversion] Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* blorp: Make blorp_buffer_copy work on Gen4-6.Kenneth Graunke2017-08-301-9/+10
| | | | | | Gen4-6 can only handle surfaces up to 8192. Only Gen7+ can do 16384. Reviewed-by: Jason Ekstrand <[email protected]>
* blorp: Turn anv_CmdCopyBuffer into a blorp_buffer_copy() helper.Kenneth Graunke2017-08-303-99/+143
| | | | | | | | | | | I want to be able to copy between buffer objects using BLORP in the i965 driver. Anvil already had code to do this, in a reasonably efficient manner - first using large bpp copies, then smaller bpp copies. This patch moves that logic into BLORP as blorp_buffer_copy(), so we can use it in both drivers. Reviewed-by: Jason Ekstrand <[email protected]>
* anv: use device->info instead of brw->is_*Lionel Landwerlin2017-08-301-1/+1
| | | | | | Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* anv: set right datatypes in anv_pipeline_bindingJuan A. Suarez Romero2017-08-303-4/+4
| | | | | | | | | | | | | | This structure contains two fields, binding and index, that store the binding in the descriptor set and the index inside the binding. These structures are defined as uint8_t, but the types in Vulkan specification are uint32_t, so big values are clamp. This fixes dEQP-VK.binding_model.shader_access.*.multiple_arbitrary_descriptors.* v2: use UINT32_MAX for index when having no render targets (Tapani) Reviewed-by: Tapani Pälli <[email protected]>
* blorp: Explicitly cast between different enumsMatt Turner2017-08-291-5/+5
| | | | | | | | | | | | | Fixes warnings like warning: implicit conversion from enumeration type 'enum isl_format' to different enumeration type 'enum GEN10_SURFACE_FORMAT' [-Wenum-conversion] .SourceElementFormat = ISL_FORMAT_R32_UINT, ^~~~~~~~~~~~~~~~~~~ Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>