aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* ac/llvm: export ac_init_llvm_once in targetsPierre-Eric Pelloux-Prayer2020-07-108-3/+9
| | | | | | | | | | | | | | | | If a program like mpv uses both radeon_dri.so (because --vo=gpu) and radeonsi_drv_video.so (because --hwdec=vaapi) then LLVM will be inialized twice. The commit exports the ac_init_llvm_once so there's only one instance of the function. See also 18b12bf5335 ("targets: export radeon winsys_create functions to silence LLVM warning") which implemented this workaround initially. Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/1377 Reviewed-by: Marek Olšák <[email protected]> Acked-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5648>
* st/mesa: set compressed_data to NULL when freedPierre-Eric Pelloux-Prayer2020-07-101-0/+1
| | | | | | | | Reported-by: Karol Herbst <[email protected]> Fixes: b6db703e0f0 ("st/mesa: make texture views inherit compressed_data storage") Reviewed-by: Karol Herbst <[email protected]> Tested-by: Dave Airlie <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5821>
* aco: fix more validation errors from vgpr spill/restore codeSamuel Pitoiset2020-07-101-2/+2
| | | | | | | | | | | It looks like the attempt to fix this in 1e791e51a65 was incomplete. This fixes crashes with Devil May Cry 5 with a debug build. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Daniel Schürmann <[email protected]> Reviewed-by: Rhys Perry <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5828>
* lima: add missing breakTimothy Arceri2020-07-101-0/+1
| | | | | Reviewed-by: Erico Nunes <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5799>
* lima: add missing fallthrough commentsTimothy Arceri2020-07-101-0/+4
| | | | | Reviewed-by: Erico Nunes <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5799>
* etnaviv: add missing fallthrough commentsTimothy Arceri2020-07-104-0/+6
| | | | | Reviewed-by: Christian Gmeiner <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5799>
* iris: Add missing break in switch in modifier_is_supportedJordan Justen2020-07-091-0/+1
| | | | | | | | | | The current fall-through doesn't cause a difference in code flow, but I think we want a break here. Fixes: 2305ab693820 ("iris: Refactor modifier_is_supported for gen12") Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Nanley Chery <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5618>
* freedreno/ir3: run nir_opt_loop_unroll in optimization loopJonathan Marek2020-07-091-0/+1
| | | | | | | | GL driver was relying on this being done by gallium, but there might be new loops to unroll during optimizations and turnip needs it. Signed-off-by: Jonathan Marek <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5818>
* freedreno/ir3: fix setup_input for sparse vertex inputsJonathan Marek2020-07-091-7/+9
| | | | | | | | | | | | | | | With turnip we can have sparse input variables like: decl_var shader_in INTERP_MODE_NONE float @1 (VERT_ATTRIB_GENERIC1.x, 1, 0) decl_var shader_in INTERP_MODE_NONE float @2 (VERT_ATTRIB_GENERIC1.y, 1, 0) decl_var shader_in INTERP_MODE_NONE float @3 (VERT_ATTRIB_GENERIC1.w, 1, 0) Example of a test fixed: dEQP-VK.glsl.440.linkage.varying.component.vert_in.vec2.as_float_float_unused Signed-off-by: Jonathan Marek <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5818>
* intel/compiler/fs: Still attempt simd32 when INTEL_DEBUG=no16 is usedJordan Justen2020-07-091-1/+3
| | | | | | | | | | | | | | | | | If INTEL_DEBUG=no16 is used, then simd16 will not be attempted. This, in turn prevents simd32 from running, because we attempt to skip simd32 when simd16 fails to compile. This change more accurately recognizes when we attempted simd16, but simd16 failed. One easy way to cause an issue is to set both no8 and no16. Before this change, we would be left with no FS program, even though simd32 could still be generated in some cases. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5269>
* intel/compiler/cs: Allow simd32 in some more cases with no8 and/or no16Jordan Justen2020-07-091-1/+1
| | | | | | | | | | | | | | | | If no16 was specified, and the shader can't run in simd8 due to the local_size, then we need to generate a simd32 program. If both no8 and no16 are specified, then we need to generate a simd32 program. Rework: * Drop update of `if` that would have changed `do32` to try simd32 even if simd16 spilled registers. (Caio) Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5269>
* panfrost: Report blend shader work countAlyssa Rosenzweig2020-07-091-0/+1
| | | | | | | This was going uninitialized, whoops! Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5827>
* panfrost: Move panfrost_translate_texture_typeAlyssa Rosenzweig2020-07-092-26/+27
| | | | | | | We need it in pan_job.c Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5827>
* panfrost: Handle PIPE_FORMAT_S8_UINTAlyssa Rosenzweig2020-07-092-0/+10
| | | | | | | For wallpaper blits with separate stencil. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5827>
* panfrost: Handle PIPE_FORMAT_X24S8_UINTAlyssa Rosenzweig2020-07-092-1/+10
| | | | | | | | We can treat it as RGBA32UI and swizzle away everything but R, like the blob does. Maybe not the most efficient thing in the world. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5827>
* panfrost: Move scoreboarding routines to commonAlyssa Rosenzweig2020-07-096-6/+9
| | | | | Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5827>
* panfrost: Drop batch from scoreboard routinesAlyssa Rosenzweig2020-07-095-34/+37
| | | | | Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5827>
* panfrost: Pass polygon_list to tiler init functionAlyssa Rosenzweig2020-07-093-6/+7
| | | | | | | So it doesn't need to allocate it by itself. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5827>
* panfrost: Factor out scoreboarding stateAlyssa Rosenzweig2020-07-095-55/+89
| | | | | | | This is not Gallium-specific, so take it out of the batch. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5827>
* panfrost: Move pool routines to common codeAlyssa Rosenzweig2020-07-0911-26/+13
| | | | | | | | We finally have it decoupled from Galliumisms (and OpenGLisms, indeed) so we can share the file. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5794>
* panfrost: Drop Gallium-local pan_bo_create wrapperAlyssa Rosenzweig2020-07-097-32/+20
| | | | | | | | We can handle pandecode in shared code now, which will matter for tracing non-Gallium drivers. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5794>
* panfrost: Move debug flags into the deviceAlyssa Rosenzweig2020-07-098-53/+54
| | | | | | | | | Removes random global state flying about which doesn't really work for common code. We cleanup some debug messages while we're at it because the mostly-unused DBG macro relies on magic state. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5794>
* panfrost: Expose pool-based allocation APIAlyssa Rosenzweig2020-07-098-43/+41
| | | | | | | | Pass pools instead of batches, and rename in terms of pools instead of transient memory for consistency while we're find-and-replacing. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5794>
* panfrost: Track the device through the poolAlyssa Rosenzweig2020-07-093-4/+8
| | | | | Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5794>
* panfrost: Allocate pool BOs against the poolAlyssa Rosenzweig2020-07-091-5/+8
| | | | | | | Instead of against the owning batch, to decouple. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5794>
* panfrost: Introduce pan_pool structAlyssa Rosenzweig2020-07-094-31/+74
| | | | | | | | As a first step towards separating pools from batches, let's collect pool-related state together. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5794>
* glsl: declare gl_Layer/gl_ViewportIndex/gl_ViewportMask as vs builtinsPierre-Eric Pelloux-Prayer2020-07-091-50/+55
| | | | | | | | | | | | | | | | | | | | | | | | Otherwise a VS doing the following: out gl_PerVertex { vec4 gl_Position; int gl_ViewportIndex; }; cannot be compiled because of the following error: "redeclaration of gl_PerVertex must be a subset of the built-in members of gl_PerVertex" v2: add GLSL_PRECISION_HIGH param to add_varying() for "gl_Layer" in generate_fs_special_vars. v3: add GLSL_PRECISION_HIGH param to add_varying() for "gl_Layer" in generate_varyings. Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2946 Tested-by: John Galt <[email protected]> Reviewed-by: Marek Olšák <[email protected]> (v3) Reviewed-by: Ian Romanick <[email protected]> (v3) Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5167>
* turnip: fix active_desc_sets not being set for compute pipelineJonathan Marek2020-07-091-0/+2
| | | | | | | | This resulted in the load state being always empty. Its an optimization, so it didn't result in any failures. Signed-off-by: Jonathan Marek <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5816>
* glsl: only allow 32 bits atomic operations on imagesPierre-Eric Pelloux-Prayer2020-07-091-0/+44
| | | | | | | | | | | | | EXT_shader_image_load_store says: The format of the image unit must be in the "1x32" equivalence class otherwise the atomic operation is invalid. ARB_shader_image_load_store says: We will only support 32-bit atomic operations on images Fixes: fc0a2e5d017 ("glsl: add EXT_shader_image_load_store new image functions") Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5688>
* glsl: don't expose imageAtomicIncWrap for signed imagePierre-Eric Pelloux-Prayer2020-07-091-15/+29
| | | | | | | | | The spec says that it's only allowed for unsigned ones. Same from imageAtomicDecWrap. Fixes: fc0a2e5d017 ("glsl: add EXT_shader_image_load_store new image functions") Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5688>
* ac/llvm: remove the -1 hack from ac_atomic_inc_wrapPierre-Eric Pelloux-Prayer2020-07-091-10/+0
| | | | | | | To match the behavior of proprietary drivers. Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5688>
* glsl: reject size1x8 for image variable with floating-point data typesPierre-Eric Pelloux-Prayer2020-07-091-5/+7
| | | | | | Fixes: 8d07d66180b ("glsl,nir: Switch the enum representing shader image formats to PIPE_FORMAT.") Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5688>
* radv: compute prim_vertex_count at draw timeSamuel Pitoiset2020-07-093-27/+31
| | | | | | | | In preparation for the dynamic topology state. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5801>
* radv: adjust IA_MULTI_VGT_PARAM.PARTIAL_VS_WAVE at draw timeSamuel Pitoiset2020-07-092-14/+13
| | | | | | | | In preparation for the dynamic topology state. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5801>
* radv: adjust IA_MULTI_VGT_PARAM.WD_SWITCH_ON_EOP at draw timeSamuel Pitoiset2020-07-093-19/+14
| | | | | | | | In preparation for the dynamic topology state. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5801>
* radv: store the primitive topology hardware value in the pipelineSamuel Pitoiset2020-07-092-2/+2
| | | | | | | | Will help for upcoming changes. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5801>
* radv: implement missing VK_ACCESS_MEMORY_{READ,WRITE}_BITSamuel Pitoiset2020-07-091-0/+24
| | | | | | | | | | | | | | | | | | From the Vulkan spec 1.2.146: "VK_ACCESS_MEMORY_READ_BIT specifies all read accesses. It is always valid in any access mask, and is treated as equivalent to setting all READ access flags that are valid where it is used." "VK_ACCESS_MEMORY_WRITE_BIT specifies all write accesses. It is always valid in any access mask, and is treated as equivalent to setting all WRITE access flags that are valid where it is used." Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3241 Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5807>
* nv50/ir: fix memset on non trivial types warningKarol Herbst2020-07-093-5/+3
| | | | | | Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Rhys Kidd <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5819>
* nine: remove unused varTimothy Arceri2020-07-091-1/+0
| | | | | Reviewed-by: Eric Anholt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5819>
* zink: fix missing fallthrough commentTimothy Arceri2020-07-091-0/+1
| | | | | Reviewed-by: Erik Faye-Lund <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5819>
* v3d: remove redefine of VG(x)Timothy Arceri2020-07-091-8/+0
| | | | | | | Instead just depend on the one in v3d_packet_helpers.h Reviewed-by: Eric Anholt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5819>
* freedreno: fix missing fallthrough commentsTimothy Arceri2020-07-091-0/+1
| | | | | Reviewed-by: Rob Clark <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5819>
* amd/llvm: Mark pointer function arguments as 32-byte aligned.Bas Nieuwenhuizen2020-07-083-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise LLVM does not see the pointers as allowing speculative loads. The pipeline-db results are pretty wild, but mostly what is to be expected from allowing more code movement in LLVM: Totals from affected shaders: SGPRS: 157728 -> 168336 (6.73 %) VGPRS: 158628 -> 158664 (0.02 %) Spilled SGPRs: 10845 -> 24753 (128.24 %) Spilled VGPRs: 13 -> 13 (0.00 %) Private memory VGPRs: 0 -> 0 (0.00 %) Scratch size: 8 -> 8 (0.00 %) dwords per thread Code Size: 17189180 -> 17313712 (0.72 %) bytes LDS: 204 -> 204 (0.00 %) blocks Max Waves: 5700 -> 5687 (-0.23 %) Wait states: 0 -> 0 (0.00 %) This gives some boosts for shaders we can move a descriptor load outside a loop. Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3159>
* glsl: don't validate array types in ir_dereference_variableMarek Olšák2020-07-081-1/+4
| | | | | | | | Fixes: 8d62969cfe8 - glsl: validate more stuff Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3245 Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5813>
* radv: use bitshifts for debug enum valuesSimon Ser2020-07-081-36/+36
| | | | | | | | | Explicit values are getting out of hand. Signed-off-by: Simon Ser <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5735>
* freedreno/layout: layout simplifications and pitch from level 0 pitchJonathan Marek2020-07-0833-320/+177
| | | | | | | | | | | | This updates a3xx/a4xx/a5xx to fix the fetchsize to "PITCHALIGN" (called "MINLINEOFFSET" by the a3xx docs), and some simplifications to make things more like a6xx. Also similar simplifications for a2xx layout code. The pitch can always be determined using a simple calculation from the base level pitch, so don't pre-calculate a pitch for each mipmap level. Signed-off-by: Jonathan Marek <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5796>
* freedreno: add a fd_resource_pitch helperJonathan Marek2020-07-0817-76/+56
| | | | | Signed-off-by: Jonathan Marek <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5796>
* freedreno/a2xx: fix compressed texturesJonathan Marek2020-07-081-2/+2
| | | | | | | | | | | Two problems: * Multiply has higher priority than shift * rsc->layout.format isn't initialized for a2xx Fixes: 5a8718f01b397 ("freedreno: Make the slice pitch be bytes, not pixels.") Signed-off-by: Jonathan Marek <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5796>
* nir/validate: Don't abort() until after the shader has printedJason Ekstrand2020-07-081-33/+7
| | | | | | | | | | | | | | | | | | | | | In the case where SSA use/def chains are broken, NIR prints out a very cryptic error and then aborts. This abort happens during validation rather than after the print is complete, hiding any other errors that may have been found. One might think, "So what? Fix your use/def issue first." However, what makes this especially bad is that, when use/def chains are broken, there's usually a much nicer error inline in the shader that would have been printed had we not aborted early so the current behavior simply ensures you get the most cryptic error possible in an already difficult-to-debug case. While we're at it, we remove the one other case of abort() which is in the validation of phi instruction sources. Reviewed-by: Rob Clark <[email protected]> Tested-by: Marcin Ślusarz <[email protected]> Reviewed-by: Marcin Ślusarz <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5809>
* Revert "ac/surface: require that gfx8 doesn't have DCC in order to be ↵Marek Olšák2020-07-081-4/+3
| | | | | | | | | | | | displayable" This reverts commit 7406ea37e6b666d474ab62982ca333d518c84231. Fixes: 7406ea37 "ac/surface: require that gfx8 doesn't have DCC in order to be displayable" Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3190 Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5780>