Mike Blumenkrantz
c312299316
zink: start using per-stage flags for new shaders, refcount shader modules
...
we don't want to recompile shaders if we don't have to, so we can set bitflags
upon receiving new shader states and then compile only the stages that have
changed while refcounting the unchanged stages
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5970 >
2020-08-07 12:36:59 +00:00
Mike Blumenkrantz
76d3645dd2
zink: use ZINK_SHADER_COUNT instead of PIPE_SHADER_TYPES - 1 everywhere
...
this is just for convenience and consistency
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5970 >
2020-08-07 12:36:59 +00:00
Mike Blumenkrantz
0f059d550b
zink: split up creating zink_shader objects and VkShaderModule objects
...
the actual VkShaderModule is only needed when we're creating a program to
draw with, so this can be split off for "uncompiled" and "compiled" shader
objects which will facilitate implementing shader keys
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5970 >
2020-08-07 12:36:59 +00:00
Mike Blumenkrantz
a03d17ede7
zink: refcount zink_gfx_program objects
...
now that we're tracking these by shader, we want to ensure that they live through
each render pass successfully if there's no flush regardless of the timing when the
shader objects are destroyed. this becomes useful when we split up shader create and compile
functionality in future patches, at which point program refcounts can be changed
during successive draw calls, potentially resulting in a program being destroyed at that
point when it shouldn't be
with this patch, each shader used by the program gets a reference, with the renderpass
batch itself becoming the owner of the program such that it will be deleted
when the draw state gets invalidated and a new program is created
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5970 >
2020-08-07 12:36:58 +00:00
Mike Blumenkrantz
8772c693c5
zink: adjust zink_shader struct to contain full streamout info
...
move remapped register_index -> slot into a separate value on the struct
in order to preserve the register_index value
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5970 >
2020-08-07 12:36:58 +00:00
Mike Blumenkrantz
e481d3e2ed
zink: move shader state methods for pipe_context into zink_program.c
...
just moving these so all the shader code can be in one place
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5970 >
2020-08-07 12:36:58 +00:00
Mike Blumenkrantz
54c68498d4
zink: set primitive restart cap
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5912 >
2020-08-07 11:17:04 +00:00
Mike Blumenkrantz
5959178381
zink: use util_draw_vbo_without_prim_restart for unsupported prim modes
...
this fixes up primitive restart functionality for the primitive types that
vulkan doesn't support using primitive restart with
fixes #2873
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5912 >
2020-08-07 11:17:04 +00:00
Mike Blumenkrantz
f4583b4086
zink: move 8bit index handling out of u_primconvert path
...
putting this through util_translate_prim_restart_ib reduces our reliance on
u_primconvert, which ideally we don't want to be using
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5912 >
2020-08-07 11:17:04 +00:00
Mike Blumenkrantz
5edaf081cd
zink: basic primitive restart support for strip/fan topologies
...
this conditionally handles rewriting the index buffer to use vk-compatible
restart indexes and then enables it in the pipeline for supported draw
modes
fixes #3174
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5912 >
2020-08-07 11:17:04 +00:00
Christian Gmeiner
e63a7882a0
etnaviv: call nir_lower_bool_to_bitsize
...
Starting with commit 6f394343b1 ("nir/algebraic: i2f(f2i()) -> trunc()")
dEQP-GLES2.functional.shaders.operator.binary_operator.div.lowp_int_vertex
ends with an unsuppored flt instruction. Use nir_lower_bool_to_bitsize to
convert this flt to a flt32 which is supported. This fixes the introduced
regression.
Cc: 20.2 <mesa-stable@lists.freedesktop.org >
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6182 >
2020-08-07 03:25:36 +00:00
Alyssa Rosenzweig
1c62b5528a
panfrost: Rename encoder/ to lib/
...
We'll want both encoding and decoding here, as a generic hardware
interface library based on GenXML.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6196 >
2020-08-06 23:54:24 +00:00
Alyssa Rosenzweig
64f3c9da87
panfrost: Inline panfrost-misc.h into panfrost-job.h
...
We only need a small subset of the defines here.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6196 >
2020-08-06 23:54:24 +00:00
Icenowy Zheng
9e397956b0
panfrost: signal syncobj if nothing is going to be flushed
...
When nothing is going to be flushed, the kernel will get no job that
signals the syncobj.
Signal it by ourselves, otherwise it will never get signaled.
Closes : #3371
Signed-off-by: Icenowy Zheng <icenowy@aosc.io >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6190 >
2020-08-06 13:16:25 +00:00
Eric Anholt
56ab105182
freedreno: Add more asserts for DST_OFF/NUM_UNIT in indirect const uploads.
...
These are just empirical alignment numbers from looking at dEQP traces of
the blob driver (a330, a418, a540, a618, a630), with one exception noted
in the comments.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5990 >
2020-08-05 23:06:55 +00:00
Eric Anholt
3e970de360
freedreno: Increase the NUM_UNIT on compute's consts in indirect dispatch.
...
Avoids tripping the assert in the next commit -- the blob never uses
num_unit % 4 != 0 for indirect const uploads.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5990 >
2020-08-05 23:06:55 +00:00
Eric Anholt
8f637d66cc
freedreno: Split ir3_const's user buffer and indirect upload APIs.
...
They're almost entirely split by whether you're uploading user buffer or
from a BO. While I'm rewriting the API, drop the emit_const ->
fdN_emit_const wrapper in favor of a #define before the header and a
little helper for the asserts.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5990 >
2020-08-05 23:06:55 +00:00
Eric Anholt
154299934d
freedreno: Rename emit_const_bo() to emit_const_ptrs().
...
I keep thinking it's the "upload from inside a BO" path when it's not.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5990 >
2020-08-05 23:06:55 +00:00
Eric Anholt
51acfe2230
freedreno/ir3: Simpify the immediates from an array of vec4 to array of dwords.
...
We usually had to split the idx/swiz out of the dword index anyway. Note
that incidentally, immediates_size now increments in vec4s instad of
4*vec4s.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5990 >
2020-08-05 23:06:55 +00:00
Eric Anholt
e873c4da08
freedreno/ir3: Merge the redundant immediate_idx/immediates_count fields
...
I got tripped up again with the index vs count vs size fields and I'd
rather we didn't store the redundant info. Settle on immediates_count as
"how many dwords of immediates we have"
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5990 >
2020-08-05 23:06:55 +00:00
Rob Clark
c4e0cae90c
gallium: replace 16BIT_TEMPS cap with 16BIT_CONSTS
...
All drivers that support mediump lowering should support 16BIT_TEMPS,
but some do not also want 16b consts to be lowered. Replace the pipe
cap in preperation to remove LowerPrecisionTemporaries.
Note: also updates reference checksums for the arm64_a630_traces job,
due to lowering more to 16b
Signed-off-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6189 >
2020-08-05 21:00:44 +00:00
Rob Clark
e0947903fc
freedreno/ir3: ir3_cmdline updates
...
1) convert to getopt, and drop most variant related options since
they aren't super-useful these days.. and easy enough to add
back if/when needed. (Also, none of the newer shader variant
options where covered before.)
2) covert to dynamically allocated shader/variant, to get things
working again after ir3_shader/_variant converted to ralloc
3) few small cleanups
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6189 >
2020-08-05 21:00:44 +00:00
Marek Olšák
283ad85944
radeonsi: call nir_split_array_vars/shrink_vec_array_vars/opt_find_array_copies
...
Loosely based on RADV and https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5668
54793 shaders in 33659 tests
Totals:
SGPRS: 2739498 -> 2739474 (-0.00 %)
VGPRS: 1534120 -> 1534256 (0.01 %)
Spilled SGPRs: 2579 -> 2579 (0.00 %)
Spilled VGPRs: 29 -> 29 (0.00 %)
Private memory VGPRs: 2176 -> 256 (-88.24 %)
Scratch size: 2220 -> 288 (-87.03 %) dwords per thread
Code Size: 55572924 -> 55584592 (0.02 %) bytes
LDS: 92 -> 92 (0.00 %) blocks
Max Waves: 966044 -> 966021 (-0.00 %)
Wait states: 0 -> 0 (0.00 %)
Totals from affected shaders:
SGPRS: 7272 -> 7248 (-0.33 %)
VGPRS: 4848 -> 4984 (2.81 %)
Spilled SGPRs: 0 -> 0 (0.00 %)
Spilled VGPRs: 0 -> 0 (0.00 %)
Private memory VGPRs: 2176 -> 256 (-88.24 %)
Scratch size: 2188 -> 256 (-88.30 %) dwords per thread
Code Size: 336332 -> 348000 (3.47 %) bytes
LDS: 18 -> 18 (0.00 %) blocks
Max Waves: 2659 -> 2636 (-0.86 %)
Wait states: 0 -> 0 (0.00 %)
| PERCENTAGE DELTAS | Shaders | SGPRs | VGPRs |SpillSGPR |SpillVGPR | PrivVGPR | Scratch | CodeSize | MaxWaves | Waits |
|------------------------|----------|----------|----------|----------|----------|----------|----------|----------|----------|----------|
| 0ad | 6| . | . | . | . | . | . | . | . | . |
| alien_isolation | 2936| . | . | . | . | . | . | . | . | . |
| anholt | 10| . | . | . | . | . | . | . | . | . |
| antichamber | 180| . | . | . | . | . | . | . | . | . |
| batman_arkham_origins | 589| . | . | . | . | . | . | . | . | . |
| bioshock-infinite | 1769| . | . | . | . | . | . | . | . | . |
| borderlands2 | 3968| . | . | . | . | . | . | . | . | . |
| borderlands_presequel | 1326| . | . | . | . | . | . | . | . | . |
| brutal-legend | 338| . | . | . | . | . | . | . | . | . |
| chromeos | 86| . | . | . | . | . | . | . | . | . |
| chromium | 2| . | . | . | . | . | . | . | . | . |
| civilization_beyond.. | 116| . | . | . | . | . | . | . | . | . |
| company_of_heroes2 | 240| . | . | . | . | . | . | . | . | . |
| counter_strike_glob.. | 1142| . | . | . | . | . | . | . | . | . |
| deadcore | 76| . | . | . | . | . | . | . | . | . |
| deus_ex_mankind_div.. | 1410| . | . | . | . | . | . | . | . | . |
| dirt-showdown | 533| . | . | . | . | . | . | . | . | . |
| dirt_rally | 364| . | . | . | . | . | . | . | . | . |
| divinity | 1052| . | . | . | . | . | . | . | . | . |
| dolphin | 22| . | . | . | . | . | . | . | . | . |
| dota2 | 1747| . | . | . | . | . | . | . | . | . |
| europa_universalis_4 | 76| . | . | . | . | . | . | . | . | . |
| f1-2015 | 775| 0.02 %| 0.12 %| . | . | -100.00 %| -100.00 %| 0.19 %| -0.04 %| . |
| furmark-0.7.0 | 4| . | . | . | . | . | . | . | . | . |
| gimark-0.7.0 | 10| . | . | . | . | . | . | . | . | . |
| glamor | 16| . | . | . | . | . | . | . | . | . |
| glmark | 96| . | . | . | . | . | . | . | . | . |
| grid_autosport | 1767| -0.03 %| 0.17 %| . | . | -85.52 %| -84.44 %| 0.40 %| -0.03 %| . |
| hitman | 1413| . | . | . | . | . | . | . | . | . |
| humus-celshading | 4| . | . | . | . | . | . | . | . | . |
| humus-domino | 6| . | . | . | . | . | . | . | . | . |
| humus-dynamicbranching | 24| . | . | . | . | . | . | . | . | . |
| humus-hdr | 10| . | . | . | . | . | . | . | . | . |
| humus-portals | 2| . | . | . | . | . | . | . | . | . |
| humus-volumetricfog.. | 6| . | . | . | . | . | . | . | . | . |
| left_4_dead_2 | 1762| . | . | . | . | . | . | . | . | . |
| legend_of_grimrock | 100| . | . | . | . | . | . | . | . | . |
| life_is_strange | 1296| . | . | . | . | . | . | . | . | . |
| mad_max | 358| . | . | . | . | . | . | . | . | . |
| many-spheres | 6| . | . | . | . | . | . | . | . | . |
| metro_2033_redux | 2670| . | 0.02 %| . | . | . | . | . | -0.02 %| . |
| nexuiz | 80| . | . | . | . | . | . | . | . | . |
| payday2 | 1362| . | . | . | . | . | . | . | . | . |
| pixmark-julia-fp32 | 2| . | . | . | . | . | . | . | . | . |
| pixmark-julia-fp64 | 2| . | . | . | . | . | . | . | . | . |
| pixmark-piano-0.7.0 | 2| . | . | . | . | . | . | . | . | . |
| pixmark-volplosion-.. | 2| . | . | . | . | . | . | . | . | . |
| plot3d-0.7.0 | 8| . | . | . | . | . | . | . | . | . |
| portal | 474| . | . | . | . | . | . | . | . | . |
| reflections_subway | 98| . | . | . | . | . | . | 0.02 %| . | . |
| rocket_league | 494| . | . | . | . | . | . | . | . | . |
| saints_row_iv | 1704| . | . | . | . | . | . | . | . | . |
| saints_row_the_third | 671| . | . | . | . | . | . | . | . | . |
| sauerbraten | 7| . | . | . | . | . | . | . | . | . |
| scifi_hallway | 98| . | . | . | . | . | . | . | . | . |
| serious_sam_3_bfe | 392| . | . | . | . | . | . | . | . | . |
| shadow_of_mordor | 1410| . | . | . | . | . | . | . | . | . |
| shadow_warrior | 3956| . | . | . | . | . | . | . | . | . |
| skia | 6094| . | . | . | . | . | . | . | . | . |
| sun_temple | 109| . | . | . | . | . | . | 0.01 %| . | . |
| supertuxkart | 4| . | . | . | . | . | . | . | . | . |
| talos_principle | 324| . | . | . | . | . | . | . | . | . |
| team_fortress_2 | 808| . | . | . | . | . | . | . | . | . |
| tesseract | 430| . | . | . | . | . | . | . | . | . |
| tessmark-0.7.0 | 6| . | . | . | . | . | . | . | . | . |
| thea | 172| . | . | . | . | . | . | . | . | . |
| tomb_raider | 1448| -0.02 %| . | . | . | . | . | . | . | . |
| total_war_warhammer | 242| . | . | . | . | . | . | . | . | . |
| ubershaders | 54| . | . | . | . | . | . | . | . | . |
| ue4_effects_cave | 290| . | . | . | . | . | . | 0.02 %| . | . |
| ue4_elemental | 561| . | . | . | . | . | . | 0.02 %| . | . |
| ue4_lightroom_inter.. | 64| . | . | . | . | . | . | . | . | . |
| ue4_realistic_rende.. | 86| . | . | . | . | . | . | . | . | . |
| unigine_heaven | 322| . | . | . | . | . | . | . | . | . |
| unigine_sanctuary | 264| . | . | . | . | . | . | . | . | . |
| unigine_tropics | 210| . | . | . | . | . | . | . | . | . |
| unigine_valley | 278| . | . | . | . | . | . | . | . | . |
| unity | 72| . | . | . | . | . | . | . | . | . |
| victor_vran | 1262| . | . | . | . | . | . | . | . | . |
| warsow | 176| . | . | . | . | . | . | . | . | . |
| warzone2100 | 4| . | . | . | . | . | . | . | . | . |
| wasteland2 | 76| . | . | . | . | . | . | . | . | . |
| wavelet-volume | 4| . | . | . | . | . | . | . | . | . |
| witcher2 | 1040| . | . | . | . | . | . | . | . | . |
| xcom_enemy_within | 1236| . | . | . | . | . | . | . | . | . |
| yofrankie | 82| . | . | . | . | . | . | . | . | . |
|------------------------|----------|----------|----------|----------|----------|----------|----------|----------|----------|----------|
| All affected | 157| -0.33 %| 2.81 %| . | . | -88.24 %| -88.30 %| 3.47 %| -0.86 %| . |
|------------------------|----------|----------|----------|----------|----------|----------|----------|----------|----------|----------|
| Total | 54793| . | . | . | . | -88.24 %| -87.03 %| 0.02 %| . | . |
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5750 >
2020-08-05 20:41:07 +00:00
Marek Olšák
47beee2eb3
radeonsi: reorder NIR optimizations
...
Based on https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5668
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5750 >
2020-08-05 20:41:07 +00:00
Pierre-Eric Pelloux-Prayer
0294eaed80
radeonsi: extend workaround for KHR-GL45.texture_view.view_classes on gfx9
...
This is a followup of 19db1a540c .
This commit fixed KHR-GL45.texture_view.view_classes on gfx9 but the test
still failed when using AMD_DEBUG=nodma or AMD_DEBUG=nodcc,nodma.
The workaround is now used from si_resource_copy_region so it covers the
previous call site (si_texture_transfer_map) and the sctx->dma_copy
fallback code.
Fixes: 19db1a540c ("radeonsi: add a workaround to fix KHR-GL45.texture_view.view_classes on gfx9")
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6115 >
2020-08-05 19:45:32 +00:00
Rob Clark
141b295311
freedreno: allow fence_fd fences to be recycled
...
This allows us to avoid a no-op flush if there has been no rendering,
but we hit pctx->flush(PIPE_FLUSH_FENCE_FD).
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6177 >
2020-08-05 19:05:29 +00:00
Marek Olšák
07a49bf597
radeonsi: disable SDMA on gfx9
...
Fixes: 9680a75489 "radeonsi/gfx9: enable SDMA buffer copying & clearing"
Acked-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4895 >
2020-08-05 18:48:35 +00:00
Eric Anholt
c92ae9d3ef
freedreno/a6xx: Document the bit for the magic 32bit-uniforms-as-16b mode.
...
Trying to figure out how uniforms were working, I found that computerator
had different behavior from our GL fragment shaders. Given that 3xx had
an SP_ bit for this (thanks flto@ for the note), it was a matter of
pasting bits of SP_* setup into computerator until I got the GL behavior.
I named it the same as the a3xx register.
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6179 >
2020-08-05 04:35:05 +00:00
Alyssa Rosenzweig
b75427cc31
panfrost: Implement EXT_multisampled_render_to_texture
...
Significantly helps WebGL performance with Chromium's OpenGL ES backend.
Also update docs/features.txt
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6161 >
2020-08-04 18:39:24 +00:00
Alyssa Rosenzweig
2c47993b69
panfrost: Add MSAA mode selection field
...
This field enables MSAA, either writing samples to separate surfaces, to
a single large-bpp surface, or implicitly resolved and to a single
surface.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6161 >
2020-08-04 18:39:24 +00:00
SureshGuttula
65d23e7fb1
radeon/vcn: Corrected vp9 ref associated data incase of target->codec is NULL
...
This patch fixes the case where less number of reference surfaces created and destoyed
on need basis. The problem comes when we are refereing old assoiciated data for newly
created target buffer with same address. Here old target buffer destroyed as that
surface is no more used as reference for next frames and when we create a new surface
for the next frame to process we will get the surfaceid and same target address
of destroyed surface.
When new surface/surface->buffer/target ,target->codec is null as we cleared when we
destroy this surface, but per ref_mapping logic, it was taking null associated data
i.e.0 as curr_ref_idx. Hence total reference mapping table goes wrong with wrong data.
Beacuse of this, we have seen corrupted vp9 decoded frames.
Signed-off-by: SureshGuttula <suresh.guttula@amd.corp-partner.google.com >
Reviewed-by: Leo Liu <leo.liu@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5452 >
2020-08-04 17:01:20 +00:00
Roman Stratiienko
9a9b35a3bb
lima: Fix lima_screen_query_dmabuf_modifiers()
...
Incorrect implementation has been found during code surfing.
v3d implementation used for reference.
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com >
Reviewed-by: Icenowy Zheng <icenowy@aosc.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6076 >
2020-08-04 13:58:33 +00:00
Christian Gmeiner
6fc52739bb
etnaviv: fix nir validation problem
...
Fixes the following validation problem:
error: nir_intrinsic_align_offset(instr) < nir_intrinsic_align_mul(instr)
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Tested-by: Lukas F. Hartmann <lukas@mntmn.com >
Acked-by: Lucas Stach <l.stach@pengutronix.de >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6127 >
2020-08-03 20:05:20 +00:00
Nanley Chery
1f24c54458
iris: Zero the add-on clear color BO on import
...
When iris imports an I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS surface, it
allocates a buffer to hold the indirect clear color. When the import is
complete, iris_resource::aux::clear_color is set to zero but the
indirect buffer is filled with garbage values. This could break certain
texture view use-cases, so zero the allocated buffer to fix those.
Fixes: c19492bcdb ("iris: Handle importing aux-enabled surfaces on TGL")
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6092 >
2020-08-03 16:24:16 +00:00
Mike Blumenkrantz
cd1c21f8e5
zink: implement handling for VK_EXT_calibrated_timestamps
...
just the extension setup; we need this to handle device timestamp
queries outside of batches
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5913 >
2020-08-03 14:22:39 +00:00
Mike Blumenkrantz
8930b19676
zink: store valid timestamp bits onto zink_screen
...
we need this for converting timestamp ticks to nonoseconds
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5913 >
2020-08-03 14:22:39 +00:00
Mike Blumenkrantz
3e6366be68
zink: handle VK_EXT_vertex_attribute_divisor setup
...
this just enables the extension
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5913 >
2020-08-03 14:22:39 +00:00
Mike Blumenkrantz
99b44536bf
zink: clamp PIPE_SHADER_CAP_MAX_SHADER_BUFFERS to PIPE_MAX_SHADER_BUFFERS
...
this value gets split between ssbos and abos, so clamping to 8 here causes
a number of tests to fail just because there's not enough buffers available
other gallium drivers return 32 here, so this seems pretty safe
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5913 >
2020-08-03 14:22:39 +00:00
Mike Blumenkrantz
01d6220cff
zink: implement VK_EXT_robustness2
...
this adds support for null descriptors, which is necessary for full
compliance with ARB_texture_buffer_object
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5913 >
2020-08-03 14:22:39 +00:00
jzielins
26dd8f8045
swr: Bump maximum 2D texture size to 16kx16k
...
This may be required by some applications, even though
not all texture formats will be below 2GB limit.
This change also increases the maximum size of render target,
that was inadvertently lowered some time ago.
Reviewed-by: Krzysztof Raszkowski <krzysztof.raszkowski@intel.com >
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6139 >
2020-08-03 13:46:51 +02:00
Mauro Rossi
b54afde3ad
android: freedreno: move a2xx disasm out of gallium
...
Fixes the following building errors:
clang: error: no such file or directory: 'external/mesa/src/gallium/drivers/freedreno/a2xx/disasm-a2xx.c'
clang: error: no input files
FAILED: out/target/product/x86_64/obj/SHARED_LIBRARIES/gallium_dri_intermediates/LINKED/gallium_dri.so
ld.lld: error: undefined symbol: disasm_a2xx
>>> referenced by ir2_assemble.c:546 (external/mesa/src/gallium/drivers/freedreno/a2xx/ir2_assemble.c:546)
>>> ir2_assemble.o:(assemble) in archive out/target/product/x86_64/obj/STATIC_LIBRARIES/libmesa_pipe_freedreno_intermediates/libmesa_pipe_freedreno.a
clang-9: error: linker command failed with exit code 1 (use -v to see invocation)
Fixes: f39afda1a7 ("freedreno: move a2xx disasm out of gallium")
Signed-off-by: Mauro Rossi <issor.oruam@gmail.com >
Acked-by: Rob Clark <robdclark@gmail.com >
Acked-by: Eric Engestrom <eric@engestrom.ch >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6151 >
2020-08-02 21:40:21 +02:00
Mauro Rossi
ca114e6273
android: freedreno/common: add support for libfreedreno_common static
...
Porting of meson build rules to Android
Fixes: 9623debf48 ("freedreno: Centralize UUID generation into new files freedreno_uuid.c/h")
Signed-off-by: Mauro Rossi <issor.oruam@gmail.com >
Acked-by: Rob Clark <robdclark@gmail.com >
Acked-by: Eric Engestrom <eric@engestrom.ch >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6151 >
2020-08-02 21:40:21 +02:00
Mike Blumenkrantz
f3509c0766
zink: add extension loading framework for spirv builder
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5969 >
2020-07-31 06:53:01 +00:00
Roman Stratiienko
a58081f97c
panfrost: Android build fixes 2020 week 31
...
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6109 >
2020-07-30 18:21:53 +00:00
Boris Brezillon
bfee35b45c
nir: Stop passing an options arg to nir_lower_int64()
...
This information is exposed through shader->options->lower_int64_options.
Removing the extra arg forces drivers to initialize this field correctly.
This also allows us to check the int64 lowering options from each int64
lowering helper and decide if we should lower the instructions we
introduce.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Matt Turner <mattst88@gmail.com >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Acked-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5588 >
2020-07-30 16:54:24 +00:00
Marcin Ślusarz
56228b0393
iris: quiet down static analyzers
...
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6067 >
2020-07-30 10:41:00 +00:00
Rob Clark
b5558f2d2a
freedreno/a6xx: fixup draw state earlier
...
`fixup_draw_state()` was updating `ctx->dirty` after it had already been
copied into the emit struct, which had the result that we were not re-
emitting the rast state when primitive_restart changes.
Fixes: 4d8f42c851 ("freedreno/a6xx: separate rast stateobj for prim restart")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3067
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6117 >
2020-07-29 20:22:05 +00:00
Rob Clark
82b419fefd
freedreno/a6xx: don't emit a bogus size for empty cb slots
...
Noticed that asphalt9 had no uniforms bound, so cb[0] is null. In
theory shouldn't cause a problem, since nothing is doing `ldc` against
cb[0], but to be safe we should use SIZE=0.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6117 >
2020-07-29 20:22:05 +00:00
Kenneth Graunke
128cbcd3a7
iris: Delete shader variants when deleting the API-facing shader
...
We were space-leaking iris_compiled_shader objects, leaving them around
basically forever - long after the associated iris_uncompiled_shader was
deleted. Perhaps even more importantly, this left the BO containing the
assembly referenced, meaning those were never reclaimed either. For
long running applications, this can leak quite a bit of memory.
Now, when freeing iris_uncompiled_shader, we hunt down any associated
iris_compiled_shader objects and pitch those (and their BO) as well.
One issue is that the shader variants can still be bound, because we
haven't done a draw that updates the compiled shaders yet. This can
cause issues because state changes want to look at the old program to
know what to flag dirty. It's a bit tricky to get right, so instead
we defer variant deletion until the shaders are properly unbound, by
stashing them on a "dead" list and tidying that each time we try and
delete some shader variants.
This ensures long running programs delete their shaders eventually.
Fixes: ed4ffb9715 ("iris: rework program cache interface")
Reviewed-by: Matt Turner <mattst88@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6075 >
2020-07-29 11:34:01 -07:00
Jason Ekstrand
5c5555a862
nir: Add a find_variable_with_[driver_]location helper
...
We've hand-rolled this loop 10 places and those are just the ones I
found easily.
Reviewed-by: Eric Anholt <eric@anholt.net >
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5966 >
2020-07-29 17:38:58 +00:00