summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* 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-203-8/+15
| | | | | | | | 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]>
* clover: Wait for requested operation if blocking flag is setJan Vesely2017-09-201-2/+28
| | | | | | | | | | v2: wait in map_buffer and map_image as well v3: use event::wait instead of wait (skips fence wait for hard_event) v4: use wait_signalled() Signed-off-by: Jan Vesely <[email protected]> Reviewed-by: Francisco Jerez <[email protected]> Reviewed-by: Aaron Watry <[email protected]>
* clover: Run the associated action before an event is signalled.Francisco Jerez2017-09-202-11/+12
| | | | | | | | | | | | | | | | And define a method for other threads to wait until the action function associated with an event has been executed to completion. For hard events, this will mean waiting until the corresponding command has been submitted to the pipe driver, without necessarily flushing the pipe_context and waiting for the actual command to be processed by the GPU (which is what hard_event::wait() already does). This weaker kind of event wait will allow implementing blocking memory transfers efficiently. Acked-by: Aaron Watry <[email protected]> Reviewed-by: Jan Vesely <[email protected]>
* clover: Wrap event::wait_count in a method taking care of the required locking.Francisco Jerez2017-09-202-8/+14
| | | | | Acked-by: Aaron Watry <[email protected]> Reviewed-by: Jan Vesely <[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]>
* radv: Don't use a virtual function for getting the buffer virtual address.Bas Nieuwenhuizen2017-09-2013-89/+87
| | | | | | | | | | | We are really not going to use a winsys which does not need to store the va, so might as well store it in a standard field. Not sure this helps perf much though, as most of the cost is in the cache miss accessing the bo anyway, which we stil need to do. Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* radv: Only enter the immutable samplers init loop when we have some.Bas Nieuwenhuizen2017-09-202-12/+18
| | | | | Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* radv: Use for_each_bit in the descriptor set flush.Bas Nieuwenhuizen2017-09-201-3/+1
| | | | | | | | Since most games use only a few, iterating through all of them is a waste. Simplifies the code too. Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* radv: Add VK_KHR_bind_memory2 support.Bas Nieuwenhuizen2017-09-202-24/+59
| | | | | | | | | | | Nothing too exciting, just adding the possibility for a pNext pointer, and batch binding. Our binding is pretty much trivial. It also adds VK_IMAGE_CREATE_ALIAS_BIT_KHR, but since we store no state in radv_image, I don't think we have to do anything there. Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* llvmpipe, gallivm: implement lod queries (LODQ opcode)Roland Scheidegger2017-09-205-58/+144
| | | | | | | | | | | | | | | | | | | | | | This uses all the existing code to calculate lod values for mip linear filtering. Though we'll have to disable the simplifications (if we know some parts of the lod calculation won't actually matter for filtering purposes due to mip clamps etc.). For better or worse, we'll also disable lod calculation hacks (mostly should make a difference for cube maps) always - the issue with per-pixel lod being difficult is mostly because we then have different mipmaps needed for the actual texel fetch, which isn't a problem with lodq. We still use approximation for the log2 - for that reason I believe the float part of the lod is only accurate to about 4-5 bits (and one bit less with 1d textures actually) which is hopefully good enough (though d3d10 technically requires 6 bits - could use quadratic interpolation instead of linear to get 8 bits or so). Since lodq requires unclamped lod, we also have to move some sampler key calculations to texture sampling code - even if we know we're going to access mipmap 0 we still have to calculate lod and apply lod_bias for lodq. Passes piglit ARB_texture_query_lod tests (after having fixed the test). Reviewed-by: Jose Fonseca <[email protected]>
* i965: Fix duplication of DRI imagesLouis-Francis Ratté-Boulianne2017-09-201-0/+3
| | | | | | | | | | | Some DRI image properties weren't properly duplicated in the new image. Some properties are still missing, but I'm not certain if there was a good reason to let them out in the first place. Signed-off-by: Louis-Francis Ratté-Boulianne <[email protected]> Reviewed-by: Daniel Stone <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* radeonsi: set MIP_POINT_PRECLAMP to 0Nicolai Hähnle2017-09-201-1/+1
| | | | | | | | | | | | | | | | | This fixes a bug with nearest ("point") mip selection when the fractional part of max_lod is in (0.5,1). In this case, the spec mandates that we still select the mip level ceil(max_lod) in the clamping case. However, MIP_POINT_PRECLAMP will clamp before the mip selection, which is wrong. Supposedly this setting was originally copied from the closed Vulkan driver, but as far as I can tell, closed Vulkan was actually changed back recently :) Fixes dEQP-GLES3.functional.texture.mipmap.2d.max_lod.{nearest,linear}_nearest Fixes: f7420ef5b464 ("radeonsi: enable some sampler fields to match the closed driver") Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radeonsi: fix array textures layer coordinateNicolai Hähnle2017-09-201-1/+10
| | | | | | | | | Like for cube map (array) gather, we need to round to nearest on <= VI. Fixes tests in dEQP-GLES3.functional.shaders.texture_functions.texture.* Cc: [email protected] Reviewed-by: Marek Olšák <[email protected]>
* glsl/linker: fix output variable overlap checkNicolai Hähnle2017-09-201-6/+11
| | | | | | | | | | | | | | | | | Prevent an overflow caused by too many output variables. To limit the scope of the issue, write to the assigned array only for the non-ES fragment shader path, which is the only place where it's needed. Since the function will bail with an error when output variables with overlapping components are found, (max # of FS outputs) * 4 is an upper limit to the space we need. Found by address sanitizer. Fixes dEQP-GLES3.functional.attribute_location.bind_aliasing.* Cc: [email protected] Reviewed-by: Timothy Arceri <[email protected]>
* etnaviv: move sw query defines to etnaviv_query_sw.hChristian Gmeiner2017-09-202-2/+4
| | | | | | | Also add new define ETNA_SW_QUERY_BASE. Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Wladimir J. van der Laan <[email protected]>
* etnaviv: move sw get_driver_query_info(..)Christian Gmeiner2017-09-203-12/+28
| | | | | | | | | This change makes etna_get_driver_query_info(..) more generic and puts the knowledge of supported queries directly besides the implementation. Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Wladimir J. van der Laan <[email protected]>
* anv: Fix descriptors copyingJózef Kucia2017-09-201-1/+1
| | | | | | | Trivial. Cc: [email protected] Reviewed-by: Jason Ekstrand <[email protected]>
* radv: do not update the number of scissors in vkCmdSetScissor()Samuel Pitoiset2017-09-201-3/+0
| | | | | | | | | | | | | The Vulkan spec (1.0.61) says: "The number of scissors used by a pipeline is still specified by the scissorCount member of VkPipelinescissorStateCreateInfo." So, the number of scissors is defined at pipeline creation time and shouldn't be updated when they are set dynamically. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv: do not update the number of viewports in vkCmdSetViewport()Samuel Pitoiset2017-09-201-3/+0
| | | | | | | | | | | | | The Vulkan spec (1.0.61) says: "The number of viewports used by a pipeline is still specified by the viewportCount member of VkPipelineViewportStateCreateInfo." So, the number of viewports is defined at pipeline creation time and shouldn't be updated when they are set dynamically. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv: add some assertions in vkCmdSetScissor()Samuel Pitoiset2017-09-201-1/+4
| | | | | | | To check some valid usage requirements. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv: add some assertions in vkCmdSetViewport()Samuel Pitoiset2017-09-201-1/+4
| | | | | | | To check some valid usage requirements. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv: inline radv_flush_compute_state() into radv_dispatch()Samuel Pitoiset2017-09-201-11/+7
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv: add radv_dispatch() helperSamuel Pitoiset2017-09-201-15/+14
| | | | | | | To share common dispatch compute code. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv: add radv_emit_dispatch_packets() helperSamuel Pitoiset2017-09-201-103/+149
| | | | | | | To share common dispatch compute code. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* ac/surface: handle S8 on gfx9Dave Airlie2017-09-201-2/+7
| | | | | | | | | | | | If we don't have a depth piece, we don't get a correct swizzle mode and we hit an assert in addrlib. In case of no depth get the preferrred swizzle mode for stencil alone. Reviewed-by: Marek Olšák <[email protected]> Cc: "17.2" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* egl: fix build fallouts from 1d0be5b3fe5Krzysztof Sobiecki2017-09-192-2/+2
| | | | | Fixes: 1d0be5b3fe5 ("wayland-drm: constify the callbacks struct") Reviewed-by: Emil Velikov <[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]>
* egl: use switch statements over if/else chainEmil Velikov2017-09-191-31/+28
| | | | | | | Shorter, explicit and consistent with the rest of the co debase. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* egl: remove unneeded braces around since line if statementsEmil Velikov2017-09-191-9/+5
| | | | | Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* egl: simplify _eglDebugReport* APIEmil Velikov2017-09-193-49/+14
| | | | | | | | | | | | | | Instead of having three, almost identical but not quite, _eglDebugReport* functions, simply fold them into one. While doing so drop the unnecessary arguments 'command' and 'objectLabel'. Former is identical to funcName, while the latter is already stored (yet unused) in _EGLThreadInfo::CurrentObjectLabel. Cc: Kyle Brenneman <[email protected]> Cc: Adam Jackson <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> (IRC)
* egl: use _eglError's 'msg' as an actual message in EGL_KHR_debugEmil Velikov2017-09-191-1/+1
| | | | | | | | | | | | | | | | Seemingly, the original intent behind _eglError's 'msg' was aimed to provide a function name. At some point, people started using it the way EGL_KHR_debug's callback() message is meant to be used. Aka providing meaningful information to the developer/user. Swap the funcName/msg argument order in the _eglDebugReport() call. The 'funcName' variable is implicitly set, props to the _eglSetFuncName() call at the start of each public entrypoint. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* automake: adjust wayland-drm commentEmil Velikov2017-09-191-1/+1
| | | | | | | | Vulkan does not depend on the library or any of the objects created in the process. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
* configure.ac: split the wayland client/server confusionEmil Velikov2017-09-197-11/+13
| | | | | | | | | | | | | | | | | | | | 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]>
* wayland-drm: constify the callbacks structEmil Velikov2017-09-192-11/+7
| | | | | Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
* wayland-drm: add wl_display/wl_resource forward declarationsEmil Velikov2017-09-191-0/+2
| | | | | | | ... making the header self-contained. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
* configure.ac: define WL_HIDE_DEPRECATED at global scaleEmil Velikov2017-09-191-2/+0
| | | | | | | | | | | | | | | Due to GCC feature described in previous commit, the expected deprecation warnings may be missing. Set the WL_HIDE_DEPRECATED macro which will omit the deprecated functionality, resulting in more distinct build issues. That is safe since the symbols guarded within the macro is static. Signed-off-by: Emil Velikov <[email protected]> Suggested-by: Pekka Paalanen <[email protected]> Acked-by: Pekka Paalanen <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
* wayland-drm: avoid deprecated use of struct wl_resourceMicah Fedke2017-09-191-3/+3
| | | | | | | | | | | | | | | | | | | Wayland v1.2 with commit 1488c96a5db ("Add accessor functions for wl_resource and deprecate wl_client_add_resource") paves the way towards making wl_resource opaque. Namely, new helpers were introduced and the struct was annotated as deprecated. Since wayland headers are normally installed in /usr/include, which is in -isystem, GCC did not generate warnings as documented in the manual. "Warnings from system headers are normally suppressed..." Signed-off-by: Micah Fedke <[email protected]> Reviewed-by: Pekka Paalanen <[email protected]> [Emil Velikov: add commit message] Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
* wayland-drm: remove unused wayland_drm_buffer_get_{format,buffer}Emil Velikov2017-09-192-18/+0
| | | | | | | | | | | Unused anywhere throughout the codebase. We could start using it, although that contradicts to an evil plan* of mine. * Only wayland servers will make use of the static library, providing actual distinction between server vs client. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Daniel Stone <[email protected]>