Commit Graph

130312 Commits

Author SHA1 Message Date
Boris Brezillon edd98aac3f panfrost: Add support for native wallpapering on Bifrost
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7206>
2020-10-23 14:48:23 +00:00
Boris Brezillon a677e34e1f panfrost: Split panfrost_load_midg()
It makes it easier to read and will allow re-using common bits for
the bifrost reload logic.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7206>
2020-10-23 14:48:23 +00:00
Boris Brezillon 8892c9cde1 panfrost: Pass the texture payload through a panfrost_ptr
We want to be able to pass a payload allocated from the pool, so let's
change the function prototype to allow that.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7206>
2020-10-23 14:48:22 +00:00
Alyssa Rosenzweig 3f91d81945 panfrost: Rename gtransfer to transfer
Now that panfrost_transfer is renamed to panfrost_ptr.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7206>
2020-10-23 14:48:22 +00:00
Boris Brezillon 1b3b289c5c panfrost: Rename panfrost_transfer to panfrost_ptr
And use it in panfrost_bo to store a GPU/CPU pointer tuple.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7206>
2020-10-23 14:48:22 +00:00
Boris Brezillon bf3cd28319 panfrost: Use real name for attribute's unknown field
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7206>
2020-10-23 14:48:22 +00:00
Boris Brezillon 6b68c821d1 panfrost: Build blit shaders on Bifrost too
Now that the compiler has been patched to support all the instructions
used by blit shaders we can compile them unconditionally.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7206>
2020-10-23 14:48:22 +00:00
Boris Brezillon 69c864b0b9 panfrost: Make {midgard,bifrost}_compile_shader_nir() return a program object
Letting the caller zero-initialize the program object is error prone,
not to mention that resources attached to the program might not be freed
by the caller. Let's simplify that by letting the compiler allocate the
panfrost_program object. Those objects should be freed with ralloc_free().

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7206>
2020-10-23 14:48:22 +00:00
Boris Brezillon b83c293674 pan/bi: Add basic support for txf_ms
We currently don't support txf_ms instructions specifying a texel offset
src.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7206>
2020-10-23 14:48:22 +00:00
Boris Brezillon d33c8afe9b pan/bi: Support the case where TEXC needs 0 or 1 staging reg
No need to add a COMBINE instruction if TEXC only needs zero or one
staging reg.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7206>
2020-10-23 14:48:22 +00:00
Boris Brezillon 4aff27a68a pan/bi: Add support for load_sample_id
Sample ID is preloaded in r61.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7206>
2020-10-23 14:48:22 +00:00
Boris Brezillon e2d6156742 pan/bi: Print blend descriptor source properly
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7206>
2020-10-23 14:48:22 +00:00
Boris Brezillon 74c158011d pan/bi: Make sure we don't print special index as a register
index can have both a SPECIAL flag and PAN_IS_REG (bit 0) set, but we
shouln't treat the index as a register in that case. Let's bail out
early in bi_print_dest_index() when we're passed a special index
that's not a register.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7206>
2020-10-23 14:48:22 +00:00
Boris Brezillon a194dcc827 panfrost: Replace unkown renderer state fields by their real names
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7206>
2020-10-23 14:48:22 +00:00
Boris Brezillon 7486b5d91e panfrost: Add specialized preload descriptors
It's just easier to identify the different layouts this way.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7206>
2020-10-23 14:48:22 +00:00
Boris Brezillon d769697f35 panfrost: Add the bifrost tiler internal state field
The internal state is updated every time a tiler job is executed, and
pandecode complains that unused bits are not zero-ed when that happens.
Define the internal state (not meant to be set by the driver) to remove
those spurious errors.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7206>
2020-10-23 14:48:22 +00:00
Boris Brezillon 2f1947b39c panfrost: Fix tiler job injection
When injecting a tiler job, we shouln't make it depend on the last tiler
job, but instead make the first tiler job depend on it.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7206>
2020-10-23 14:48:22 +00:00
Boris Brezillon 519643bbe0 panfrost: Adjust the renderer state definition
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7206>
2020-10-23 14:48:22 +00:00
Connor Abbott f2ae8d116a freedreno/a6xx: Implement user clip/cull distances
Also, plumb things through ir3 so that we don't lower clip planes to
discard anymore.

This seems to fix some artifacts in the neverball trace.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6959>
2020-10-23 11:09:18 +00:00
Connor Abbott b4224c39e1 tu: Implement clip/cull distances
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6959>
2020-10-23 11:09:18 +00:00
Connor Abbott 47f825ac63 ir3: Handle clip+cull distances
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6959>
2020-10-23 11:09:18 +00:00
Connor Abbott 9e063b01b7 ir3: Switch tess lowering to use location
Clip & cull distances, which are compact arrays, exposed a lot of holes
because they can take up multiple slots and partially overlap.

I wanted to eliminate our dependence on knowing the layout of the
variables, as this can get complicated with things like partially
overlapping arrays, which can happen with ARB_enhanced_layouts or with
clip/cull distance arrays. This means no longer changing the layout
based on whether the i/o is part of an array or not, and no longer
matching producer <-> consumer based on the variables. At the end of the
day we have to match things based on the user-specified location, so for
simplicity this switches the entire i/o handling to be based off the
user location rather than the driver location. This means that the
primitive map may be a little bigger, but it reduces the complexity
because we never have to build a table mapping user location to driver
location, and it reduces the amount of work done at link time in the SSO
case. It also brings us closer to what the other drivers do.

While here, I also fixed the handling of component qualifiers, which was
another thing broken with clip/cull distances.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6959>
2020-10-23 11:09:18 +00:00
Connor Abbott 4ca38a1995 nir/lower_clip_cull: Store array size for FS inputs
I think the rationale for not setting the size for inputs is that
when passed between geometry stages the clip and cull distances are
supposed to be treated like any other varying. However, this isn't 100%
the case for the FS, since when it's read by the FS it's also used by
the fixed-function stage. In freedreno we setup varying locations when
compiling the FS, and then tack on VS-only outputs like gl_Position at
the end. Furthermore there's code to compact input locations based on
what's actually read. But this compaction can't happen for clip and cull
distances, because then we won't have space for components that are only
read by the clipper. So, we need to know the original number of
components for both arrays. Modify this pass so that we don't have to go
digging around for it ourselves.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6959>
2020-10-23 11:09:18 +00:00
Tapani Pälli cb6ce4a265 iris: fix the order of src and dst for fence memcpy
This fixes random failures with "deqp-egl --deqp-case=*multithread*":
   iris: Failed to submit batchbuffer: No such file or directory

Fixes: 6b1a56b908 ("iris: Drop stale syncobj references in fence_server_sync")
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7289>
2020-10-23 13:53:53 +03:00
Andrii Simiklit d972a6ac4c nir: get rid of OOB dereferences in nir_lower_io_arrays_to_elements
This patch fixes mesa compiler crash in i965 on shaders like the following one:
```
   in VS_OUTPUT {
      mat4 data;
   } vs_output;
   out vec4 fs_output;

   vec4 convert(in float val) {
       return vec4(val);
   }

   void main()
   {
       fs_output = vec4(0.0);
       for (int a = -1; a < 5; a++) {
           for (int b = -1; b < 5; b++) {
               fs_output += convert(vs_output.data[b][a]);
           }
       }
   }
```

Section 5.11 (Out-of-Bounds Accesses) of the GLSL 4.60 spec says:
   In the subsections described above for array, vector, matrix and
   structure accesses, any out-of-bounds access produced undefined
   behavior....
   Out-of-bounds reads return undefined values, which
   include values from other variables of the active program or zero.
   Out-of-bounds writes may be discarded or overwrite
   other variables of the active program.

GL_KHR_robustness and GL_ARB_robustness encourage us to return zero
for reads.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Signed-off-by: Andrii Simiklit <andrii.simiklit@globallogic.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6560>
2020-10-23 09:51:38 +00:00
Samuel Pitoiset 33c9d4bf31 radv: replace RADV_TRACE_FILE by RADV_DEBUG=hang
The trace file will be dumped as part of the hang report into
$HOME/radv_dumps_<pid>/trace.log if a GPU hang is detected.

The old and famous RADV_TRACE_FILE envvar is now deprecated.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7233>
2020-10-23 07:35:00 +00:00
Samuel Pitoiset 9516f9369e radv: re-order GPU hang report dumps by usefulness
In case the GPU recover, it's probably better to dump useful info
first.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7233>
2020-10-23 07:35:00 +00:00
Samuel Pitoiset 719b9b3e27 radv: dump GPU hang report logs into $HOME/radv_dumps_<pid>
This creates a directory and save various logs (dmesg, umr,
pipeline, gpu info, etc) instead of printing stuff to stdout/stderr.

This dumps the following files when a GPU hang is detected:
- dmesg.log
- gpu_info.lo
- options.log
- pipeline.log (shaders including SPIR-V if spirv-dis found)
- registers.log
- trace.log
- vm_fault (if a VM fault is detected)
- umr_ring.log (if UMR found)
- umr_waves.log (if UMR found)

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7233>
2020-10-23 07:35:00 +00:00
Samuel Pitoiset ef6d374307 radv: dump UMR ring and waves into the hang report
Gitlab: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3620
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7233>
2020-10-23 07:35:00 +00:00
Samuel Pitoiset 18477241c1 radv: add radv_dump_cmd() helper
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7233>
2020-10-23 07:35:00 +00:00
Samuel Pitoiset bf66bbda80 ac: add an option to dump GPU info to a file
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7233>
2020-10-23 07:35:00 +00:00
Iago Toral Quiroga 5f16c5b6f9 v3dv: properly describe swap_color_rb
This key field is only used for V3D versions before 4.1, so it
should not be set for v3dv. Also, it is a mask not a boolean.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7271>
2020-10-23 09:19:02 +02:00
Iago Toral Quiroga d8cabe0cbe v3dv: compute swap_rb flag after applying all swizzles
We were computing this too early based on the view's format alone
which is not correct, since we need to consider the view's swizzle
as well.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7271>
2020-10-23 09:19:02 +02:00
Iago Toral Quiroga 40788be134 v3d/compiler: fix BGRA vertex attributes for vec2/float size.
We don't natively support BGRA format, instead we handle these
as RGBA and we lower the loads to swap components R and B.

However, the driver emits VPM loads based on the size of the
input variables so when we have a vec2 or float BGRA input,
it would only emit VPM loads for components 0 and 1, which is
not correct since we emit a load of component 2 to swap with
component 0.

v2: handle GL legacy vertex inputs gracefully.

Fixes:
dEQP-VK.draw.output_location.array.b8g8r8a8-unorm-highp-output-vec2
dEQP-VK.draw.output_location.array.b8g8r8a8-unorm-mediump-output-vec2

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7271>
2020-10-23 09:19:02 +02:00
Iago Toral Quiroga c15468d782 broadcom/cle: fix vec size dump when set to 0
There are two bits for the vector size of a vertex input, with the
value 0 meaning 4 components. The CLE decoder seems to try and dump
"4" instead of "0" is to be a bit more user friendly, but it had an
off-by-one error that would cause it to dump "2" instead.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7271>
2020-10-23 09:19:02 +02:00
Vinson Lee 53fc3eb4a2 glsl: Initialize lower_shared_reference_visitor members.
Fix defects reported by Coverity Scan.

Uninitialized scalar field (UNINIT_CTOR)
uninit_member: Non-static class member buffer_access_type is not
initialized in this constructor nor in any functions that it
calls.
uninit_member: Non-static class member progress is not initialized
in this constructor nor in any functions that it calls.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7243>
2020-10-23 00:27:03 +00:00
Thong Thai 0eccd15852 frontends/va: Return P010/P016 as possible surface formats when encoding
When gstreamer's vaapih265enc queries for possible surface formats, it
only queries using VA_RT_FORMAT_YUV420, so add P010 and P016 as possible
surface formats to enable 10-bit/16-bit encoding.

Signed-off-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7268>
2020-10-23 00:14:42 +00:00
Aníbal Limón b50f40fa5a src/util/disk_cache_os.c: Add missing headers for open/fcntl
Fixes, strict musl build [1],

...
17:25:31 ../git/src/util/disk_cache_os.c: In function 'disk_cache_load_item':
17:25:31 ../git/src/util/disk_cache_os.c:526:9: error: implicit declaration of function 'open'; did you mean 'popen'? [-Werror=implicit-function-declaration]
17:25:31   526 |    fd = open(filename, O_RDONLY | O_CLOEXEC);
17:25:31       |         ^~~~
17:25:31       |         popen
17:25:31 ../git/src/util/disk_cache_os.c:526:24: error: 'O_RDONLY' undeclared (first use in this function)
17:25:31   526 |    fd = open(filename, O_RDONLY | O_CLOEXEC);
17:25:31       |                        ^~~~~~~~
17:25:31 ../git/src/util/disk_cache_os.c:526:24: note: each undeclared identifier is reported only once for each function it appears in
17:25:31 ../git/src/util/disk_cache_os.c:526:35: error: 'O_CLOEXEC' undeclared (first use in this function); did you mean 'MFD_CLOEXEC'?
17:25:31   526 |    fd = open(filename, O_RDONLY | O_CLOEXEC);
17:25:31       |                                   ^~~~~~~~~
17:25:31       |                                   MFD_CLOEXEC
17:25:31 ../git/src/util/disk_cache_os.c: In function 'disk_cache_write_item_to_disk':
17:25:31 ../git/src/util/disk_cache_os.c:666:28: error: 'O_WRONLY' undeclared (first use in this function)
17:25:31   666 |    fd = open(filename_tmp, O_WRONLY | O_CLOEXEC | O_CREAT, 0644);
17:25:31       |                            ^~~~~~~~
17:25:31 ../git/src/util/disk_cache_os.c:666:39: error: 'O_CLOEXEC' undeclared (first use in this function); did you mean 'MFD_CLOEXEC'?
17:25:31   666 |    fd = open(filename_tmp, O_WRONLY | O_CLOEXEC | O_CREAT, 0644);
17:25:31       |                                       ^~~~~~~~~
17:25:31       |                                       MFD_CLOEXEC
17:25:31 ../git/src/util/disk_cache_os.c:666:51: error: 'O_CREAT' undeclared (first use in this function)
17:25:31   666 |    fd = open(filename_tmp, O_WRONLY | O_CLOEXEC | O_CREAT, 0644);
17:25:31       |                                                   ^~~~~~~
17:25:31 ../git/src/util/disk_cache_os.c:705:30: error: 'O_RDONLY' undeclared (first use in this function)
17:25:31   705 |    fd_final = open(filename, O_RDONLY | O_CLOEXEC);
17:25:31       |                              ^~~~~~~~
17:25:31 ../git/src/util/disk_cache_os.c: In function 'disk_cache_mmap_cache_index':
17:25:31 ../git/src/util/disk_cache_os.c:902:20: error: 'O_RDWR' undeclared (first use in this function)
17:25:31   902 |    fd = open(path, O_RDWR | O_CREAT | O_CLOEXEC, 0644);
17:25:31       |                    ^~~~~~
17:25:31 ../git/src/util/disk_cache_os.c:902:29: error: 'O_CREAT' undeclared (first use in this function)
17:25:31   902 |    fd = open(path, O_RDWR | O_CREAT | O_CLOEXEC, 0644);
17:25:31       |                             ^~~~~~~
17:25:31 ../git/src/util/disk_cache_os.c:902:39: error: 'O_CLOEXEC' undeclared (first use in this function); did you mean 'MFD_CLOEXEC'?
17:25:31   902 |    fd = open(path, O_RDWR | O_CREAT | O_CLOEXEC, 0644);
17:25:31       |                                       ^~~~~~~~~
17:25:31       |                                       MFD_CLOEXEC
17:25:31 cc1: some warnings being treated as errors
...

[1] https://ci.linaro.org/job/lt-qcom-openembedded-meta-qcom-master-premerge/MACHINE=qrb5165-rb5,TCLIBC=musl,label=docker-buster-amd64/87/console

Signed-off-by: Aníbal Limón <anibal.limon@linaro.org>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7146>
2020-10-22 22:28:40 +00:00
Sagar Ghuge ddca93ddf7 anv: Enable stencil buffer compression on Gen12+
v2: (Nanley Chery)
- Fix condition check.
- Move aux_usage assignment after add_aux_state_tracking_buffer method.

v3: (Nanley Chery)
- Move stencil condition close to depth block.

v4: (Nanley Chery)
- Add DEBUG_NO_RBC condition.

v5: (Nanley Chery)
- Don't add CCS plane explicitly.
- Use isl_surf_supports_ccs.

v6:
- Simplify condition (Nanley Chery)

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2942>
2020-10-22 21:42:36 +00:00
Sagar Ghuge dc22d6b3ab anv: Pass correct stencil aux usage during MSAA resolve
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2942>
2020-10-22 21:42:36 +00:00
Sagar Ghuge 993a2a7122 anv: Return optimal aux state for stencil buffer compression
v2:
- Assert on aux_supported. (Nanley Chery)

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2942>
2020-10-22 21:42:36 +00:00
Sagar Ghuge 815e6c8ef4 anv: Don't track clear bo for stencil buffer compression
On Gen12+, stencil buffer compression does not support fast clear so we
don't have to track clear address for it.

v2:
- Use isl_aux_usage_has_fast_clears (Nanley Chery)

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2942>
2020-10-22 21:42:36 +00:00
Sagar Ghuge d34ab5071a anv: Get aux usage from plane while clearing stencil buffer
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2942>
2020-10-22 21:42:36 +00:00
Sagar Ghuge c76ebc0c7a anv: Set stencil_aux_usage flag
v2: Use image aux usage (Nanley Chery)

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2942>
2020-10-22 21:42:36 +00:00
Sagar Ghuge be2ca24da5 anv: Handle compressed stencil buffer transition on Gen12+
Handle compressed stencil buffer transition from one layout to another
on gen12+.

When stencil compression is enabled, we have to initialize buffer via
stencil clear (HZ_OP) before any renderpass.

v2:
- Pass predicate bit false to anv_image_ccs_op (Nanley Chery)

v3:
- update aspect assertion (Nanley Chery)

v4:
- Make state decision based on anv_layout_to_aux_state instated of
  anv_layout_to_aux_usage (Sagar Ghuge)

v5:
- No need to handle stencil CCS resolve case (Jason Ekstrand)
- Initialize buffer using HZ_OP (Nanley Chery)

v6: (Nanley Chery)
- Pass correct layer/level count.
- Remove local variable.

v7:
- Skip stencil initialization with HZ_OP packet if followed by fast
  clear. (Nanley Chery)

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2942>
2020-10-22 21:42:36 +00:00
Sagar Ghuge c2a4102848 anv: Return number of layers/levels attached to anv_image
Don't check the auxiliary surface's ISL surf in order to return the
surface levels/layers instead we can return the anv_image parameter.

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2942>
2020-10-22 21:42:36 +00:00
Ian Romanick 67956689bb nir: Rename replicated-result dot-product instructions
All these instructions replicate the result of a N-component dot-product
to a vec4.  Naming them fdot_replicatedN gives the impression that are
some sort of abstract dot-product that replicates the result to a vecN.
They also deviate from fdph_replicated... which nobody would reasonably
consider naming fdot_replicatedh.

Naming these opcodes fdotN_replicated more closely matches what they
are, and it matches the pattern of fdph_replicated.

I believe that the only reason these opcodes were named this way was
because it simplified the implementation of the binop_reduce function in
nir_opcodes.py.  I made some fairly simple changes to that function, and
I think the end result is ok.

The bulk of the changes come from the sed rename:

    sed --in-place -e 's/fdot_replicated\([234]\)/fdot\1_replicated/g' \
        $(grep -r 'fdot_replicated[234]' src/)

v2: Use a named parameter to binop_reduce instead of using
isinstance(name, str).  Suggested by Jason.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5725>
2020-10-22 18:00:19 +00:00
Jan Beich 8cee9ce750 spirv: switch to util_bswap32 to improve portability
`bswap_32` and `<byteswap.h>` aren't available on BSDs. Instead the
same function is spelled slightly different and is provided by
different header file. However, Mesa provides `util_bswap32` to avoid
complicated conditionals.

Fixes: fb6b243c11 ("spirv: Support big-endian strings")
Tested-by: Piotr Kubaj <pkubaj@FreeBSD.org>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7257>
2020-10-22 17:02:49 +00:00
Eric Anholt 7e28fbd8bc ci: Add the new timeout-prone softpipe-gl test to the skips list.
The NIR path does a whole lot more work on this testcase and we often time
out, even after the NIR validation speedup.

Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7279>
2020-10-22 16:49:41 +00:00
Eric Anholt 18cef9c514 docs: Fix "Hosted by" link and drop duplicate.
We had two links to planet.fdo, with "Hosted by" incorrectly pointing to
it instead of the top-level "what is fdo".

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7258>
2020-10-22 16:46:40 +00:00