summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* swr/rast: Move clip/cull enables in APITim Rowley2017-09-139-40/+40
| | | | | | Moved from from SWR_RASTSTATE to SWR_BACKEND_STATE. Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
* swr/rast: Add new API SwrStallBETim Rowley2017-09-132-0/+17
| | | | | | | | SwrStallBE stalls the backend threads until all work submitted before the stall has finished. The frontend threads can continue to make forward progress. Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
* glsl: compile unused function outEric Engestrom2017-09-131-0/+2
| | | | | | | | | The function is only called from one place, which is hidden behind the same `#ifdef DEBUG`. Fixes: ca73c3358c91434e68ab "glsl: Mark functions static" Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
* radv: compile out unused codeEric Engestrom2017-09-131-0/+2
| | | | Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
* radv: clear push_constant_stages when resetting a command bufferSamuel Pitoiset2017-09-131-0/+1
| | | | | | | | | | | | | | | Per the spec: "Resetting a command buffer is an operation that discards any previously recorded commands and puts a command buffer in the initial state." As far I'm concerned, that flag can be changed by calling VkCmdPushConstants() (or any other functions which update it), so it should be cleared as well. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
* radv: add more radv_emit_XXX() helpers for the dynamic stateSamuel Pitoiset2017-09-131-40/+77
| | | | | Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
* radv: remove useless 'cmd_buffer' param from radv_buffer_view_init()Samuel Pitoiset2017-09-134-7/+5
| | | | | Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
* radv/gfx9: fix image resource handling.Dave Airlie2017-09-131-8/+19
| | | | | | | | | | GFX9 changes how images are layed out, so this needs updating. Fixes: dEQP-VK.query_pool.statistics_query.* Cc: "17.2" <mesa-stable@lists.freedesktop.org> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Signed-off-by: Dave Airlie <airlied@redhat.com>
* radv/ac: bump params array for image atomic comp swapDave Airlie2017-09-131-1/+1
| | | | | | | | | | | | For the comp_swap case this was overflowing and crashing sometimes. Fixes: dEQP-VK.image.atomic_operations.compare_exchange.* Cc: "17.2" <mesa-stable@lists.freedesktop.org> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Signed-off-by: Dave Airlie <airlied@redhat.com>
* radv/gfx9: set mip0-depth correctly for 2d arrays/3d imagesDave Airlie2017-09-131-2/+2
| | | | | | | | | | | | This field covers the whole resource. Fixes: dEQP-VK.pipeline.image.suballocation.sampling_type.combined.view_type.3d.format.* dEQP-VK.texture.filtering.3d.combinations.* Cc: "17.2" <mesa-stable@lists.freedesktop.org> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Signed-off-by: Dave Airlie <airlied@redhat.com>
* radv: handle GFX9 1D texturesDave Airlie2017-09-132-14/+76
| | | | | | | | | | | | As GFX9 can't handle 1D depth textures, radeonsi and apparantly pro just update all 1D textures to 2D, and work around it. This ports the workarounds from radeonsi. Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Cc: "17.2" <mesa-stable@lists.freedesktop.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
* radv: don't use iview for meta image width/height.Dave Airlie2017-09-132-13/+21
| | | | | | | | | | | | Work out the width/height from the level manually, as on GFX9 we won't minify the iview width/height. This fixes: dEQP-VK.api.image_clearing.core.clear_color_image* on gfx9 Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Cc: "17.2" <mesa-stable@lists.freedesktop.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
* 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 <mattst88@gmail.com> Cc: mesa-stable@lists.freedesktop.org
* Revert "winsys/amdgpu: disable local BOs on Raven"Marek Olšák2017-09-121-2/+1
| | | | | | This reverts commit 1cda9a2fee05effd9c64bd773bc6005281593662. It works now.
* radv: Don't allocate CMASK for linear images.Bas Nieuwenhuizen2017-09-121-1/+3
| | | | | | | We can't use it anyway in fast clears, and on GFX9 it seems to actually hange the card if we specify it. Fixes: f4e499ec791 "radv: add initial non-conformant radv vulkan driver"
* radv: Disable multilayer & multilevel DCC.Bas Nieuwenhuizen2017-09-121-0/+1
| | | | | | | | | | | | The current DCC init routine doesn't account for initializing a single layer or level. Multilayer seems hard for small textures on pre-GFX9 as tre metadata for the layers can be interleaved. For GFX9 multilevel textures are a problem for similar reasons. So just disable this for now, until we handle the texture modes correctly. Fixes: f4e499ec791 "radv: add initial non-conformant radv vulkan driver"
* util/disk_cache: turn MESA_GLSL_CACHE_DISABLE into a booleanEric Engestrom2017-09-122-3/+4
| | | | | | | | | | Instead of setting based on set/unset, allow users to use boolean values. In the docs and tests, use `DISABLE=true` instead of `DISABLE=1` as it's clearer IMO. Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* glx: turn LIBGL_NO_DRAWARRAYS into a booleanEric Engestrom2017-09-121-1/+5
| | | | | | | | | Instead of setting based on set/unset, allow users to use boolean values. In the docs, use `NO_DRAWARRAYS=true` instead of `NO_DRAWARRAYS=1` as it's clearer IMO. Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* glx: turn LIBGL_PROFILE_CORE into a booleanEric Engestrom2017-09-121-1/+1
| | | | | | | Instead of setting based on set/unset, allow users to use boolean values. Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* glx: turn LIBGL_DUMP_VISUALID into a booleanEric Engestrom2017-09-121-1/+1
| | | | | | | Instead of setting based on set/unset, allow users to use boolean values. Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* egl+glx: turn LIBGL_DRI3_DISABLE into a booleanEric Engestrom2017-09-122-2/+2
| | | | | | | | Instead of setting based on set/unset, allow users to use boolean values. In the docs, use `DISABLE=true` instead of `DISABLE=1` as it's clearer IMO. Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* glx: turn LIBGL_ALWAYS_INDIRECT into a booleanEric Engestrom2017-09-121-1/+1
| | | | | | | | Instead of setting based on set/unset, allow users to use boolean values. In the docs, use `ALWAYS=true` instead of `ALWAYS=1` as it's clearer IMO. Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* glx: turn LIBGL_ALLOW_SOFTWARE into a booleanEric Engestrom2017-09-121-2/+2
| | | | | | | | Instead of setting based on set/unset, allow users to use boolean values. In the help string, use `ALLOW=true` instead of `ALLOW=1` as it's clearer IMO. Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* egl+glx: turn LIBGL_ALWAYS_SOFTWARE into a booleanEric Engestrom2017-09-127-5/+10
| | | | | | | | Instead of setting based on set/unset, allow users to use boolean values. In the docs, use `ALWAYS=true` instead of `ALWAYS=1` as it's clearer IMO. Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* glx: turn LIBGL_DIAGNOSTIC into a booleanEric Engestrom2017-09-126-5/+16
| | | | | | | Instead of setting based on set/unset, allow users to use boolean values. Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* gbm: turn GBM_ALWAYS_SOFTWARE into a booleanEric Engestrom2017-09-123-3/+9
| | | | | | | Instead of setting based on set/unset, allow users to use boolean values. Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* 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 <tapani.palli@intel.com> Reviewed-by: Daniel Stone <daniels@collabora.com>
* glsl: Disallow unsized array of atomic_uintIago Toral Quiroga2017-09-121-0/+11
| | | | | | | | | | This was a bugfix to the spec addressed in OpenGL 4.5 (revision 7 of the spec) and there is a CTS test to check this. Fixes: KHR-GL45.shader_atomic_counters.negative-unsized-array Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* 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 <tapani.palli@intel.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
* 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 <tapani.palli@intel.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
* anv: wire up vk_errorf macro to do debug reportingTapani Pälli2017-09-129-33/+74
| | | | | Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
* anv: wire up anv_perf_warn macro to do debug reportingTapani Pälli2017-09-125-16/+141
| | | | | Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
* 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 <tapani.palli@intel.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
* i965: do not fallback to linear tiling for stencil surfacesIago Toral Quiroga2017-09-121-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | We were skipping this fallback for depth, but not for stencil which the hardware always requires to be W-tiled. Also, make the checks for whether we need to apply retiling strategies based on usage instead of tiling flags, which is safer and more explicit. This fixes a regression in a CTS test introduced with commit 4ea63fab77f0 that started applying re-tiling stencil surfaces in certain scenarios. v2: discard retiling based on usage fields instead of tiling flags. This is safer and more explicit. v3: Add a comment indicating that texturing of stencil in gen7 requires an Y-tiled copy (Topi). Fixes: KHR-GL45.direct_state_access.renderbuffers_storage Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
* nir/spirv: handle if's with same label in both branchesJuan A. Suarez Romero2017-09-121-2/+10
| | | | | | | | | | | | | | When a conditional branch has the same labels in the "if" part and in the "else" part, then we have the same cfg block, and it must be handled once. v2: handle it the same way as OpBranch (Jason). Fixes: dEQP-VK.spirv_assembly.instruction.compute.conditional_branch.same_labels* dEQP-VK.spirv_assembly.instruction.graphics.conditional_branch.same_labels* Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
* mesa/st: Include builddir/src/compiler/glsl to fix make checkAaron Watry2017-09-111-0/+1
| | | | | | | | | | | | | | | | | | | | | Otherwise, when doing an out-of-tree build you can expect the following: make[6]: Entering directory \ '${MESA_SRC}/build/src/mesa/state_tracker/tests' CXX test_glsl_to_tgsi_lifetime.o In file included from \ ${MESA_SRC}/src/mesa/src/mesa/state_tracker/st_glsl_to_tgsi_private.h:31:0, from \ ${MESA_SRC}/src/mesa/src/mesa/state_tracker/st_glsl_to_tgsi_temprename.h:27, from \ ${MESA_SRC}/src/mesa/src/mesa/state_tracker/tests/test_glsl_to_tgsi_lifetime.cpp:24: ${MESA_SRC}/src/compiler/glsl/ir.h:1502:37: \ fatal error: ir_expression_operation.h: No such file or directory #include "ir_expression_operation.h" Signed-off-by: Aaron Watry <awatry@gmail.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Tested-by: Gert Wollny <gw.fossdev@gmail.com>
* radv: work out a base ia_multi_vgt_param.Dave Airlie2017-09-113-10/+13
| | | | | | | This just reduces the calculations a bit further. Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Signed-off-by: Dave Airlie <airlied@redhat.com>
* radv: calculate non-draw related ia_multi_vgt_param bits in pipelineDave Airlie2017-09-113-60/+76
| | | | | | | | This moves a bunch of non-draw dependent calcs into the pipeline code, to reduce CPU overheads in the draw path. Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Signed-off-by: Dave Airlie <airlied@redhat.com>
* radv: move calculating primgroup_size to pipeline.Dave Airlie2017-09-113-9/+11
| | | | | | | This moves this out of the draw paths. Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Signed-off-by: Dave Airlie <airlied@redhat.com>
* radv: only calculate num_prims when required.Dave Airlie2017-09-111-4/+10
| | | | | Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Signed-off-by: Dave Airlie <airlied@redhat.com>
* radv: use upload_data to upload push descriptors.Dave Airlie2017-09-111-6/+3
| | | | | | | This is just a reusing code. Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Signed-off-by: Dave Airlie <airlied@redhat.com>
* radv: realign vgt flush on hawaii workaround with radeonsi.Dave Airlie2017-09-111-6/+12
| | | | | | | | This realigns this code with the radeonsi version and fixes the indirect case to work properly. Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Signed-off-by: Dave Airlie <airlied@redhat.com>
* radv: return an error code when resetting a command bufferSamuel Pitoiset2017-09-111-8/+14
| | | | | | | If the upload BO allocation failed. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Dave Airlie <airlied@redhat.com>
* radv: remove unnecessary goto in radv_create_cmd_buffer()Samuel Pitoiset2017-09-111-8/+2
| | | | | Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Dave Airlie <airlied@redhat.com>
* radv: do not pass a pipeline object to radv_emit_graphics_pipeline()Samuel Pitoiset2017-09-111-4/+4
| | | | | | | To be consistent with radv_emit_compute_pipeline(). Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Dave Airlie <airlied@redhat.com>
* radv: add debug flags to zero vram allocations.Dave Airlie2017-09-125-0/+7
| | | | | | | | | We are seeing apps that sometimes rely on Windows behaviour, add a flag to rule out vram zeroing. Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* radeonsi: optimize TCS epilog when invocation 0 writes tess factorsMarek Olšák2017-09-115-30/+89
| | | | | | | | | | This removes the barrier and LDS stores and loads for tess factors when it's possible. The removal of the barrier seems more important to me though. In one shader, it removes 17 * 4 bytes from the shader binary. Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
* tgsi/scan: add a new pass that analyzes tess factor writes (v2)Marek Olšák2017-09-112-0/+235
| | | | | | | | | | | | | | | | | | | The pass tries to deduce whether tess factors are always written by all shader invocations. The implication for radeonsi is that it doesn't have to use a barrier near the end of TCS, and doesn't have to use LDS for passing the tess factors to the epilog. v2: Handle barriers and do the analysis pass for each code segment surrounded by barriers separately, and AND results from all such segments writing tess factors. The change is trivial in the main switch statement. Also, the result is renamed to "tessfactors_are_def_in_all_invocs" to make the name accurate. Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
* Android: fix undeclared identifier 'gfx9d_reg_table'Chih-Wei Huang2017-09-111-1/+1
| | | | | | | | | | | | | | | | | | | | Since commit 552aaa11 the compiler complains: external/mesa/src/amd/common/ac_debug.c:124:51: error: use of undeclared identifier 'gfx9d_reg_table'; did you mean 'sid_reg_table'? reg = find_register(gfx9d_reg_table, ARRAY_SIZE(gfx9d_reg_table), offset); ^~~~~~~~~~~~~~~ sid_reg_table It's because the commit ef97cc0c ("radeonsi/gfx9: add IB parser support") add gfx9d.h as a recipe of sid_tables.h. But the corresponding Android.mk was not updated. However, it's not spotted since gfx9d_reg_table is not really used until commit 552aaa11 was landed. Fixes: 552aaa11 (ac/debug: take ASIC generation into account when printing registers) Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Signed-off-by: Rob Herring <robh@kernel.org>
* winsys/amdgpu: use the new raw CS APIMarek Olšák2017-09-112-77/+93
| | | | | | This also cleans things up. Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>