summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* mesa: add support for glMapNamedBufferRangeEXT()Timothy Arceri2019-06-285-14/+48
| | | | | Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* mesa: add support for glNamedBufferStorageEXTTimothy Arceri2019-06-285-0/+27
| | | | | | | | This is available in ARB_buffer_storage when EXT_direct_state_access is present. Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* mesa: add support for glNamedBuffer*DataEXT()Timothy Arceri2019-06-285-3/+57
| | | | | Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* mesa: add support for glBindMultiTextureEXTTimothy Arceri2019-06-285-11/+47
| | | | | Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* mesa: delete framebuffer texture attachment sampler viewsPierre-Eric Pelloux-Prayer2019-06-281-0/+15
| | | | | | | | | | | | | | | | | | | | | When a context is destroyed the destroy_tex_sampler_cb makes sure that all the sampler views created by that context are destroyed. This is done by walking the ctx->Shared->TexObjects hash table. In a multiple context environment the texture can be deleted by a different context, so it will be removed from the TexObjects table and will prevent the above mechanism to work. This can result in an assertion in st_save_zombie_sampler_view because the sampler_view owns a reference to a destroyed context. This issue occurs in blender 2.80. This commit fixes this by explicitly releasing sampler_view created by the destroyed context for all texture attachments. Fixes: 593e36f956 (st/mesa: implement "zombie" sampler views (v2)) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110944 Signed-off-by: Marek Olšák <[email protected]>
* meson: GNU/kFreeBSD has DRM/KMS and requires -D_GNU_SOURCEJames Clarke2019-06-281-2/+2
| | | | | | | This is a regression from the old autotools build system. Acked-by: Eric Engestrom <[email protected]> Acked-by: Dylan Baker <[email protected]>
* gallium/u_transfer_helper: Don't leak a reference to the resource.Kenneth Graunke2019-06-281-0/+2
| | | | | | | We pipe_resource_reference when handling transfers in map, we need to do a corresponding unreference in unmap. Reviewed-by: Michel Dänzer <[email protected]>
* meson: only add empty lines betwen active summary sectionsEric Engestrom2019-06-281-3/+3
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* meson: bump required libdrm version to 2.4.81Eric Engestrom2019-06-281-1/+1
| | | | | | | | | | | | | | | | | dbb4457d9858fa977246 started using drmDevicesEqual(), which was introduced in libdrm 2.4.81 We could either copy the function locally, or bump the required version. Since the function is non-trivial and 2.4.81 is old enough already, I suggesting the latter. Fixes: dbb4457d9858fa977246 ("egl: add EGL_EXT_device_drm support") Cc: Emil Velikov <[email protected]> Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* ac: change ac_query_gpu_info() signatureEmil Velikov2019-06-282-4/+3
| | | | | | | | | | | | | | | | | | | | | | Currently libdrm_amdgpu provides a typedef of the various handles. While the goal was to make those opaque, it effectively became part of the API To the best of my knowledge there are two ways to have opaque handles: - "typedef void *foo;" - rather messy IMHO - "stuct foo;" and use "struct foo *" through the API In our case amdgpu_device_handle is used only internally, plus respective code is not used or applicable for r300 and r600. Hence we copied the typedef. Seemingly this will be a problem since libdrm_amdgpu wants to change the API, while not updating the code(?). Either way, we can safely s/amdgpU_device_handle/void */ and carry on. Cc: Michel Dänzer <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Marek Olšák <marek.olsak at amd.com>
* panfrost: Only tag AFBC addresses when samplingTomeu Vizoso2019-06-282-7/+8
| | | | | | | | | Rendering to AFBC was broken, as the HW will complaint loudly if we pass a tagged pointer in bifrost_render_target. Signed-off-by: Tomeu Vizoso <[email protected]> Fixes: 3609b50a6443 ("panfrost: Merge AFBC slab with BO backing") Reviewed-by: Alyssa Rosenzweig <[email protected]>
* gallivm: Improve lp_build_rcp_refine.Jose Fonseca2019-06-281-6/+6
| | | | | | | | | | | Use the alternative more accurate expression from https://en.wikipedia.org/wiki/Division_algorithm#Newton%E2%80%93Raphson_division v2: Use lp_build_fmuladd as suggested by Roland Tested by enabling this code path, and running lp_test_arit. Reviewed-by: Roland Scheidegger <[email protected]>
* panfrost/ci: Don't error out on RK3288Tomeu Vizoso2019-06-281-1/+3
| | | | | | | | | | | At the moment we don't have enough people to ensure that RK3288 is regression-free, so don't fail the CI in that case. For now we'll focus on not regressing on RK3399 and we can expand to other SoCs as more people join the effort. Signed-off-by: Tomeu Vizoso <[email protected]> Suggested-by: Alyssa Rosenzweig <[email protected]>
* panfrost/ci: Don't print every kernel fileTomeu Vizoso2019-06-282-2/+2
| | | | | | | | As there's lots of them and Gitlab struggles rendering logs with so many lines. Signed-off-by: Tomeu Vizoso <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]>
* panfrost/ci: Fix the image nameTomeu Vizoso2019-06-281-5/+5
| | | | | | | | These changes will make sure we get the right image from the container registry. Signed-off-by: Tomeu Vizoso <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]>
* panfrost/ci: Remove batchingTomeu Vizoso2019-06-281-7/+2
| | | | | | | Panfrost has grown and doesn't leak as much as before. Signed-off-by: Tomeu Vizoso <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]>
* iris: Don't leak resources in iris_create_surface for incomplete FBOsKenneth Graunke2019-06-281-19/+19
| | | | | | We were failing to pipe_resource_unreference on the failure path due to a non-renderable format. Instead of fixing this, just move the checks earlier, before we even bother with refcounting or calloc.
* radv: only enable VK_AMD_gpu_shader_{half_float,int16} on GFX9+Samuel Pitoiset2019-06-281-2/+2
| | | | | | | | | | | | | | These two extensions are supported on GFX8 but the throughput of 16-bit floats/integers is same as 32-bit. Also, shaderInt16 is only enabled on GFX9+ for the same reason, be more consistent. This fixes a crash with Wolfenstein II because it expects shaderInt16 to be enabled when VK_AMD_gpu_shader_half_float is exposed. Note that AMDVLK only enables these extensions on GFX9+. Cc: 19.1 <[email protected]> Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: add si_emit_ia_multi_vgt_param() helperSamuel Pitoiset2019-06-281-9/+25
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* virgl: Don't allow creating staging pipe_resourcesAlexandros Frantzis2019-06-283-24/+8
| | | | | | | | Staging buffers are now created directly by the virgl_staging_mgr. We don't need to support creating staging pipe_resources. Signed-off-by: Alexandros Frantzis <[email protected]> Reviewed-by: Chia-I Wu <[email protected]>
* virgl: Use virgl_staging_mgrAlexandros Frantzis2019-06-286-57/+34
| | | | | | | | | | Use an instance of virgl_staging_mgr instead of u_upload_mgr to handle the staging buffer. This removes the need to track the availability of the staging manager, since virgl_staging_mgr can handle concurrent active allocations. Signed-off-by: Alexandros Frantzis <[email protected]> Reviewed-by: Chia-I Wu <[email protected]>
* virgl: Add tests for virgl_staging_mgrAlexandros Frantzis2019-06-283-0/+424
| | | | | Signed-off-by: Alexandros Frantzis <[email protected]> Reviewed-by: Chia-I Wu <[email protected]>
* virgl: Introduce virgl_staging_mgrAlexandros Frantzis2019-06-284-0/+230
| | | | | | | | | | | | | | | Add a manager for the staging buffer used in virgl. The staging manager is heavily inspired by u_upload_mgr, but is simpler and is a better fit for virgl's purposes. In particular, the staging manager: * Allows concurrent staging allocations. * Calls the virgl winsys directly to create and map resources, avoiding unnecessarily going through gallium resources and transfers. olv: make virgl_staging_alloc_buffer return a bool Signed-off-by: Alexandros Frantzis <[email protected]> Reviewed-by: Chia-I Wu <[email protected]>
* virgl: Store the virgl_hw_res for copy transfersAlexandros Frantzis2019-06-286-10/+19
| | | | | | | | | Store the virgl_hw_res instead of the pipe_resource for copy transfer sources. This prepares the codebase for a change to provide only the virgl_hw_res for the staging buffers in upcoming commits. Signed-off-by: Alexandros Frantzis <[email protected]> Reviewed-by: Chia-I Wu <[email protected]>
* iris: Fix major resource leak in iris_set_shader_imagesKenneth Graunke2019-06-271-3/+1
| | | | | | We were failing to unreference the old image resource. Instead of open coding this and doing it badly, just use the copier function which does the right thing.
* gallium: Make util_copy_image_view handle shader_accessKenneth Graunke2019-06-271-0/+2
| | | | | | | | | A while back, we added a new field, but failed to update the copier. I believe iris is the only current user of the new field, and it hasn't used the copier, so noone noticed. Fixes: 8b626a22b24 st/mesa: Record shader access qualifiers for images Reviewed-by: Timothy Arceri <[email protected]>
* gallium: Teach GALLIUM_REFCNT_LOG about array texturesKenneth Graunke2019-06-271-0/+9
| | | | | | | Otherwise they are classified as pipe_martian_resource, and don't contain any helpful information about the texture. Reviewed-by: Eric Anholt <[email protected]>
* isl: Don't align phys_level0_sa by block dimensionNanley Chery2019-06-272-31/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Aligning phys_level0_sa by the compression block dimension prior to mipmap layout causes the layout of compressed surfaces to differ from the sampler's expectations in certain cases. The hardware docs agree: From the BDW PRM, Vol. 5, Compressed Mipmap Layout, The compressed mipmaps are stored in a similar fashion to uncompressed mipmaps [...] The following exceptions apply to the layout of compressed (vs. uncompressed) mipmaps: * [...] * The dimensions of the mip maps are first determined by applying the sizing algorithm presented in Non-Power-of-Two Mipmaps above. Then, if necessary, they are padded out to compression block boundaries. The last bullet indicates that alignment should not be done for calculating a miplevel's dimensions, but rather for determining miplevel placement/padding. Comply with this text by removing the extra alignment. Fixes some fbo-generatemipmap-formats piglit failures on all tested platforms (SNB-KBL). v2: - Note fixed platforms. - Update some consumers via a helper function. Cc: <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* intel: Add and use helpers for level0 extentNanley Chery2019-06-274-21/+39
| | | | | | | | | | | | | Prepare for a bug fix by adding and using helpers which convert isl_surf::logical_level0_px and isl_surf::phys_level0_sa to units of surface elements. v2: - Update iris (Ken). - Update anv. Cc: <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* meson: try to use cmake as a finder for clangDylan Baker2019-06-271-16/+27
| | | | | | | | | | | | | Clang (like LLVM), very annoyingly refuses to provide pkg-config, and only provides cmake (unlike LLVM which at least provides llvm-config, even if llvm-config is terrible). Meson has gained the ability to use cmake to find dependencies, and can successfully find Clang. This change attempts to use cmake to find clang instead of a bunch of library searches, when paired with -Dcmake_prefix_path we can much more reliably use cmake to control which clang we're getting. This is only enabled for meson >= 0.51, which adds the required options. Reviewed-by: Eric Engestrom <[email protected]>
* meson: Add support for using cmake for finding LLVMDylan Baker2019-06-274-13/+32
| | | | | | | | | | | | | | | | Meson has support for using cmake as a finder for some dependencies, including LLVM. Using cmake has a lot of advantages: it needs less meson maintenance to keep working (even for llvm updates); it works more sanely for cross compiles (as llvm-config is a compiled binary not a shell script). Meson 0.51.0 also has a new generic variable getter that can be used to get information from either cmake, pkg-config, or config-tools dependencies, which is needed for cmake. We continue to support using llvm-config if you don't have cmake installed, or if cmake cannot find a suitable version. Fixes: 0d59459432cf077d768164091318af8fb1612500 ("meson: Force the use of config-tool for llvm") Reviewed-by: Eric Engestrom <[email protected]>
* iris: Fix memory leak of SO targetsKenneth Graunke2019-06-271-0/+4
| | | | We need to pitch these on context destroy.
* iris: Fix memory leak for draw parameter resourcesKenneth Graunke2019-06-271-0/+3
| | | | Need to pitch these on context destroy.
* iris: Drop u_upload_unmapKenneth Graunke2019-06-271-2/+0
| | | | We use persistent maps so this does nothing.
* intel/compiler: fix derivative on y axis implementationLionel Landwerlin2019-06-271-21/+5
| | | | | | | | | | | | | | | This rewrites the ddy in EXECUTE_4 mode with a loop to make it more obvious what is going on and also sets the group each of the 4 threads in the groups are supposed to execute. Fixes the following CTS tests : dEQP-VK.glsl.derivate.dfdyfine.dynamic_* Signed-off-by: Lionel Landwerlin <[email protected]> Co-Authored-by: Jason Ekstrand <[email protected]> Reviewed-by: Matt Turner <[email protected]> Fixes: 2134ea380033d5 ("intel/compiler/fs: Implement ddy without using align16 for Gen11+")
* meson: set up a proper internal dependency for xmlconfigEric Engestrom2019-06-275-9/+16
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* xmlconfig: add missing #includeEric Engestrom2019-06-271-0/+3
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* xmlpool: fix typo in commentEric Engestrom2019-06-271-2/+2
| | | | | | | | s/otions/options/, and while here let's give the full path to xmlpool.h since `../` won't be true in the generated file. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* iris: Also properly restore INTERFACE_DESCRIPTOR_DATA buffer objectKenneth Graunke2019-06-272-4/+10
| | | | | We were at least cleaning up this reference, but we were failing to pin it in iris_restore_compute_saved_bos.
* iris: Fix resource tracking for CS thread ID bufferKenneth Graunke2019-06-272-2/+8
| | | | | | | | | | | | | | | | | | Today, we stream the compute shader thread IDs simply because they're (annoyingly) relative to dynamic state base address. We could upload them once at compile time, but we'd need a separate non-streaming uploader for IRIS_MEMZONE_DYNAMIC, and I'm not sure it's worth it. stream_state pins the buffer for use in the current batch, but also returns a reference to the pipe_resource. We dropped this reference on the floor, leaking a reference basically every time we dispatched a compute shader after switching to a new one. The reason it returns a reference is so that we can hold on to it and re-pin it in iris_restore_compute_saved_bos, which we were also failing to do. So if we actually filled up a batch with repeated dispatches to the same compute shader, and flushed, then continued dispatching, we would fail to pin it and likely GPU hang.
* iris: Only bother with thread ID upload if doing MEDIA_CURBE_LOADKenneth Graunke2019-06-271-13/+13
| | | | | | We were unconditionally uploading the new data, but then conditionally using it with MEDIA_CURBE_LOAD. If we're not going to emit the command, there's no point in uploading the data.
* iris: Do MEDIA_CURBE_LOAD when IRIS_DIRTY_CS is set, not constantsKenneth Graunke2019-06-271-1/+1
| | | | | | We only use push the compute shader thread IDs, not any actual constant buffer data. So we should track the compute shader variant changing, not constbuf changes.
* iris: Drop UBO range stuff from iris_restore_compute_saved_bosKenneth Graunke2019-06-271-24/+0
| | | | Compute doesn't use UBO ranges (annoyingly), so this is dead code.
* iris: Properly align interface descriptor data addressesKenneth Graunke2019-06-271-1/+1
| | | | | | | | MEDIA_INTERFACE_DESCRIPTOR's Interface Descriptor Data Start Address field's docs say: "This bit specifies the 64-byte aligned address..." And we were doing 32. Superfluous thread ID uploading was apparently saving us from GPU hangs in most cases.
* mesa: use a correct function return typeAndrii Simiklit2019-06-272-2/+2
| | | | | | | | v2: standard 'bool' can be used ( Eric Engestrom <[email protected]> ) Reviewed-by: Eric Engestrom <[email protected]> Signed-off-by: Andrii Simiklit <[email protected]>
* panfrost/decode: Mention the address of a few descriptorsTomeu Vizoso2019-06-271-13/+11
| | | | | | | | When the fault_pointer field in the header is set, we can get some idea of which descriptor the HW isn't happy with if we know their addresses. Signed-off-by: Tomeu Vizoso <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]>
* panfrost/decode: Wait for a job to finish before dumpingTomeu Vizoso2019-06-271-2/+4
| | | | | | | | Then we can get some information back about any exception that might have happened. Signed-off-by: Tomeu Vizoso <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]>
* panfrost/decode: Decode exception statusTomeu Vizoso2019-06-271-2/+6
| | | | | | | | Arm's kernel driver mentions how to decode this field, which makes a bit clearer what had happened. Signed-off-by: Tomeu Vizoso <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]>
* panfrost/decode: Print AFBC struct when appropriateTomeu Vizoso2019-06-271-2/+1
| | | | | Signed-off-by: Tomeu Vizoso <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]>
* radv: only export clip/cull distances if PS reads themSamuel Pitoiset2019-06-273-4/+15
| | | | | | | | | | | | | | | | The only exception is the GS copy shader which emits them unconditionally. Totals from affected shaders: SGPRS: 71320 -> 71008 (-0.44 %) VGPRS: 54372 -> 54240 (-0.24 %) Code Size: 2952628 -> 2941368 (-0.38 %) bytes Max Waves: 9689 -> 9723 (0.35 %) This helps Dota2, Doom, GTAV and Hitman 2. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>