Commit Graph

103261 Commits

Author SHA1 Message Date
Marek Olšák
99c6cae227 glsl/cache: save and restore ExternalSamplersUsed
Shaders that need special code for external samplers were broken if
they were loaded from the cache.

Cc: 18.1 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2018-06-30 01:04:16 -04:00
Timothy Arceri
463f849097 nir: fix selection of loop terminator when two or more have the same limit
We need to add loop terminators to the list in the order we come
across them otherwise if two or more have the same exit condition
we will select that last one rather than the first one even though
its unreachable.

This fix is for simple unrolls where we only have a single exit
point. When unrolling these type of loops the unreachable
terminators and their unreachable branch are removed prior to
unrolling. Because of the logic change we also switch some
list access in the complex unrolling logic to avoid breakage.

Fixes: 6772a17acc ("nir: Add a loop analysis pass")

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2018-06-30 10:13:03 +10:00
Timothy Arceri
18293be622 radeonsi: enable OpenGL 4.4 compat profile
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2018-06-30 08:38:33 +10:00
Timothy Arceri
ddb351f7fe mesa: enable ARB_vertex_attrib_64bit in compat profile
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2018-06-30 08:38:33 +10:00
Timothy Arceri
c283b413c1 mesa: add outstanding ARB_vertex_attrib_64bit dlist support
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2018-06-30 08:38:33 +10:00
Dave Airlie
98d02104a7 vbo_save: add support for doubles to display list code
Required for ARB_vertex_attrib_64bit compat profile support.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2018-06-30 08:38:33 +10:00
Timothy Arceri
d2caa37741 mesa: add compat profile support for ARB_multi_draw_indirect
v2: add missing ARB_base_instance support

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2018-06-30 08:38:33 +10:00
Timothy Arceri
103b8f11d6 mesa: make valid_draw_indirect_multi() accessible externally
We will use this to add compat support to ARB_multi_draw_indirect
in the following patch.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2018-06-30 08:38:33 +10:00
Timothy Arceri
5f90fb4007 mesa: add ARB_draw_indirect support to compat profile
v2: add missing ARB_base_instance support

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2018-06-30 08:38:33 +10:00
Timothy Arceri
9b32c80357 mesa: generate GL_INVALID_OPERATION using draw indirect in dlist
The spec doesn't explicitly say to generate an error but since
DrawArraysInstanced* and DrawElementsInstanced* do, it makes
sense to do it for these functions also.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2018-06-30 08:38:33 +10:00
Timothy Arceri
03f1a2e8df mesa: add missing display list support for ARB_compute_shader
The extension is enabled for compat profile but there is currently
no display list support.

I filed a spec bug and it has been agreed that
glDispatchComputeIndirect should generate an INVALID_OPERATION
error when called during display list compilation.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2018-06-30 08:38:33 +10:00
Timothy Arceri
87d6093583 mesa: expose some ARB_viewport_array dependent extensions in compat
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2018-06-30 08:38:33 +10:00
Timothy Arceri
d87913e72a mesa: enable ARB_viewport_array in compat profile
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2018-06-30 08:38:33 +10:00
Timothy Arceri
d332986589 mesa: add ARB_viewport_array display list support
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2018-06-30 08:38:33 +10:00
Timothy Arceri
df5e22cb7d mesa: enable ARB_shader_subroutine in compat profile
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2018-06-30 08:38:33 +10:00
Timothy Arceri
05f3589e67 mesa: add glUniformSubroutinesuiv() display list support
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2018-06-30 08:38:33 +10:00
Timothy Arceri
52e3ef2400 mesa: stop hiding remaining query parameters from OpenGL compat
I managed to miss these two in my last pass at this.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2018-06-30 08:38:33 +10:00
Timothy Arceri
9f77a9729e mesa: enable ARB_gpu_shader_fp64 in compat profile
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2018-06-30 08:38:33 +10:00
Timothy Arceri
a138fbc955 mesa: add ProgramUniform*d display list support
This is required for fp64 to be enabled in compat profile.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2018-06-30 08:38:32 +10:00
Timothy Arceri
145f517cbd mesa: add Uniform*d support to display lists
This is required so we can enable fp64 support in compat profile.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2018-06-30 08:38:32 +10:00
Karol Herbst
04b443104d st/glsl_to_nir: run lower_output_reads on !PIPE_CAP_TGSI_CAN_READ_OUTPUTS
this is required for Drivers which don't allow reading from outputs.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Signed-off-by: Karol Herbst <kherbst@redhat.com>
2018-06-29 23:43:26 +02:00
Eric Anholt
a77cb724da v3d: Move GL shader state dumping out of per-version compilation.
It doesn't depend on V3D_VER, since it's just calling v3d_print_group.
2018-06-29 13:36:28 -07:00
Eric Anholt
c2901ff80f v3d: Add missing Stream field to transform feedback specs on V3D 4.1.
Noticed when trying to CLIF parse a transform feedback job that hangs on
HW.
2018-06-29 13:36:28 -07:00
Eric Anholt
69efc1e025 v3d: Add missing "tri trip or fan" flag in Primitive List Format. 2018-06-29 13:36:28 -07:00
Eric Anholt
b341b39db3 v3d: Fix the shader code address field widths on V3D 4.1+
We were overlapping it with the threadable/nan flags, resulting in
incorrect relocations (threadable/nan included in the offset) and wrong
ordering in the CLIF files.
2018-06-29 13:36:28 -07:00
Eric Anholt
6c3c11ba19 v3d: Add missing "no prim pack" field to the V3D4.1+ GL shader state.
It looks like we don't need this flag for anything (not that I'm clear on
what it does), but it makes our struct dumping line up with CLIF parsing.
2018-06-29 13:36:28 -07:00
Eric Anholt
c0476d964a v3d: Express dithering mode in the same way that the CLIF parser does. 2018-06-29 13:36:28 -07:00
Eric Anholt
24d2f1347d v3d: Add missing "number of bin tile lists" field.
Noticed when trying to feed our dumps through the CLIF parser.  Since this
is a "minus one" field, we were already filling in the value we wanted (0).
2018-06-29 13:36:28 -07:00
Eric Anholt
b65b61cefe v3d: Rewrite the color write masks to match CLIF format.
The render_target_* fields gave us pretty(ish) printing, but meant we were
incompatible with CLIF, and had much more verbose code generating them.
2018-06-29 13:36:28 -07:00
Eric Anholt
38172dcba9 v3d: Merge the V3D 4.1 and 4.2 XML into V3D 3.3'x XML.
The XML ends up noisier if you're only looking at one version, but from
the diffstat there's obvious wins in terms of deduplication.  This will
get even more significant if we ever support 3.2 or 4.0.
2018-06-29 13:36:28 -07:00
Eric Anholt
725561c0b6 v3d: Switch v3d_decoder.c to the XML's top min_ver/max_ver fields.
The XML zipper wants one XML per version for filling out its tables, but
we want to do more than one GPU version per XML now.  Assume that the
"gen" field will be the same as min_ver and look up our XML text assuming
that they're listed in increasing min_ver.
2018-06-29 13:36:28 -07:00
Eric Anholt
f8af5c58c3 v3d: Create XML fields for min_ver and max_ver of a packet/struct/enum.
This will be used to merge together the V3D 3.3-4.1 XML with the variants
disabled based on the version.
2018-06-29 13:36:28 -07:00
Eric Anholt
6f7ad7ed11 v3d: Pass the version being generated to the pack generator script.
It turns out that most V3D versions change very few packets, so keeping
separate copies of the XML per version makes changing the XML a pain as
you have to replicate your changes to each one.  This is the start of
changing it so that one XML can generate headers for multiple versions.
2018-06-29 13:36:28 -07:00
Jose Maria Casanova Crespo
a99c9e63a0 anv: finish the binding_table_pool on destroyDevice when use_softpin
Running VK-CTS in batch execution mode was raising the
VK_ERROR_INITIALIZATION_FAILED error in multiple tests. But when the
same failing tests were run isolated they always passed.

createDevice and destroyDevice were called before and after every
tests. Because the binding_table_pool was never closed, we reached the
maximum number of open file descriptors (ulimit -n) and when that
happened every call to createDevice implied a
VK_ERROR_INITIALIZATION_FAILED error.

Fixes: c7db0ed4e9
      ("anv: Use a separate pool for binding tables when soft pinning")

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2018-06-29 21:49:31 +02:00
Marek Olšák
ea8b55b49f gallium/util: remove dummy function util_format_is_supported
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
2018-06-29 15:31:49 -04:00
Dylan Baker
82bf8a6a82 docs: update calendar, add news and link release notes to 18.1.3 2018-06-29 11:04:22 -07:00
Dylan Baker
9dfcf044f7 docs: Add SHA256 sums to notes for 18.1.3 2018-06-29 11:02:41 -07:00
Dylan Baker
2fa6c3821f docs: Add release notes for 18.1.3 2018-06-29 11:02:39 -07:00
Rhys Perry
ffba56cc3c nv50/ir: improve maintainability of Target*::initOpInfo()
This is mainly useful for when one needs to add new opcodes in a painless
and reliable way.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Signed-off-by: Karol Herbst <kherbst@redhat.com>
2018-06-29 16:47:27 +02:00
Rhys Perry
d885303a38 nv50/ir: fix image stores with indirect handles
Having this if statement here prevented the next if statement from being
reached in the case of image stores, which is needed for instructions with
indirect bindless handles like "STORE TEMP[ADDR[2].x+1](1) ...".

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Signed-off-by: Karol Herbst <kherbst@redhat.com>
2018-06-29 16:07:59 +02:00
Ross Burton
d7c4ce1d1d egl: fix build race in automake
There is a parallel make build issue in src/egl/drivers/dri2/
for wayland builds. Can be reproduced with:

$ rm src/egl/drivers/dri2/*.h src/egl/drivers/dri2/platform_wayland.lo
$ make -C src/egl/ drivers/dri2/platform_wayland.lo
../../../mesa-18.1.2/src/egl/drivers/dri2/platform_wayland.c:50:10: fatal error: linux-dmabuf-unstable-v1-client-protocol.h: No such file or directory

This patch adds the missing dependency.

Fixes: 02cc359372 "egl/wayland: Use linux-dmabuf interface for buffers"
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>

[Eric: fixed up the commit title]
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
2018-06-29 12:49:51 +01:00
Marek Olšák
5a6414f135 radeonsi: implement vertex color clamping for tess and GS 2018-06-28 22:41:12 -04:00
Marek Olšák
034b385fc2 radeonsi: move VS_STATE_SGPR before draw SGPRs
for vertex color clamping.
2018-06-28 22:27:25 -04:00
Marek Olšák
0c554bc5d5 radeonsi: don't use malloc in si_generate_gs_copy_shader 2018-06-28 22:27:25 -04:00
Marek Olšák
7bac3b589c radeonsi: disable DCC statistics gathering on everything but Stoney
I think we don't need it on other chips.
2018-06-28 22:27:25 -04:00
Marek Olšák
0da94fa19c radeonsi: don't enable DCC statistics gathering for small surfaces 2018-06-28 22:27:25 -04:00
Marek Olšák
f8b0c54e3f radeonsi: simplify logic around vi_separate_dcc_try_enable 2018-06-28 22:27:25 -04:00
Marek Olšák
41f80373b4 radeonsi: fix memory exhaustion issue with DCC statistics gathering with DRI2
Cc: 18.1 <mesa-stable@lists.freedesktop.org>
2018-06-28 22:27:25 -04:00
Marek Olšák
fb28bf23db radeonsi: remove references to Evergreen 2018-06-28 22:27:25 -04:00
Marek Olšák
1542169a4a radeonsi: enable shader caching for compute shaders
Compute shaders were not using the shader cache.
2018-06-28 22:27:25 -04:00