aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium
Commit message (Collapse)AuthorAgeFilesLines
* iris: fix decode_get_bo callbackLionel Landwerlin2019-03-071-1/+3
| | | | | | Signed-off-by: Lionel Landwerlin <[email protected]> Fixes: acb50d6b1ff1b7 ("intel/decoders: handle decoding MI_BBS from ring") Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
* virgl: remove unused variableErik Faye-Lund2019-03-071-1/+0
| | | | | | | This variable is now unused, so let's remove it. Fixes: 9c4930946a5 (virgl: add encoder functions for new protocol) Reviewed-by: Gurchetan Singh <[email protected]>
* virgl: remove unused variableErik Faye-Lund2019-03-071-1/+0
| | | | | | | This variable is now unused, so let's remove it. Fixes: db77573d7ba (virgl: modify how we handle GL_MAP_FLUSH_EXPLICIT_BIT) Reviewed-by: Gurchetan Singh <[email protected]>
* virgl: remove unused variableErik Faye-Lund2019-03-071-1/+0
| | | | | | | This variable is now unused, so let's remove it. Fixes: c19aedcf1a8 (virgl: don't mark unclean after a flush) Reviewed-by: Gurchetan Singh <[email protected]>
* virgl: remove unused variablesErik Faye-Lund2019-03-071-3/+0
| | | | | | | | These variables are now unused, let's remove them to get rif of a few warnings. Fixes: f0e71b10888 (virgl: use transfer queue) Reviewed-by: Gurchetan Singh <[email protected]>
* iris: fix decoder callLionel Landwerlin2019-03-071-1/+1
| | | | | Signed-off-by: Lionel Landwerlin <[email protected]> Fixes: acb50d6b1ff1b7 ("intel/decoders: handle decoding MI_BBS from ring")
* iris: add support for tgsi_to_nirAndre Heider2019-03-071-3/+8
| | | | | | | | | | | The Gallium Nine state tracker now works on iris. Also tested with GALLIUM_HUD and Star Wars: Knights of the Old Republic on WINE (GL_ATI_fragment_shader). Signed-off-by: Andre Heider <[email protected]> Reviewed-by: Timur Kristóf <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* iris: Fix MOCS for blits and clearsKenneth Graunke2019-03-065-20/+27
| | | | I915_MOCS_CACHED is the wrong value. Expose mocs() and use that.
* radeonsi/nir: stop calling nir_lower_returns()Timothy Arceri2019-03-061-1/+0
| | | | | | We now call this for all drivers in glsl_to_nir() instead. Reviewed-by: Eric Anholt <[email protected]>
* glsl: use NIR function inlining for drivers that use glsl_to_nir()Timothy Arceri2019-03-062-4/+4
| | | | | | | | glsl_to_nir() is still missing support for converting certain functions to NIR, so for those we use the GLSL IR optimisations to remove the functions. Reviewed-by: Eric Anholt <[email protected]>
* glsl/freedreno/panfrost: pass gl_context to the standalone compilerTimothy Arceri2019-03-062-3/+8
| | | | | | | This allows us to use the ctx with glsl_to_nir() in a following patch. Reviewed-by: Eric Anholt <[email protected]>
* iris: setup EdgeFlag Vertex Element when needed.Jose Maria Casanova Crespo2019-03-063-15/+86
| | | | | | | | | | | | | | | | If Vertex Shader uses EdgeFlag the hardware request that it is setup as the last VERTEX_ELEMENT_STATE. If SGVS are add at draw time we need to also reconfigure the last 3DSTATE_VF_INSTANCING so its VertexElementIndex points to the new Vertex Element that contains the EdgeFlag. So if draw parameters or edgeflag are not used the CSO generated at iris_create_vertex_element is sent directly in the batches. But if edge flag is used we adjust last VERTEX_ELEMENT_STATE and last 3DSTATE_VF_INSTANCING using their alternative edge flag version we generate at iris_create_vertex_element and store at the CSO. Reviewed-by: Kenneth Graunke <[email protected]>
* nir/lower_doubles: Inline functions directly in lower_doublesJason Ekstrand2019-03-061-1/+1
| | | | | | | | | | | | Instead of trusting the caller to already have created a softfp64 function shader and added all its functions to our shader, we simply take the softfp64 shader as an argument and do the function inlining ouselves. This means that there's no more nasty functions lying around that the caller needs to worry about cleaning up. Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* tgsi_to_nir: Set correct location for uniforms.Timur Kristóf2019-03-051-0/+1
| | | | | | | | | | | | Previously, only the driver_location was set for all variables, but constants need to use the location field instead. This change is necessary because the nine state tracker can produce non-packed constants whose location needs to be explicitly set. Signed-Off-By: Timur Kristóf <[email protected]> Tested-by: Andre Heider <[email protected]> Tested-by: Rob Clark <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* tgsi_to_nir: Improve interpolation modes.Timur Kristóf2019-03-051-15/+21
| | | | | | | | | | | | | | This patch extracts the interpolation mode translation into a separate function called ttn_translate_interp_mode, adds support for TGSI_INTERPOLATE_COLOR which was missing, and also sets the proper interpolation mode to output variables, which were not set previously. Signed-Off-By: Timur Kristóf <[email protected]> Tested-by: Andre Heider <[email protected]> Tested-by: Rob Clark <[email protected]> Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* tgsi_to_nir: use sampler variables and derefsKenneth Graunke2019-03-051-10/+79
| | | | | | | | | | | | | | v2: fix is_shadow, is_array and txq Some drivers (eg. iris) need the presence of sampler variables and derefs so that they can count them to determine the number of samplers used. This change also makes the output NIR closer to what glsl_to_nir outputs. Signed-Off-By: Timur Kristóf <[email protected]> Tested-by: Andre Heider <[email protected]> Tested-by: Rob Clark <[email protected]> Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* tgsi_to_nir: Support FACE and POSITION properly.Timur Kristóf2019-03-051-12/+68
| | | | | | | | | | | | | | Previously, FACE was hard-coded as a sysval, but TTN emulated it incorrectly. Also, POSITION was not supported when it was a sysval. This patch fixes these by allowing both of them to be sysvals or inputs, based on driver capabilities. It also fixes the TGSI FACE emulation based on the TGSI spec. Signed-Off-By: Timur Kristóf <[email protected]> Tested-by: Andre Heider <[email protected]> Tested-by: Rob Clark <[email protected]> Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* tgsi_to_nir: Extract ttn_emulate_tgsi_front_face into its own function.Timur Kristóf2019-03-051-14/+20
| | | | | | | | | | | We'll need to use the same logic in other places, so it makes sense to have a separate function for this. Signed-Off-By: Timur Kristóf <[email protected]> Tested-by: Andre Heider <[email protected]> Tested-by: Rob Clark <[email protected]> Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* tgsi_to_nir: Restructure system value loads.Timur Kristóf2019-03-051-10/+6
| | | | | | | | | | Minor cleanup to the way system value loads work in tgsi_to_nir. Signed-Off-By: Timur Kristóf <[email protected]> Tested-by: Andre Heider <[email protected]> Tested-by: Rob Clark <[email protected]> Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* tgsi_to_nir: Produce optimized NIR for a given pipe_screen.Timur Kristóf2019-03-058-13/+153
| | | | | | | | | | | | | | | | | | | With this patch, tgsi_to_nir will output NIR that is tailored to the given pipe, by reading its capabilities and adjusting the NIR code to those capabilities similarly to how glsl_to_nir works. It also adds an optimization loop that brings the output NIR in line with what glsl_to_nir outputs. This is necessary for the same reason why glsl_to_nir has its own optimization loop: currently not every driver does these optimizations yet. For uses which cannot pass a pipe_screen we also keep a variant called tgsi_to_nir_noscreen which keeps the old behavior. Signed-Off-By: Timur Kristóf <[email protected]> Tested-by: Andre Heider <[email protected]> Tested-by: Rob Clark <[email protected]> Acked-By: Eric Anholt <[email protected]>
* freedreno: Plumb pipe_screen through to irX_tgsi_to_nir.Timur Kristóf2019-03-0512-19/+37
| | | | | | | | | | This patch makes it possible for freedreno to pass a pipe_screen to tgsi_to_nir. This will be needed when tgsi_to_nir supports reading pipe capabilities. Signed-off-by: Timur Kristóf <[email protected]> Tested-by: Rob Clark <[email protected]> Reviewed-by: Rob Clark <[email protected]>
* tgsi_to_nir: Split to smaller functions.Timur Kristóf2019-03-051-26/+56
| | | | | | | | | | | | Previously, tgsi_to_nir was a single big function, and this patch intends to make the code easier to understand by splitting it up to multiple smaller pieces. Signed-Off-By: Timur Kristóf <[email protected]> Tested-by: Andre Heider <[email protected]> Tested-by: Rob Clark <[email protected]> Reviewed-by: Timothy Arceri <[email protected]> Acked-By: Tested-by: Rob Clark <[email protected]>
* tgsi_to_nir: Make the TGSI IF translation code more readable.Timur Kristóf2019-03-051-4/+5
| | | | | | | | | | | This patch is a minor cleanup that only intends to make the TGSI IF translation a bit easier to read. Signed-off-by: Timur Kristóf <[email protected]> Tested-by: Andre Heider <[email protected]> Tested-by: Rob Clark <[email protected]> Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* tgsi_to_nir: Fix TGSI LIT translation by using flt.Timur Kristóf2019-03-051-3/+3
| | | | | | | | | | | | TGSI spec says LIT needs a "greater than" comparison. NIR doesn't have that, so let's use "less than" and swap the arguments. Previously "greater than or equal" was used by tgsi_to_nir which is incorrect. Signed-off-by: Timur Kristóf <[email protected]> Tested-by: Andre Heider <[email protected]> Tested-by: Rob Clark <[email protected]> Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* tgsi_to_nir: Fix the TGSI ARR translation by converting the result to int.Timur Kristóf2019-03-051-1/+1
| | | | | | | | | | | | | According to the TGSI spec, ARR needs to do a rounding and then a float-to-integer conversion which was missing. This patch also makes the rounding a bit more efficient by using nir_fround_even instead of the previous nir_ffloor+nir_fadd trick. Signed-Off-By: Timur Kristóf <[email protected]> Tested-by: Andre Heider <[email protected]> Tested-by: Rob Clark <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* nir: Add ability for shaders to use window space coordinates.Timur Kristóf2019-03-052-0/+5
| | | | | | | | | | | | | This patch adds a shader_info field that tells the driver to use window space coordinates for a given vertex shader. It also enables this feature in radeonsi (the only NIR-capable driver that supported it in TGSI), and makes tgsi_to_nir aware of it. Signed-Off-By: Timur Kristóf <[email protected]> Tested-by: Andre Heider <[email protected]> Tested-by: Rob Clark <[email protected]> Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* st/nine: Ignore multisample quality level if no msAxel Davy2019-03-041-0/+4
| | | | | | | | | | | | Apparently instead of returning error when passing a quality level different than 0 for D3DMULTISAMPLE_NONE, we should pass. Fixes: https://github.com/iXit/Mesa-3D/issues/340 Cc: [email protected] Signed-off-by: Axel Davy <[email protected]>
* st/nine: Ignore window size if errorAxel Davy2019-03-041-1/+8
| | | | | | | | | | | | | | | | | | | | Check GetWindowInfo and ignore the computed sizes if there is an error. Fixes a regression caused by earlier commit when using old wine gallium nine patches. Should also address a crash at window destruction. Related issues: https://github.com/iXit/Mesa-3D/issues/331 https://github.com/iXit/Mesa-3D/issues/332 Cc: [email protected] Fixes: 2318ca68bbe ("st/nine: Handle window resize when a presentation buffer is used") Signed-off-by: Axel Davy <[email protected]>
* st/wgl: init a variable to silence MinGW warningBrian Paul2019-03-041-1/+1
| | | | | | MinGW release build says 'value' may be used before being initialized. Reviewed-by: Neha Bhende <[email protected]>
* svga: silence array out of bounds warningBrian Paul2019-03-041-1/+1
| | | | | | | | MinGW release build complains about a possible out-of-bounds array access. Test i < 4 to silence it. Reviewed-by: Neha Bhende <[email protected]> Reviewed-by: Mathias Fröhlich <[email protected]>
* svga: init fill variable to avoid compiler warningBrian Paul2019-03-041-1/+1
| | | | | | | | MinGW release builds warns about use of a possbily uninitialized variable here. Reviewed-by: Neha Bhende <[email protected]> Reviewed-by: Mathias Fröhlich <[email protected]>
* panfrost: List primitive restart enable bitAlyssa Rosenzweig2019-03-041-0/+2
| | | | Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost/midgard: Preview for data hazardsAlyssa Rosenzweig2019-03-041-9/+16
| | | | | | | | If a selected unit causes a data hazard, the whole block gets cut short. So, we preview for data hazards _while_ selecting units. Signed-off-by: Alyssa Rosenzweig <[email protected]> Tested-by: Tomeu Vizoso <[email protected]
* panfrost/midgard: Promote smul to vmulAlyssa Rosenzweig2019-03-041-1/+1
| | | | | | | | | smul comes first in the pipeline, before vmul. Until we have a full instruction scheduler, it's better to have vmul prioritized to maximize bundle size. Signed-off-by: Alyssa Rosenzweig <[email protected]> Tested-by: Tomeu Vizoso <[email protected]
* panfrost: Flush with offscreen renderingAlyssa Rosenzweig2019-03-041-2/+2
| | | | | | | | This special-case was needlessly added and breaks purely offscreen rendering (when there is no scanout involved) Signed-off-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Tomeu Vizoso <[email protected]
* panfrost/midgard: Don't force constant on VLUTAlyssa Rosenzweig2019-03-041-1/+0
| | | | | | | | | | Previously, we forced a #0 inline constant tacked on for the lut instructions to mirror the blob's behaviour, which caused some suboptimal codegen due to our constant inlining implementation. Instead, just don't force a constant at all. Signed-off-by: Alyssa Rosenzweig <[email protected]> Tested-by: Tomeu Vizoso <[email protected]
* panfrost: Cleanup cruft related to clearsAlyssa Rosenzweig2019-03-042-32/+3
| | | | | Signed-off-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Tomeu Vizoso <[email protected]>
* panfrost: Decouple Gallium clear from FBD clearAlyssa Rosenzweig2019-03-042-74/+67
| | | | | | | | | | The operations of gallium->clear() and the hardware callbacks are fundamentally independent. This routine decouples them by routing shared information via panfrost_job, allowing the hardware half to be deferred to the fragment job generation. Signed-off-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Tomeu Vizoso <[email protected]>
* panfrost: Import job data structures from v3dAlyssa Rosenzweig2019-03-045-5/+184
| | | | | | | | | At the moment, Panfrost state is ad hoc, which creates issues for FBOs. This commit imports the skeleton of the v3d_job structure as panfrost_job, in preparation for refactors to organize this state. Signed-off-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Tomeu Vizoso <[email protected]>
* freedreno/ir3: add Sethi–Ullman numbering passRob Clark2019-03-031-2/+6
| | | | Signed-off-by: Rob Clark <[email protected]>
* v3d: Fix build of NEON code with Mesa's cflags not targeting NEON.Eric Anholt2019-03-011-3/+17
| | | | | | | | v3d may be built as part of a set of drivers in a system not requiring NEON, but we know V3D devices will be paired with CPUs with NEON so we should be able to use this asm. Fixes: 0c05198d6b5b ("v3d: Always enable the NEON utile load/store code.")
* Revert "swr/rast: Archrast codegen updates"Eric Engestrom2019-03-018-351/+314
| | | | | | | | | | | | | | | | | | | This reverts the following commits: 71a76a47ccb34c5c259781ed49b0013e86dfaa31 "swr/codegen: fix autotools build" 7763e664cefd1e394101b37fbc552b50f820f44a "meson/swr: replace hard-coded path with current_build_dir()" 773b3ceacaf6d32135348e07878b8514a4350b0e "swr/rast: Fix autotools and scons codegen" 16e10b8c304481e423e76311f70de5de9e7424b1 "swr/rast: Add general SWTag statistics" b45a15a39f7630d569fcf1296dac1415eb758249 "swr/rast: Add string handling to AR event framework" 8608a747aafe6aef42fba148bfcdbb3ca136e7de "swr/rast: Add initial SWTag proto definitions" 93cd9905c8fbb98985ae1a61c0eebdb225fd1325 "swr/rast: Cleanup and generalize gen_archrast" The last one in this list broke all the build systems that can build this (meson, autotools & scons). See MR !304 for more details: https://gitlab.freedesktop.org/mesa/mesa/merge_requests/304 Signed-off-by: Eric Engestrom <[email protected]>
* freedreno/a6xx: Enable UBWC modifierFritz Koenig2019-03-014-1/+17
| | | | | Adding the supported_modifiers allows buffers to be created with UBWC
* freedreno: UBWC allocatorFritz Koenig2019-03-013-0/+36
| | | | | | | | | | | UBWC requires space for a metadata or flag buffer that contains compression data. Each 16x4 tile of image data corresponds to a byte of compression data. This buffer needs to be stored before (at a lower address) the image buffer in order to match up with what the display driver. This allows the display driver to directly scan-out at UBWC buffer.
* freedreno/a6xx: UBWC supportFritz Koenig2019-03-017-44/+160
| | | | | | Universal bandwidth compression(UBWC) reduces memory bandwidth by compressing buffers. This compression takes the form of a full sized image buffer as well as a smaller metadata buffer.
* freedreno: pass count to query_dmabuf_modifiersFritz Koenig2019-03-011-1/+1
| | | | | query_dmabuf_modifiers needs to know the max number of modifiers that the list will hold.
* etnaviv: fix compile warningsChristian Gmeiner2019-03-012-2/+0
| | | | | | | | | | | | | | | | | Fixes the following compile warnings: [591/629] Compiling C object 'src/gallium/drivers/etnaviv/df32d18@@etnaviv@sta/etnaviv_context.c.o'. ../../src/ac_mesa/src/gallium/drivers/etnaviv/etnaviv_context.c: In function 'etna_cmd_stream_reset_notify': ../../src/ac_mesa/src/gallium/drivers/etnaviv/etnaviv_context.c:334:22: warning: unused variable 'entry' [-Wunused-variable] struct set_entry *entry; ^~~~~ [604/629] Compiling C object 'src/gallium/drivers/etnaviv/df32d18@@etnaviv@sta/etnaviv_resource.c.o'. ../../src/ac_mesa/src/gallium/drivers/etnaviv/etnaviv_resource.c: In function 'etna_resource_used': ../../src/ac_mesa/src/gallium/drivers/etnaviv/etnaviv_resource.c:649:22: warning: unused variable 'entry' [-Wunused-variable] struct set_entry *entry; ^~~~~ Signed-off-by: Christian Gmeiner <[email protected]>
* etnaviv: fix resource usage tracking across different pipe_context'sChristian Gmeiner2019-03-017-29/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | A pipe_resource can be shared by all the pipe_context's hanging off the same pipe_screen. Changes from v2 -> v3: - add locking with mtx_*() to resource and screen (Marek) Changes from v3 -> v4: - drop rsc->lock, just use screen->lock for the entire serialization (Marek) - simplify etna_resource_used() flush condition, which also prevents potentially flushing resources twice (Marek) - don't remove resouces from screen->used_resources in etna_cmd_stream_reset_notify(), they may still be used in other contexts and may need flushing there later on (Marek) Changes from v4 -> v5: - Fix coding style issues reported by Guido Changes from v5 -> v6: - Add missing locking in etna_transfer_map(..) (Boris) Signed-off-by: Christian Gmeiner <[email protected]> Signed-off-by: Marek Vasut <[email protected]> Signed-off-by: Boris Brezillon <[email protected]> Tested-by: Marek Vasut <[email protected]> Reviewed-by: Boris Brezillon <[email protected]> Tested-by: Boris Brezillon <[email protected]>
* etnaviv: enable ETC2 texture compression support for HALTI0 GPUsChristian Gmeiner2019-03-011-11/+1
| | | | | Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Lucas Stach <[email protected]>
* etnaviv: hook-up etc2 patchingChristian Gmeiner2019-03-013-0/+64
| | | | | | | | | | | | | | Changes v1 -> v2: - Avoid the GPU sampling from the resource that gets mutated by the the transfer map by setting DRM_ETNA_PREP_WRITE. Changes v2 -> v3: - make use of likely(..) - drop minor optimization regarding rsc->layout == ETNA_LAYOUT_LINEAR - better documentation why DRM_ETNA_PREP_WRITE is needed Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Lucas Stach <[email protected]>