aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* nir/serialize: Prevent writing uninitialized state_slot dataConnor Abbott2019-03-111-5/+14
| | | | | | | | The nir_state_slot struct had some padding that was never initialized. Serializing the individual parts of the struct is more robust and avoids the overhead of zeroing it at creation, so just do that. Reviewed-by: Jason Ekstrand <[email protected]>
* anv: release memory allocated by glsl types during spirv_to_nirTapani Pälli2019-03-111-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Fixes leaks for each glsl_type generated: ==32470== 384 bytes in 3 blocks are possibly lost in loss record 18 of 18 ==32470== at 0x483880B: malloc (vg_replace_malloc.c:309) ==32470== by 0x4C43F4A: ralloc_size (ralloc.c:119) ==32470== by 0x4C44014: rzalloc_size (ralloc.c:151) ==32470== by 0x4C44258: rzalloc_array_size (ralloc.c:215) ==32470== by 0x4D38957: glsl_type::glsl_type(glsl_struct_field const*, unsigned int, char const*) (glsl_types.cpp:114) ==32470== by 0x4D3BEED: glsl_type::get_struct_instance(glsl_struct_field const*, unsigned int, char const*) (glsl_types.cpp:1146) ==32470== by 0x4D42ECC: glsl_struct_type (nir_types.cpp:501) ==32470== by 0x4CDB5A1: vtn_handle_type (spirv_to_nir.c:1269) ==32470== by 0x4CE53DD: vtn_handle_variable_or_type_instruction (spirv_to_nir.c:4018) ==32470== by 0x4CD8CFF: vtn_foreach_instruction (spirv_to_nir.c:365) ==32470== by 0x4CE5E6B: spirv_to_nir (spirv_to_nir.c:4490) ==32470== by 0x497AF10: anv_shader_compile_to_nir (anv_pipeline.c:173) v2: move release call to vkDestroyInstance Signed-off-by: Tapani Pälli <[email protected]> Cc: [email protected] Reviewed-by: Lionel Landwerlin <[email protected]>
* wsi/x11: use WSI_FROM_HANDLE() instead of pointer castsEric Engestrom2019-03-111-1/+2
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* wsi/wayland: fix pointer casting warning on 32bitEric Engestrom2019-03-111-1/+2
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* wsi/display: s/#if/#ifdef/ to fix -WundefEric Engestrom2019-03-111-1/+1
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* wsi: deduplicate get_current_time() functions between display and x11Eric Engestrom2019-03-114-24/+18
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* anv: release memory allocated by bo_heap when descriptor pool is destroyedTapani Pälli2019-03-111-0/+2
| | | | | | | | | | | | | | | Fixes following leak: ==21853== 32 bytes in 1 blocks are definitely lost in loss record 2 of 20 ==21853== at 0x483AB1A: calloc (vg_replace_malloc.c:762) ==21853== by 0x4C4DD7F: util_vma_heap_free (vma.c:221) ==21853== by 0x4C4D647: util_vma_heap_init (vma.c:46) ==21853== by 0x4957B9F: anv_CreateDescriptorPool (anv_descriptor_set.c:578) Fixes: c520f4dec9cb ("anv: Add a concept of a descriptor buffer") Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv: destroy descriptor sets when pool gets destroyedTapani Pälli2019-03-112-0/+18
| | | | | | | | | | | | | | | | | | | | | | | Patch maintains a list of sets in the pool and destroys possible remaining sets when pool is destroyed. As stated in Vulkan spec: "When a pool is destroyed, all descriptor sets allocated from the pool are implicitly freed and become invalid." This fixes memory leaks spotted with valgrind: ==19622== 96 bytes in 1 blocks are definitely lost in loss record 2 of 3 ==19622== at 0x483880B: malloc (vg_replace_malloc.c:309) ==19622== by 0x495B67E: default_alloc_func (anv_device.c:547) ==19622== by 0x4955E05: vk_alloc (vk_alloc.h:36) ==19622== by 0x4956A8F: anv_multialloc_alloc (anv_private.h:538) ==19622== by 0x4956A8F: anv_CreateDescriptorSetLayout (anv_descriptor_set.c:217) Fixes: 14f6275c92f1 ("anv/descriptor_set: add reference counting for descriptor set layouts") Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv: add support for dumping shader info via VK_EXT_debug_reportTimothy Arceri2019-03-112-12/+39
| | | | | | This information will be used by the vkpipeline-db tool. Reviewed-by: Jason Ekstrand <[email protected]>
* iris: Fix backface stencil write conditionKenneth Graunke2019-03-101-1/+1
| | | | A bit too much search and replace here.
* panfrost/drm: Cast pointer to u64 to fix warningAlyssa Rosenzweig2019-03-101-1/+1
| | | | Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Add backend targeting the DRM driverTomeu Vizoso2019-03-108-74/+466
| | | | | | | | | | | | | | | | | | | This backend interacts with the new DRM driver for Midgard GPUs which is currently in development. When using this backend, Panfrost has roughly on-par functionality as when using the non-DRM driver from Arm. Alyssa Rosenzweig: To do so, we implement additional routines for runtime GPU version detection and fencing. We cleanup some duplicate code interfering with the new driver. We fix a long-standing memory leak which is aggravated on the new driver. Finally, we implement BO import/export in a way compatible with the new driver. These changes are squashed to preserve bisectability given the hard-to-track ABI shifts in the nondrm module Signed-off-by: Tomeu Vizoso <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Add gem_handle to panfrost_memory and panfrost_boTomeu Vizoso2019-03-102-0/+3
| | | | | | | It will be used by the DRM backend to store GEM handles from the kernel. Signed-off-by: Tomeu Vizoso <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]>
* freedreno/a6xx: more bcolor fixesRob Clark2019-03-101-2/+2
| | | | | | | | | | | | | | Non-zero offset wasn't working, which breaks a bunch of dEQP-GLES31.functional.texture.border_clamp.formats.* when doing sharded deqp runs (because order of tests changes, resulting in different texture state bound.. deqp doesn't really clean up it's gl state between tests very well) Previously, if additional textures were bound, due to using too small of a bcolor_entry size, the last 32bytes of the bcolor_entry would be overwritten. Signed-off-by: Rob Clark <[email protected]>
* panfrost: move #include to fix compilationEric Engestrom2019-03-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | In standalone.h, the struct gl_context type is not declared by #includ'ing mtypes.h: In file included from src/gallium/drivers/panfrost/midgard/cmdline.c:24: src/compiler/glsl/standalone.h:46:14: warning: ‘struct gl_context’ declared inside parameter list will not be visible outside of this definition or declaration struct gl_context *ctx); ^~~~~~~~~~ This causes the following compilation failure: src/gallium/drivers/panfrost/midgard/cmdline.c: In function ‘compile_shader’: src/gallium/drivers/panfrost/midgard/cmdline.c:58:61: error: passing argument 4 of ‘standalone_compile_shader’ from incompatible pointer type [-Werror=incompatible-pointer-types] prog = standalone_compile_shader(&options, 2, argv, &local_ctx); ^~~~~~~~~~ In file included from src/gallium/drivers/panfrost/midgard/cmdline.c:24: src/compiler/glsl/standalone.h:43:28: note: expected ‘struct gl_context *’ but argument is of type ‘struct gl_context *’ struct gl_shader_program * standalone_compile_shader( ^~~~~~~~~~~~~~~~~~~~~~~~~ Fixes: e67e0726372ab65f4104 "panfrost: Implement Midgard shader toolchain" Cc: Alyssa Rosenzweig <[email protected]> Signed-off-by: Eric Engestrom <[email protected]>
* panfrost: fix tgsi_to_nir() callEric Engestrom2019-03-091-1/+1
| | | | | | | Bug: https://bugs.freedesktop.org/show_bug.cgi?id=109945 Fixes: 7da251fc721360fc28b9 "panfrost: Check in sources for command stream" Cc: Alyssa Rosenzweig <[email protected]> Signed-off-by: Eric Engestrom <[email protected]>
* Revert "d3dadapter9: Support software renderer on any DRI device"Axel Davy2019-03-091-20/+8
| | | | | | | | This reverts commit 0d0847659385e298badd6ef6ca4d0a9e537ae288. It makes gitlab's travis fail. Revert until patch is fixed. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Change a few advertised capsAxel Davy2019-03-091-3/+3
| | | | | | | | | | | | | | | | | | | Most hw on the native platform advertise these caps this way. D3DCAPS_READ_SCANLINE: We don't really have hardware support for that, but many games don't even check the flag, and expect GetRasterStatus to work, which is why we emulated it with a timer (like wine). So we may as well advertise the cap. D3DCURSORCAPS_LOWRES: I don't know what is the status of this on X11, but I don't know of any dx9 game running at height < 400 either. D3DPTEXTURECAPS_TEXREPEATNOTSCALEDBYSIZE: The cap should correspond to what the current generation of hw is doing. Signed-off-by: Axel Davy <[email protected]> Reviewed-by: Patrick Rudolph <[email protected]>
* st/nine: Do not advertise CANMANAGERESOURCEAxel Davy2019-03-091-1/+1
| | | | | | | It doesn't seem the main vendors advertise it. Signed-off-by: Axel Davy <[email protected]> Reviewed-by: Patrick Rudolph <[email protected]>
* st/nine: Do not advertise support for D15S1 and D24X4S4Axel Davy2019-03-091-2/+2
| | | | | | | | | | | The former is supported on Matrox cards but no other hw. The latter isn't supported anywhere. It is fine to not advertise them as supported, and it could prevent apps to trigger weird rendering paths. Signed-off-by: Axel Davy <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* d3dadapter9: Support software renderer on any DRI devicePatrick Rudolph2019-03-091-8/+20
| | | | | | | | | | | | If D3D_ALWAYS_SOFTWARE is set for debugging purposes, run on any DRI enabled platform. Instead of probing for a compatible gallium driver (which might fail if there's none) always use the KMS DRI software renderer. Allows to run nine on i915 when D3D_ALWAYS_SOFTWARE=1. Signed-off-by: Patrick Rudolph <[email protected]> Reviewed-by: Axel Davy <[email protected]>
* st/nine: Disable depth write when nothing gets updatedAxel Davy2019-03-091-1/+4
| | | | | | | | | | | I do not see any perf impact on radeonsi, but it seems iris needs this. It seems something sensible to do. Signed-off-by: Axel Davy <[email protected]> Reviewed-by: Timur Kristóf <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Tested-by: Andre Heider <[email protected]>
* virgl: Return an error if we use fp64 on top of GLESElie Tournier2019-03-091-0/+13
| | | | | Signed-off-by: Elie Tournier <[email protected]> Reviewed-by: <Gurchetan Singh [email protected]>
* virgl: Set PIPE_CAP_DOUBLES when running on GLES This is a lie but no known ↵Elie Tournier2019-03-091-1/+2
| | | | | | | app use fp64. Signed-off-by: Elie Tournier <[email protected]> Reviewed-by: <Gurchetan Singh [email protected]>
* virgl: Add a caps to advertise GLES backendElie Tournier2019-03-091-0/+1
| | | | | Signed-off-by: Elie Tournier <[email protected]> Reviewed-by: <Gurchetan Singh [email protected]>
* Revert MR 369 (Fix extract_i8 and extract_u8 for 64-bit integers)Kenneth Graunke2019-03-091-24/+10
| | | | | | | This broke piles of image load store tests (179 failures on CI, mesa_master build #15546, previous build right before this landed was green). I'd rather not leave the tree on fire over the weekend, so let's revert for now, and we can figure out what happened next week.
* nir/algebraic: Add missing 16-bit extract_[iu]8 patternsIan Romanick2019-03-081-0/+3
| | | | | | | | | | No shader-db changes on any Intel platform. v2: Use a loop to generate patterns. Suggested by Jason. Reviewed-by: Matt Turner <[email protected]> [v1] Reviewed-by: Dylan Baker <[email protected]> Acked-by: Jason Ekstrand <[email protected]>
* nir/algebraic: Add missing 64-bit extract_[iu]8 patternsIan Romanick2019-03-081-0/+3
| | | | | | | | | | No shader-db changes on any Intel platform. v2: Use a loop to generate patterns. Suggested by Jason. Reviewed-by: Matt Turner <[email protected]> [v1] Reviewed-by: Dylan Baker <[email protected]> Acked-by: Jason Ekstrand <[email protected]>
* nir/algebraic: Remove redundant extract_[iu]8 patternsIan Romanick2019-03-081-14/+4
| | | | | | | | No shader-db changes on any Intel platform. Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Dylan Baker <[email protected]> Acked-by: Jason Ekstrand <[email protected]>
* nir/algebraic: Fix up extract_[iu]8 after loop unrollingIan Romanick2019-03-081-2/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | Skylake, Broadwell, and Haswell had similar results. (Skylake shown) total instructions in shared programs: 15256840 -> 15256837 (<.01%) instructions in affected programs: 4713 -> 4710 (-0.06%) helped: 3 HURT: 0 helped stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1 helped stats (rel) min: 0.06% max: 0.08% x̄: 0.06% x̃: 0.06% total cycles in shared programs: 372286583 -> 372286583 (0.00%) cycles in affected programs: 198516 -> 198516 (0.00%) helped: 1 HURT: 1 helped stats (abs) min: 10 max: 10 x̄: 10.00 x̃: 10 helped stats (rel) min: <.01% max: <.01% x̄: <.01% x̃: <.01% HURT stats (abs) min: 10 max: 10 x̄: 10.00 x̃: 10 HURT stats (rel) min: 0.01% max: 0.01% x̄: 0.01% x̃: 0.01% No changes on any other Intel platform. v2: Use a loop to generate patterns. Suggested by Jason. Reviewed-by: Matt Turner <[email protected]> [v1] Reviewed-by: Dylan Baker <[email protected]> Acked-by: Jason Ekstrand <[email protected]>
* anv/pipeline: Move lower_explicit_io much laterJason Ekstrand2019-03-081-3/+5
| | | | | | | | | Now that nir_opt_copy_prop_vars can properly handle array derefs on vectors, it's safe to move UBO and SSBO lowering to late in the pipeline. This should allow NIR to actually start optimizing SSBO access. Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
* intel/nir: Move lower_mem_access_bit_sizes to postprocess_nirJason Ekstrand2019-03-081-2/+1
| | | | | | | | | It doesn't really matter where this pass goes as long as it's after we call nir_lower_explicit_io and before we go into the back-end. Putting it brw_postprocess_nir lets us move nir_lower_explicit_io significantly later in the pipeline. Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
* freedreno/ir3: turn on [iu]mul_highRob Clark2019-03-081-0/+4
| | | | | | | | | | Which also requires uadd_carry lowering Until recently this was lowered in glsl ir so it went unnoticed that we weren't lowering it. Fixes: 1d8994a63b5 glsl: [u/i]mulExtended optimization for GLSL Signed-off-by: Rob Clark <[email protected]>
* freedreno/ir3: fix ir3_cmdline harderRob Clark2019-03-081-2/+2
| | | | | | Fixes: 45271702ec9 freedreno: fix ir3_cmdline build Fixes: 7530d4abfcf glsl/freedreno/panfrost: pass gl_context to the standalone compiler Signed-off-by: Rob Clark <[email protected]>
* st/dri: Set the PIPE_BIND_SHARED flag on create_image_with_modifiers.Eric Anholt2019-03-081-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | With createImage(), the caller was expected to set a SHARED flag if they needed the ability to get a GEM handle. DRI3, wayland, and gbm all set it, EGL_MESA_drm_image passes it through, and surfaceless doesn't need it because there's no way to request a handle. With the new createImageWithModifiers() DRI method to replace it, the expectation is that you'll always be able to share the buffer, so the flag is unnecessary in its arguments. However, we do need to tell gallium about this expectation. Without this, kmscube's modifiers path using gbm_bo_create_with_modifiers(&modifier, 1) instead of gbm_bo_create(SCANOUT | SHARED) will call the driver's resource_create() function wtih PIPE_BIND_SHARED unset, so the driver (particularly renderonly drivers) may allocate in such a way that it can't return an answer from gbm_bo_get_handle(). I used to have a hack in v3d using count==1 && modifier==LINEAR to indicate that you wanted SHARED anyway, but that was dropped recently. Fixes: 59527a36e975 ("v3d: Restructure RO allocations using resource_from_handle.") Reviewed-by: Kristian H. Kristensen <[email protected]>
* iris: Use copy_region and staging resources to avoid transfer stallsKenneth Graunke2019-03-084-14/+161
| | | | | | | | | | | | This is similar to intel_miptree_map_blit and intel_buffer_object.c's temporary blits in i965. Improves performance of DiRT Rally by 20-25% by eliminating stalls. Breaks piglit's spec/arb_shader_image_load_store/host-mem-barrier, by using the GPU to do uploads, exposing a st/mesa issue where it doesn't give us memory_barrier() calls. This is a pre-existing issue and will be fixed by a later patch (currently out for review).
* prog_to_nir: fix write from vps to FOGKarol Herbst2019-03-081-1/+7
| | | | | | | | | | | for fragment programs we already treat fog as a single component value, but for vp we didn't. Fixes fog related piglit tests with my out of tree Nouveau nir patches. Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* iris: Track last VS URB entry sizeSagar Ghuge2019-03-083-0/+11
| | | | | | | | | | | | Return immediately if last VS URB entry size is good enough for BLORP operation v2: Fix comments (Caio) Signed-off-by: Sagar Ghuge <[email protected]> Suggested-by: Kenneth Graunke<[email protected]> Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* iris: Refactor code to share 3DSTATE_URB_* packetSagar Ghuge2019-03-083-59/+60
| | | | | | | | | | v2: 1) Set IRIS_DIRTY_URB bit (Caio) 2) Get rid of unnecessary function (Caio) Signed-off-by: Sagar Ghuge <[email protected]> Suggested-by: Caio Marcelo de Oliveira Filho <[email protected]> Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glx/meson: use full include path for dri_interface.hEric Engestrom2019-03-085-6/+5
| | | | | | | | | | | | Everything else uses `#include "GL/internal/dri_interface.h"` instead, and this full path was even already used in other parts of GLX. While at it, nothing uses `inc_gl_internal` anymore so let's remove it as well. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]> Tested-by: Clayton Craft <[email protected]>
* hgl/meson: drop unused include directoryEric Engestrom2019-03-081-1/+1
| | | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]> Tested-by: Clayton Craft <[email protected]>
* intel/compiler: silence unitialized variable warning in opt_vector_float()Brian Paul2019-03-081-1/+1
| | | | Reviewed-by: Lionel Landwerlin <[email protected]>
* intel/decoders: silence uninitialized variable warnings in gen_print_batch()Brian Paul2019-03-081-2/+2
| | | | Reviewed-by: Lionel Landwerlin <[email protected]>
* st/mesa: init hash keys with memset(), not designated initializersBrian Paul2019-03-082-5/+17
| | | | | | | | | | Since the compiler may not zero-out padding in the object. Add a couple comments about this to prevent misunderstandings in the future. Fixes: 67d96816ff5 ("st/mesa: move, clean-up shader variant key decls/inits") Reviewed-by: Roland Scheidegger <[email protected]>
* r600: cast pointer to expected typeEric Engestrom2019-03-081-2/+2
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-By: Gert Wollny <[email protected]>
* autotools: don't build libGLES*.so with GLVNDEric Engestrom2019-03-081-2/+8
| | | | | | | | | | | | GLVND already provides these, so distro packagers have been deleting them all along. Let's save ourselves the trouble and not build them in the first place. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Dylan Baker <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* meson: don't build libGLES*.so with GLVNDEric Engestrom2019-03-081-5/+7
| | | | | | | | | | | | GLVND already provides these, so distro packagers have been deleting them all along. Let's save ourselves the trouble and not build them in the first place. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Dylan Baker <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* pipebuffer: s/PB_ALL_USAGE_FLAGS/PB_USAGE_ALL/Brian Paul2019-03-081-1/+1
| | | | | | | To fix build failure. I guess my meson configuration has assertions disabled for some reason. Trivial fix.
* svga: remove SVGA_RELOC_READ flag in SVGA3D_BindGBSurface()Brian Paul2019-03-081-1/+1
| | | | | | | | | | This fixes a rendering issue where UBO updates aren't always picked up by drawing calls. This issue effected the Webots robotics simulator. VMware bug 2175527. Testing Done: Webots replay, piglit, misc Linux games Reviewed-by: Thomas Hellstrom <[email protected]>
* svga: refactor draw_vgpu10() functionBrian Paul2019-03-081-105/+141
| | | | | | | The draw_vgpu10() function was huge. Move the code for preparing the vertex buffers and the index buffer into separate functions. Reviewed-by: Neha Bhende <[email protected]>