Ian Romanick
114e078001
tnl: Silence unused parameter warnings in _tnl_draw_prims
...
A tangled mess of a couple parameters that nobody wanted.
src/mesa/tnl/t_draw.c: In function ‘_tnl_draw_prims’:
src/mesa/tnl/t_draw.c:440:42: warning: unused parameter ‘tfb_vertcount’ [-Wunused-parameter]
440 | struct gl_transform_feedback_object *tfb_vertcount,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
src/mesa/tnl/t_draw.c:441:35: warning: unused parameter ‘stream’ [-Wunused-parameter]
441 | unsigned stream)
| ~~~~~~~~~^~~~~~
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4512 >
2020-04-13 10:26:48 -07:00
Ian Romanick
1996f1d3dd
tnl: Silence unused parameter 'attrib' warning in convert_half_to_float
...
Also clean up some trivial code / whitespace style issues.
src/mesa/tnl/t_draw.c: In function ‘convert_half_to_float’:
src/mesa/tnl/t_draw.c:121:57: warning: unused parameter ‘attrib’ [-Wunused-parameter]
121 | const struct gl_array_attributes *attrib,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4512 >
2020-04-13 10:26:45 -07:00
Ian Romanick
7a03240b63
tnl: Don't dereference NULL obj pointer in t_rebase_prims
...
Structurally the code is now similar to the handling of other
gl_buffer_object::obj pointers elsewhere in TNL. The fixes tag is a
little bit misleading. I think the change in that commit just exposes a
previously existing bug.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2746
Fixes: f3cce7087a ("mesa: don't ever bind NullBufferObj for glBindBuffer targets")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4512 >
2020-04-13 10:26:43 -07:00
Ian Romanick
2e43b32e72
tnl: Don't dereference NULL obj pointer in replay_init
...
Structurally the code is now similar to the handling of other
gl_buffer_object::obj pointers elsewhere in TNL. The fixes tag is a
little bit misleading. I think the change in that commit just exposes a
previously existing bug.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2746
Fixes: f3cce7087a ("mesa: don't ever bind NullBufferObj for glBindBuffer targets")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4512 >
2020-04-13 10:26:40 -07:00
Ian Romanick
65f14fd68d
tnl: Don't dereference NULL obj pointer in bind_indices
...
Structurally the code is now similar to bind_inputs. The fixes tag is a
little bit misleading. I think the change in that commit just exposes a
previously existing bug.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2746
Fixes: f3cce7087a ("mesa: don't ever bind NullBufferObj for glBindBuffer targets")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4512 >
2020-04-13 10:26:38 -07:00
Daniel Schürmann
28d36d26c2
aco: fix p_extract_vector optimization in presence of unequally sized vector operands
...
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4506 >
2020-04-13 16:35:40 +00:00
Alyssa Rosenzweig
0e4432bfba
pan/bi: Lower fsqrt
...
For G72+ anyway. G71 will want something a bit more fine grained. I hope
this has enough precision for GL (the blob apparently does some exponent
fixup).
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4530 >
2020-04-13 15:44:31 +00:00
Alyssa Rosenzweig
3025ea6abe
panfrost: Drop dependency on nonexistant write_value
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4530 >
2020-04-13 15:44:31 +00:00
Tapani Pälli
53e4159eaa
glsl: stop processing function parameters if error happened
...
Fixes: d1fa69ed61 ("glsl: do not attempt assignment if operand type not parsed correctly")
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2696
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4341 >
2020-04-13 15:53:15 +03:00
Samuel Pitoiset
fc1068de0d
aco: fix nir_op_pack_32_2x16_split if one operand is a constant
...
Because 16-bit constants are represented with the s1 RegClass, we
have to extract the low half.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4509 >
2020-04-13 11:51:17 +00:00
Samuel Pitoiset
4cfaef68d7
aco: implement 16-bit nir_op_f2i64/nir_op_f2u64
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4509 >
2020-04-13 11:51:17 +00:00
Samuel Pitoiset
729bdc0d70
aco: fix f2i64/f2u64 with sgprs if the exponent computation overflow
...
This fixes f16->{i64,u64} conversions for +0/-0.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4509 >
2020-04-13 11:51:17 +00:00
Michel Dänzer
6a8e5dde66
gitlab-ci: Use all_paths in .test-manual rules
...
Without this, the .test-manual jobs could end up as 'when: manual' when
the jobs they depend on were 'when: never', which was flagged as
invalid YAML, preventing the pipeline from being created.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4522 >
2020-04-13 10:29:48 +00:00
Ilia Mirkin
5e6267b20b
nvc0: add NV_viewport_swizzle support for GM200+
...
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4519 >
2020-04-12 12:01:46 -04:00
Ilia Mirkin
90fcb3fef2
st/mesa: add NV_viewport_swizzle support
...
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4519 >
2020-04-12 12:01:46 -04:00
Ilia Mirkin
ff168b297d
mesa: add GL_NV_viewport_swizzle support
...
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4519 >
2020-04-12 12:01:46 -04:00
Ilia Mirkin
4137a79c2a
gallium: add viewport swizzling state and cap
...
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4519 >
2020-04-12 12:01:46 -04:00
Tapani Pälli
e2457bedd3
glsl: remove redudant assignment
...
CID: 1461087
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Andres Gomez <agomez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4500 >
2020-04-12 16:48:53 +03:00
Tapani Pälli
e667802a7c
mesa: remove redudant assignment
...
CID: 1461397
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Andres Gomez <agomez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4500 >
2020-04-12 16:48:45 +03:00
Tapani Pälli
fd24172200
mesa: remove redudant check
...
CID: 1461410
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Andres Gomez <agomez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4500 >
2020-04-12 16:48:27 +03:00
Qiang Yu
25a61cce7d
lima: set offset when export resource
...
We missed set reource offset.
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4517 >
2020-04-12 10:02:24 +00:00
Lionel Landwerlin
4094558e86
i965: share buffer managers across screens
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: <mesa-stable@lists.freedesktop.org>
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/1373
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Rafael Antognolli <rafael.antognolli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4086 >
2020-04-11 22:04:37 +03:00
Lionel Landwerlin
865b840a6b
i965: store DRM fd on intel_screen
...
v2: Fix storing of drm fd (Ajax)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: <mesa-stable@lists.freedesktop.org>
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/1373
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Rafael Antognolli <rafael.antognolli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4086 >
2020-04-11 22:04:33 +03:00
Lionel Landwerlin
0a497eb130
iris: make resources take a ref on the screen object
...
Because St creates resources from a screen and attach them onto
another we need to ensure the resources associated to a screen &
bufmgr stay around until we don't need them anymore.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: <mesa-stable@lists.freedesktop.org>
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/1373
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Rafael Antognolli <rafael.antognolli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4086 >
2020-04-11 22:04:28 +03:00
Lionel Landwerlin
7557f16059
iris: share buffer managers accross screens
...
St happilly uses pipe_resources created with one screen with other
screens. Unfortunately our resources have a single identifier that
related to a given screen and its associated DRM file descriptor.
To workaround this, let's share the buffer manager between screens for
a given DRM device. That way handles are always valid.
v2: Don't forget to close the fd that bufmgr now owns
Take a copy of the fd to ensure it stays alive even if the dri
layer closes it
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: <mesa-stable@lists.freedesktop.org>
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/1373
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Rafael Antognolli <rafael.antognolli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4086 >
2020-04-11 22:04:25 +03:00
Lionel Landwerlin
bd3e505453
iris: properly free resources on BO allocation failure
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Rafael Antognolli <rafael.antognolli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4086 >
2020-04-11 22:04:22 +03:00
Rob Clark
7aa6720ba4
freedreno/log: better decoding for multiple chunks per batch
...
For larger render targets or smaller GMEM size, we could end up needing
multiple chunks of tracepoints per batch. But we still want to decode
the traces as single batch. So we need a bit of a state across
process_chunk() calls to accumulate timestamp information.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4510 >
2020-04-10 19:29:54 +00:00
Rob Clark
7aa55f5acb
freedreno/log: spiff out parser some more
...
Extract breakdown of time in GMEM passes.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4510 >
2020-04-10 19:29:54 +00:00
Rob Clark
b5b32387d6
freedreno/log: android support
...
In particular, when stdout doesn't go anywhere useful we need to log to
file.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4510 >
2020-04-10 19:29:54 +00:00
Eric Anholt
904d5d63b4
freedreno: Fix leak of binning shader variants.
...
The v->binning variant is never added to shader->variants, so just free
each one as we free the nonbinning variant.
Noticed from drm-shim mode running out of open fds, since each bo ends up
with an fd.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4502 >
2020-04-10 18:42:20 +00:00
Kristian H. Kristensen
5ec1f264f1
freedreno/ir3: Fix sz vs class confusion
...
Add bounds checking to make sure we don't silently access out of
bounds again.
Fixes: 90f7d12236 ("freedreno/ir3/ra: pick higher numbered scalars in first pass")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4503 >
2020-04-10 10:24:14 -07:00
Alyssa Rosenzweig
65e2eaa4d3
pan/decode: Print Bifrost blend descriptor
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4505 >
2020-04-10 16:54:02 +02:00
Alyssa Rosenzweig
80dd692813
pan/bi: Let !b2b imply branch_cond
...
Like the blob. Probably doesn't matter.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4505 >
2020-04-10 16:53:59 +02:00
Alyssa Rosenzweig
3439c24bdb
panfrost: Fix BI_BLEND packing
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4505 >
2020-04-10 16:53:57 +02:00
Alyssa Rosenzweig
e34add229f
pan/bi: Fix backwards registers ports
...
Will matter when packing multiple instructions per bundle.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4505 >
2020-04-10 16:53:56 +02:00
Alyssa Rosenzweig
23620d1830
panfrost: Pass compiler-appropriate options
...
FMAs need to fuse for Bifrost.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4505 >
2020-04-10 16:53:54 +02:00
Alyssa Rosenzweig
e30091bc51
panfrost: Move uniform_count to pan_assemble
...
Again, not Midgard specific.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4505 >
2020-04-10 16:53:53 +02:00
Alyssa Rosenzweig
d10423989e
panfrost: Move varying linking to cmdstream
...
This isn't ISA/compiler specific, it's just looking at the NIR. So let's
move it from midgard to pan_assemble.c so it runs for Bifrost too.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4505 >
2020-04-10 16:53:51 +02:00
Alyssa Rosenzweig
776697dd34
pan/midgard: Remove unused max_varying variable
...
I don't know why this was here.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4505 >
2020-04-10 16:53:50 +02:00
Alyssa Rosenzweig
90e02db9a1
pan/bi: Fix nondeterministic register packing
...
Uninitialized read.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4505 >
2020-04-10 16:53:48 +02:00
Alyssa Rosenzweig
8016906cf2
panfrost: Call the Bifrost compiler on bi devices
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4505 >
2020-04-10 16:53:47 +02:00
Alyssa Rosenzweig
0a9fa4bcb6
panfrost: Set mfbd.msaa.sample_locations on Bifrost
...
And mfbd.shared_memory only on Midgard.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4505 >
2020-04-10 16:53:44 +02:00
Tomeu Vizoso
46e4246d49
panfrost: On Bifrost, set the right tiler descriptor
...
On both fragment and tiler jobs.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4505 >
2020-04-10 16:53:39 +02:00
Tomeu Vizoso
547f999e2c
panfrost: Don't emit write_value jobs on Bifrost
...
As on Bifrost GPUs there's a different mechanism for reusing the tiler
data structures.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4505 >
2020-04-10 16:53:31 +02:00
Tomeu Vizoso
30e7027e1c
panfrost: Pass IS_BIFROST to pandecode_jc
...
So we can decode the right structures on Bifrost hw.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4505 >
2020-04-10 16:53:21 +02:00
Tomeu Vizoso
7b10d4ece6
panfrost: Remove most usage of midgard_payload_vertex_tiler
...
By passing the prefix and postfix structs around, we can use most of the
cmdstream functions as well for bifrost, as those structs haven't
changed between midgard and bifrost.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4505 >
2020-04-10 16:53:03 +02:00
Alyssa Rosenzweig
b010a6d5f1
panfrost: Unify vertex/tiler structures
...
Some fields were shuffled but these are essentially the same across the
generations.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4505 >
2020-04-10 16:52:59 +02:00
Alyssa Rosenzweig
aee68b06c8
panfrost: Staticize a few cmdstream functions
...
They are only used within the same source file.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4505 >
2020-04-10 16:52:56 +02:00
Alyssa Rosenzweig
dd09571c77
panfrost: Populate bifrost-specific structs within mali_shader_meta
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4505 >
2020-04-10 16:52:54 +02:00
Alyssa Rosenzweig
b096a1dbd3
panfrost: Add IS_BIFROST quirk
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4505 >
2020-04-10 16:51:57 +02:00