Erico Nunes [Sat, 14 Apr 2018 19:14:41 +0000 (21:14 +0200)]
nir: fix ir_binop_gequal glsl_to_nir conversion
ir_binop_gequal needs to be converted to nir_op_sge when native integers
are not supported in the driver.
Otherwise it becomes no different than ir_binop_less after the
conversion.
Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Jason Ekstrand [Mon, 16 Apr 2018 14:38:31 +0000 (07:38 -0700)]
anv,radv: Drop XML workarounds for VK_ANDROID_native_buffer
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Jason Ekstrand [Mon, 16 Apr 2018 14:32:03 +0000 (07:32 -0700)]
vulkan: Update the XML and headers to 1.1.73
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Samuel Pitoiset [Fri, 13 Apr 2018 17:14:52 +0000 (19:14 +0200)]
radv: clean up radv_decompress_resolve_subpass_src()
To handle the source color image transitions in the same place.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Niuwenhuizen <bas@basnieuwenhuizen.nl>
Samuel Pitoiset [Fri, 13 Apr 2018 17:14:51 +0000 (19:14 +0200)]
radv: don't fast-clear eliminate after resolving a subpass with compute
That looks useless, and I think radv_handle_image_transition()
will do a fast-clear eliminate because it's called after the
resolve.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Niuwenhuizen <bas@basnieuwenhuizen.nl>
Samuel Pitoiset [Fri, 13 Apr 2018 17:14:50 +0000 (19:14 +0200)]
radv: handle CMASK/FMASK transitions only if DCC is disabled
DCC implies a fast-clear eliminate, so I think this sounds
reasonable.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Niuwenhuizen <bas@basnieuwenhuizen.nl>
Samuel Pitoiset [Fri, 13 Apr 2018 17:14:49 +0000 (19:14 +0200)]
radv: merge radv_handle_{dcc,cmask}_image_transition() functions
Into radv_handle_color_image_transition().
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Niuwenhuizen <bas@basnieuwenhuizen.nl>
Samuel Pitoiset [Fri, 13 Apr 2018 17:14:48 +0000 (19:14 +0200)]
radv: add radv_init_color_image_metadata() helper
In order to separate initialization from decompression. In the
future, that will allow us to init DCC/FMASK/CMASK in one shot.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Niuwenhuizen <bas@basnieuwenhuizen.nl>
Samuel Pitoiset [Fri, 13 Apr 2018 17:14:47 +0000 (19:14 +0200)]
radv: make radv_initialise_cmask() static
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Niuwenhuizen <bas@basnieuwenhuizen.nl>
Samuel Pitoiset [Fri, 13 Apr 2018 17:14:46 +0000 (19:14 +0200)]
radv: clean up radv_handle_image_transition() a bit
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Niuwenhuizen <bas@basnieuwenhuizen.nl>
Samuel Pitoiset [Fri, 13 Apr 2018 17:14:45 +0000 (19:14 +0200)]
radv: add radv_handle_color_image_transition() helper
To handle CMASK, FMASK and DCC transitions in the same place.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Niuwenhuizen <bas@basnieuwenhuizen.nl>
Samuel Pitoiset [Fri, 13 Apr 2018 17:14:44 +0000 (19:14 +0200)]
radv: handle DCC image transitions before CMASK/FMASK transitions
Mostly because DCC implies a fast-clear eliminate and we
should be able to skip some DCC decompressions by setting
a predicate like for CMASK and FMASK.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Niuwenhuizen <bas@basnieuwenhuizen.nl>
Samuel Pitoiset [Fri, 13 Apr 2018 17:14:43 +0000 (19:14 +0200)]
radv: disable prediction only if it has been enabled
When decompressing DCC we don't enable it, so it's useless
to disable it. This reduces the number of prediction packets
sent to the GPU when performing color decompression passes.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Niuwenhuizen <bas@basnieuwenhuizen.nl>
Bas Nieuwenhuizen [Sun, 15 Apr 2018 22:09:39 +0000 (00:09 +0200)]
ac/nir: Make the GFX9 buffer size fix apply to image loads/atomics too.
No clue how I missed those ...
Fixes: 4503ff760c "ac/nir: Add workaround for GFX9 buffer views."
CC: <mesa-stable@lists.freedesktop.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105320
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Brian Paul [Fri, 13 Apr 2018 21:34:23 +0000 (15:34 -0600)]
gallium/osmesa: link with winsock2 library on Windows
To fix the MSVC build. The build broke because we started to compile
the ddebug code on Windows after the mtypes.h changes. Building ddebug
caused us to also use the u_network.c code for the first time.
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Brian Paul [Fri, 13 Apr 2018 21:33:39 +0000 (15:33 -0600)]
gallium/util: put (void) in a few function signatures
To match the header file.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Brian Paul [Fri, 13 Apr 2018 21:32:48 +0000 (15:32 -0600)]
ddebug: add PIPE_OS_UNIX/LINUX checks to fix MSVC build
Don't include Unix headers or use Unix functions when building with MSVC.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Brian Paul [Fri, 13 Apr 2018 21:31:49 +0000 (15:31 -0600)]
mesa: protect #include of unistd.h with _MSV_VER check
unistd.h is unix only.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Brian Paul [Fri, 13 Apr 2018 21:31:20 +0000 (15:31 -0600)]
mesa: remove unused 'i' in dimensions_error_check()
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Marek Olšák [Sat, 14 Apr 2018 00:04:04 +0000 (20:04 -0400)]
radeonsi: restore si_emit_cache_flush call at the end of IBs
Fixes: 918b798668c "radeonsi: make sure CP DMA is idle at the end of IBs"
Daniel Schürmann [Tue, 6 Mar 2018 14:05:13 +0000 (15:05 +0100)]
radv: enable subgroup capabilities
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Daniel Schürmann [Tue, 6 Mar 2018 14:04:29 +0000 (15:04 +0100)]
ac: handle subgroup intrinsics
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Daniel Schürmann [Tue, 6 Mar 2018 14:03:36 +0000 (15:03 +0100)]
ac: add LLVM build functions for subgroup instrinsics
Co-authored-by: Connor Abbott <cwabbott0@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Daniel Schürmann [Wed, 28 Feb 2018 19:26:03 +0000 (20:26 +0100)]
ac: make ballot and umsb capable of 64bit inputs
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Daniel Schürmann [Tue, 10 Apr 2018 14:07:27 +0000 (16:07 +0200)]
nir: lower 64bit subgroup shuffle intrinsics
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Daniel Schürmann [Tue, 10 Apr 2018 10:02:44 +0000 (12:02 +0200)]
nir/spirv: Fix warning and add missing breaks.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Daniel Schürmann [Fri, 13 Apr 2018 13:05:24 +0000 (15:05 +0200)]
nir: use ballot_bit_size when lowering ballot_bitfield_extract
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Daniel Schürmann [Fri, 13 Apr 2018 13:04:16 +0000 (15:04 +0200)]
nir: subgroups instructions for 64bit ballot sizes
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Brian Paul [Fri, 13 Apr 2018 15:56:33 +0000 (09:56 -0600)]
glsl: #undef THIS macro to fix MSVC build
THIS is a macro in one of the MSVC header files. It's also a token
in the GLSL lexer. This causes a compilation failure with MSVC.
This issue seems to be newly exposed after the recent mtypes.h removal
patches.
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Neha Bhende <bhenden@vmware.com>
Brian Paul [Fri, 13 Apr 2018 15:38:16 +0000 (09:38 -0600)]
glsl: rename 'interface' var to 'iface' to fix MSVC build
The recent mtypes.h removal patches seems to have exposed a MSVC
issue where 'interface' is defined as a macro in an MSVC header file.
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Neha Bhende <bhenden@vmware.com>
Brian Paul [Fri, 13 Apr 2018 15:32:31 +0000 (09:32 -0600)]
mesa: remove snprintf macro in imports.h to fix MSVC build
snprintf is a macro in the MSVC stdio.h header and we needed to
include that header before imports.h where we also defined an
snprintf macro. Otherwise, the MSVC build would fail. The recent
mtypes.h removal patches seems to have exposed this issue.
This patch simply removes our snprintf macro and replaces one use
of it in teximage.c with _mesa_snprintf(). There are other calls
to snprintf() in DRI drivers, but none of them are built on Windows.
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Neha Bhende <bhenden@vmware.com>
Lionel Landwerlin [Thu, 12 Apr 2018 18:06:47 +0000 (11:06 -0700)]
anv: fix number of planes for depth & stencil
We're not counting correctly with depth & stencil images.
Additionally we need to move an assert that is meant just for color
attachments.
v2: Move an assert() (Reported by Craig)
Change aspect mask checks (Francesco)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: a62a97933578a ("anv: enable multiple planes per image/imageView")
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105994
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Marek Olšák [Sat, 7 Apr 2018 18:01:12 +0000 (14:01 -0400)]
gallium: move ddebug, noop, rbug, trace to auxiliary to improve build times
which also simplifies the build scripts.
Marek Olšák [Thu, 5 Apr 2018 21:54:39 +0000 (17:54 -0400)]
radeonsi: make sure CP DMA is idle at the end of IBs
Marek Olšák [Wed, 4 Apr 2018 22:20:53 +0000 (18:20 -0400)]
gallium/hud: add a simple HUD view that only draws text
Add this prefix to the env var: "simple," For example:
GALLIUM_HUD=simple,fps
The X coordinates are the same, but the Y coordinates are different, because
there is only text.
'+' happens to behave the same as "\n".
',' happens to behave the same as "\n\n".
Dylan Baker [Fri, 13 Apr 2018 16:01:29 +0000 (09:01 -0700)]
mesa: Include unistd.h in program_lexer
Which was previously provided implicitly by mtypes.h
CC: Marek Olšák <marek.olsak@amd.com>
CC: Mark Janes <mark.a.janes@intel.com>
Fixes: 43d66c8c2d4d3d4dee1309856b6ce6c5393682e5
("mesa: include mtypes.h less")
Signed-off-by: Dylan Baker <dylan.c.baker@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Marek Olšák [Tue, 3 Apr 2018 01:08:05 +0000 (21:08 -0400)]
radeonsi: always prefetch later shaders after the draw packet
so that the draw is started as soon as possible.
v2: only prefetch the API VS and VBO descriptors
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Marek Olšák [Tue, 3 Apr 2018 00:43:23 +0000 (20:43 -0400)]
radeonsi: emit shader pointers before cache flushes & waits
This code was written with the constant engine in mind.
We can simplify it now.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Marek Olšák [Tue, 3 Apr 2018 19:20:04 +0000 (15:20 -0400)]
radeonsi/gfx9: don't use the workaround for gather4 + stencil
it doesn't seem to be needed.
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Marek Olšák [Tue, 3 Apr 2018 23:32:12 +0000 (19:32 -0400)]
radeonsi: disable TC-compat HTILE on Tonga and Iceland
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Marek Olšák [Tue, 3 Apr 2018 23:22:24 +0000 (19:22 -0400)]
radeonsi: force 2D tiling on VI only when TC-compat HTILE is really enabled
just pass the flag that indicates it.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Marek Olšák [Wed, 28 Mar 2018 01:19:15 +0000 (21:19 -0400)]
radeonsi: don't flush HTILE if there is no HTILE clear
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Marek Olšák [Wed, 28 Mar 2018 01:57:26 +0000 (21:57 -0400)]
radeonsi: merge 2 identical if statements in si_clear
and other cleanups
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Marek Olšák [Tue, 3 Apr 2018 01:30:41 +0000 (21:30 -0400)]
radeonsi: don't do GFX-specific texture decompression for compute
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Marek Olšák [Thu, 29 Mar 2018 14:40:30 +0000 (10:40 -0400)]
radeonsi: simplify generating the renderer string
HAVE_LLVM > 0 is a tautology.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Marek Olšák [Wed, 28 Mar 2018 00:46:18 +0000 (20:46 -0400)]
winsys/amdgpu: allow local BOs on APUs
Local BOs ignore BO priorities, and we don't need those on APUs.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Juan A. Suarez Romero [Thu, 12 Apr 2018 15:56:48 +0000 (15:56 +0000)]
getteximage: assume texture image is empty for non defined levels
Current code is returning an INVALID_OPERATION when trying to use
getTextureImage() on a level that has not been explicitly defined.
That is, we define a mipmapped Texture2D with 3 levels, and try to use
GetTextureImage() for the 4th levels, and INVALID_OPERATION is returned.
Nevertheless, such case is not listed as an error in OpenGL 4.6 spec,
section 8.11.4 ("Texture Image Queries"), where all the case errors for
this function are defined. So it seems this is a valid operation.
On the other hand, in section 8.22 ("Texture State and Proxy State") it
states:
"Each initial texture image is null. It has zero width, height, and
depth, internal format RGBA, or R8 for buffer textures, component
sizes set to zero and component types set to NONE, the compressed
flag set to FALSE, a zero compressed size, and the bound buffer
object name is zero."
We can assume that we are reading this initialized empty image when
calling GetTextureImage() with a non defined level.
With this assumption, we will reach one of the other error cases defined
for the functions. In the end this means that we would end up returning
INVALID_VALUE to the caller.
This fixes arb_get_texture_sub_image piglit tests.
v2: just return INVALID_VALUE if there is no defined level (Iago)
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Juan A. Suarez Romero [Thu, 5 Apr 2018 09:00:46 +0000 (09:00 +0000)]
gettextureimage: verify cube map is complete
According to OpenGL 4.6 spec, section 8.11.4 ("Texture Image Queries"),
relative to errors for GetTexImage, GetTextureImage, and GetnTexImage:
"An INVALID_OPERATION error is generated by GetTextureImage if the
effective target is TEXTURE_CUBE_MAP or TEXTURE_CUBE_MAP_ARRAY, and
the texture object is not cube complete or cube array complete,
respectively."
This fixes arb_get_texture_sub_image piglit tests.
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Juan A. Suarez Romero [Thu, 5 Apr 2018 08:48:26 +0000 (08:48 +0000)]
gettextsubimage: verify zoffset and depth are correct
According to OpenGL 4.6 spec, section 8.11.4 ("Texture Image Queries"),
relative to errors for GetTextureSubImage() function:
"An INVALID_VALUE error is generated if the effective target is
TEXTURE_1D and either yoffset is not zero, or height is not one.
An INVALID_VALUE error is generated if the effective target is
TEXTURE_1D, TEXTURE_1D_ARRAY, TEXTURE_2D or TEXTURE_RECTANGLE, and
either zoffset is not zero, or depth is not one."
The commit fixes the check for height and depth.
This fixes arb_get_texture_sub_image piglit tests.
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Timothy Arceri [Fri, 13 Apr 2018 05:23:57 +0000 (15:23 +1000)]
mesa: free debug messages when destroying the debug state
Fixes: 04a8baad3721 "mesa: refactor _mesa_PopDebugGroup and _mesa_free_errors_data"
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98281
Timothy Arceri [Fri, 13 Apr 2018 12:11:13 +0000 (22:11 +1000)]
mesa: fix x86 builds
Fixes: 43d66c8c2d4d "mesa: include mtypes.h less"
Marek Olšák [Fri, 13 Apr 2018 00:03:12 +0000 (20:03 -0400)]
Fix make check
Marek Olšák [Thu, 12 Apr 2018 23:54:36 +0000 (19:54 -0400)]
Fix scons build
Marek Olšák [Sun, 8 Apr 2018 17:13:08 +0000 (13:13 -0400)]
mesa: include mtypes.h less
- remove mtypes.h from most header files
- add main/menums.h for often used definitions
- remove main/core.h
v2: fix radv build
Reviewed-by: Brian Paul <brianp@vmware.com>
Marek Olšák [Sun, 8 Apr 2018 19:24:26 +0000 (15:24 -0400)]
mesa: include dispatch.h less
Reviewed-by: Brian Paul <brianp@vmware.com>
Bas Nieuwenhuizen [Sun, 8 Apr 2018 08:15:21 +0000 (10:15 +0200)]
radv: Implement VK_EXT_vertex_attribute_divisor.
Pretty straight forward, just pass the divisors through the shader
key and then do a LLVM divide.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Bas Nieuwenhuizen [Wed, 11 Apr 2018 00:10:29 +0000 (02:10 +0200)]
ac/surface: Allow S swizzle for displayable surfaces.
For dcn1 && < 64 bpp displayable surfaces, addrlib only accepts
S swizzles.
At the same time addrlib prefers D swizzles is allowed, so we can
just allow S swizzles as fallback.
Fixes: b64b712558 "ac/surface/gfx9: request desired micro tile mode explicitly"
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Eric Anholt [Wed, 11 Apr 2018 23:28:07 +0000 (16:28 -0700)]
broadcom/vc5: Fix a stray '`' in a comment.
Eric Anholt [Wed, 4 Apr 2018 16:59:18 +0000 (09:59 -0700)]
broadcom/vc5: Update the UABI for in/out syncobjs
This is the ABI I'm hoping to stabilize for merging the driver. seqnos
are eliminated, which allows for the GPU scheduler to task-switch between
DRM fds even after submission to the kernel. In/out sync objects are
introduced, to allow the Android fencing extension (not yet implemented,
but should be trivial), and to also allow the driver to tell the kernel to
not start a bin until a previous render is complete.
Eric Anholt [Wed, 4 Apr 2018 16:58:23 +0000 (09:58 -0700)]
broadcom/vc5: Drop the finished_seqno optimization.
With the DRM scheduler changes, I'm about to remove all seqnos from the
UABI.
Eric Anholt [Wed, 4 Apr 2018 16:57:51 +0000 (09:57 -0700)]
broadcom/vc5: Drop the throttling code.
Since I'll be using the DRM scheduler, we won't run into the problem of a
runaway client starving other clients of GPU time.
Eric Anholt [Fri, 30 Mar 2018 23:50:23 +0000 (16:50 -0700)]
broadcom/vc5: Move flush_last_load into load_general, like for stores.
This should avoid mistakes with not flushing as we change the series of
loads. Already, it fixes a hopefully unreachable case where we were
emitting just the TILE_COORDINATES and not the dummy store that needs to
go with it.
Eric Anholt [Fri, 30 Mar 2018 23:53:39 +0000 (16:53 -0700)]
broadcom/vc5: Rename read_but_not_cleared to loads_pending.
This is a more obvious name for what the variable means, and matches what
it's called for stores.
Eric Anholt [Fri, 30 Mar 2018 23:43:51 +0000 (16:43 -0700)]
broadcom/vc5: Refactor the implicit coords/stores_pending logic.
Since I just fixed a bug due to forgetting to do these right, do it once
in the helper func.
Eric Anholt [Fri, 30 Mar 2018 23:39:14 +0000 (16:39 -0700)]
broadcom/vc5: Emit missing TILE_COORDINATES_IMPLICIT in separate z/s stores.
Fixes a simulator assertion failure in
KHR-GLES3.packed_depth_stencil.blit.depth32f_stencil8
Eric Anholt [Fri, 30 Mar 2018 23:31:07 +0000 (16:31 -0700)]
broadcom/vc5: Add checks that we don't try to do raw Z+S load/stores.
This was dying in the simulator on
GTF-GLES3.gtf.GL3Tests.packed_depth_stencil.packed_depth_stencil_blit.
We'll need to do basically the same thing as Z32F/S8 does in the MSAA
Z24S8 case.
Eric Anholt [Fri, 30 Mar 2018 23:14:29 +0000 (16:14 -0700)]
broadcom/vc5: Fix MSAA depth/stencil size setup.
The v3dX(get_internal_type_bpp_for_output_format)() call only handles
color output formats (which overlap in enum numbers with depth output
formats), so for depth we just need to take the normal cpp times the
number of samples.
Leo Liu [Wed, 14 Mar 2018 21:13:46 +0000 (17:13 -0400)]
st/va: add VP9 config to enable profile2
Signed-off-by: Leo Liu <leo.liu@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Leo Liu [Wed, 14 Mar 2018 21:09:46 +0000 (17:09 -0400)]
radeonsi: use PIPE_FORMAT_P016 format for VP9 profile2
Signed-off-by: Leo Liu <leo.liu@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Leo Liu [Thu, 15 Mar 2018 15:55:27 +0000 (11:55 -0400)]
radeon/vcn: add VP9 profile2 support
Signed-off-by: Leo Liu <leo.liu@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Leo Liu [Wed, 14 Mar 2018 20:59:20 +0000 (16:59 -0400)]
vl: add VP9 profile2 support
Signed-off-by: Leo Liu <leo.liu@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Leo Liu [Wed, 14 Mar 2018 20:56:25 +0000 (16:56 -0400)]
st/va: add VP9 config to enable profile0
Signed-off-by: Leo Liu <leo.liu@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Leo Liu [Wed, 14 Mar 2018 20:47:26 +0000 (16:47 -0400)]
st/va: parse VP9 uncompressed frame header
To get some of UVD required parameters.
Signed-off-by: Leo Liu <leo.liu@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Leo Liu [Wed, 14 Mar 2018 20:27:18 +0000 (16:27 -0400)]
st/va: add slice parameter handling for VP9
Signed-off-by: Leo Liu <leo.liu@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Leo Liu [Wed, 14 Mar 2018 19:57:48 +0000 (15:57 -0400)]
st/va: add picture parameter handling for VP9
Signed-off-by: Leo Liu <leo.liu@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Leo Liu [Wed, 14 Mar 2018 19:55:00 +0000 (15:55 -0400)]
st/va: add handles for VP9 buffers
Signed-off-by: Leo Liu <leo.liu@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Leo Liu [Wed, 14 Mar 2018 19:31:04 +0000 (15:31 -0400)]
st/va: add VP9 picture to context
Signed-off-by: Leo Liu <leo.liu@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Leo Liu [Wed, 14 Mar 2018 19:29:04 +0000 (15:29 -0400)]
radeonsi: cap VP9 support to progressive buffer
Signed-off-by: Leo Liu <leo.liu@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Leo Liu [Wed, 14 Mar 2018 19:27:01 +0000 (15:27 -0400)]
radeonsi: cap VP9 support to Raven
Signed-off-by: Leo Liu <leo.liu@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Leo Liu [Wed, 14 Mar 2018 19:09:07 +0000 (15:09 -0400)]
radeon/vcn: add VP9 context buffer
Signed-off-by: Leo Liu <leo.liu@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Leo Liu [Thu, 15 Mar 2018 17:14:58 +0000 (13:14 -0400)]
radeon/vcn: get VP9 msg buffer
Signed-off-by: Leo Liu <leo.liu@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Leo Liu [Thu, 15 Mar 2018 17:10:46 +0000 (13:10 -0400)]
radeon/vcn: fill probability table to prob buffers
Signed-off-by: Leo Liu <leo.liu@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Leo Liu [Wed, 14 Mar 2018 17:25:11 +0000 (13:25 -0400)]
radeon/vcn: add VP9 message buffer interface
Signed-off-by: Leo Liu <leo.liu@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Leo Liu [Wed, 14 Mar 2018 16:48:22 +0000 (12:48 -0400)]
radeon/vcn: add VP9 prob table buffer
Signed-off-by: Leo Liu <leo.liu@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Leo Liu [Tue, 13 Mar 2018 18:35:40 +0000 (14:35 -0400)]
vl: add VP9 probability tables
Signed-off-by: Leo Liu <leo.liu@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Leo Liu [Tue, 13 Mar 2018 13:42:57 +0000 (09:42 -0400)]
radeon/vcn: add VP9 dpb buffer size
The current FW has restricted the size to the worse case,
and the new dynamic dpb buffer support is on the way from
firmware side, we will change accordingly.
Signed-off-by: Leo Liu <leo.liu@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Leo Liu [Tue, 13 Mar 2018 13:40:15 +0000 (09:40 -0400)]
radeon/vcn: add VP9 stream type for decoder
Signed-off-by: Leo Liu <leo.liu@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Leo Liu [Tue, 13 Mar 2018 13:39:20 +0000 (09:39 -0400)]
vl: add VP9 picture description
Signed-off-by: Leo Liu <leo.liu@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Leo Liu [Tue, 13 Mar 2018 13:06:17 +0000 (09:06 -0400)]
vl: add VP9 profile0 and format
Signed-off-by: Leo Liu <leo.liu@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Samuel Pitoiset [Wed, 11 Apr 2018 19:34:43 +0000 (21:34 +0200)]
radv: fix radv_layout_dcc_compressed() when image doesn't have DCC
num_dcc_levels means that DCC is supported, but this doesn't
mean that it's enabled by the driver. Instead, we should rely
on radv_image_has_dcc().
This fixes some multisample regressions since
0babc8e5d66
("radv: fix picking the method for resolve subpass") on Vega.
This is because the resolve method changed from HW to FS, but
those fails are totally unexpected, so there might some
differences between Polaris and Vega here.
Fixes: 44fcf587445 ("radv: Disable DCC for GENERAL layout and compute transfer dest.")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Samuel Pitoiset [Wed, 11 Apr 2018 12:09:16 +0000 (14:09 +0200)]
radv: add radv_decompress_resolve_{subpass}_src() helpers
This helper shares common code before resolving using either
a fragment or a compute shader.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Samuel Pitoiset [Wed, 11 Apr 2018 12:09:15 +0000 (14:09 +0200)]
radv: add radv_init_dcc_control_reg() helper
And add some comments.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Timothy Arceri [Wed, 11 Apr 2018 23:23:02 +0000 (09:23 +1000)]
glsl: fix compat shaders in GLSL 1.40
The compatibility and core tokens were not added until GLSL 1.50,
for GLSL 1.40 just assume all shaders built with a compat profile
are compat shaders.
Fixes rendering issues in Dawn of War II on radeonsi which has
enabled OpenGL 3.1 compat support.
Fixes: a0c8b49284ef "mesa: enable OpenGL 3.1 with ARB_compatibility"
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105807
Ian Romanick [Tue, 27 Feb 2018 19:34:43 +0000 (11:34 -0800)]
mesa: Silence remaining unused parameter warnings in teximage.c
src/mesa/main/teximage.c: In function ‘_mesa_test_proxy_teximage’:
src/mesa/main/teximage.c:1301:51: warning: unused parameter ‘level’ [-Wunused-parameter]
GLuint numLevels, GLint level,
^~~~~
src/mesa/main/teximage.c: In function ‘texsubimage_error_check’:
src/mesa/main/teximage.c:2186:30: warning: unused parameter ‘dsa’ [-Wunused-parameter]
bool dsa, const char *callerName)
^~~
src/mesa/main/teximage.c: In function ‘copytexture_error_check’:
src/mesa/main/teximage.c:2297:32: warning: unused parameter ‘width’ [-Wunused-parameter]
GLint width, GLint height, GLint border )
^~~~~
src/mesa/main/teximage.c:2297:45: warning: unused parameter ‘height’ [-Wunused-parameter]
GLint width, GLint height, GLint border )
^~~~~~
src/mesa/main/teximage.c: In function ‘check_rtt_cb’:
src/mesa/main/teximage.c:2679:21: warning: unused parameter ‘key’ [-Wunused-parameter]
check_rtt_cb(GLuint key, void *data, void *userData)
^~~
src/mesa/main/teximage.c: In function ‘override_internal_format’:
src/mesa/main/teximage.c:2756:55: warning: unused parameter ‘width’ [-Wunused-parameter]
override_internal_format(GLenum internalFormat, GLint width, GLint height)
^~~~~
src/mesa/main/teximage.c:2756:68: warning: unused parameter ‘height’ [-Wunused-parameter]
override_internal_format(GLenum internalFormat, GLint width, GLint height)
^~~~~~
src/mesa/main/teximage.c: In function ‘texture_sub_image’:
src/mesa/main/teximage.c:3293:24: warning: unused parameter ‘dsa’ [-Wunused-parameter]
bool dsa)
^~~
src/mesa/main/teximage.c: In function ‘can_avoid_reallocation’:
src/mesa/main/teximage.c:3788:53: warning: unused parameter ‘x’ [-Wunused-parameter]
mesa_format texFormat, GLint x, GLint y, GLsizei width,
^
src/mesa/main/teximage.c:3788:62: warning: unused parameter ‘y’ [-Wunused-parameter]
mesa_format texFormat, GLint x, GLint y, GLsizei width,
^
src/mesa/main/teximage.c: In function ‘valid_texstorage_ms_parameters’:
src/mesa/main/teximage.c:5987:40: warning: unused parameter ‘samples’ [-Wunused-parameter]
GLsizei samples, unsigned dims)
^~~~~~~
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Ian Romanick [Tue, 27 Feb 2018 19:24:44 +0000 (11:24 -0800)]
mesa: Silence unused parameter warning in compressedteximage_only_format
Passing ctx to compressedteximage_only_format was the only use of the
ctx parameter in _mesa_format_no_online_compression, so that parameter
had to go too.
../../SOURCE/master/src/mesa/main/teximage.c: In function ‘compressedteximage_only_format’:
../../SOURCE/master/src/mesa/main/teximage.c:1355:57: warning: unused parameter ‘ctx’ [-Wunused-parameter]
compressedteximage_only_format(const struct gl_context *ctx, GLenum format)
^~~
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Nanley Chery [Tue, 10 Apr 2018 22:05:31 +0000 (15:05 -0700)]
blorp: Silence unused function warnings
vulkan/genX_blorp_exec.c:69:1: warning: ‘blorp_get_surface_base_address’ defined but not used [-Wunused-function]
blorp_get_surface_base_address(struct blorp_batch *batch)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from vulkan/genX_blorp_exec.c:35:0:
./blorp/blorp_genX_exec.h:1249:1: warning: ‘blorp_emit_memcpy’ defined but not used [-Wunused-function]
blorp_emit_memcpy(struct blorp_batch *batch,
^~~~~~~~~~~~~~~~~
genX_blorp_exec.c:99:1: warning: ‘blorp_get_surface_base_address’ defined but not used [-Wunused-function]
blorp_get_surface_base_address(struct blorp_batch *batch)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from genX_blorp_exec.c:33:0:
../../../../../src/intel/blorp/blorp_genX_exec.h:1249:1: warning: ‘blorp_emit_memcpy’ defined but not used [-Wunused-function]
blorp_emit_memcpy(struct blorp_batch *batch,
^~~~~~~~~~~~~~~~~
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Caio Marcelo de Oliveira Filho [Wed, 11 Apr 2018 06:13:40 +0000 (23:13 -0700)]
nir/vars_to_ssa: Simplify node matching code
The matching code doesn't make real use of the return value. The main
function return value is ignored, and while the worker function
propagate its return value, the actual callback never returns false.
v2: Style fixes. (Jason)
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Caio Marcelo de Oliveira Filho [Wed, 11 Apr 2018 06:13:39 +0000 (23:13 -0700)]
nir/vars_to_ssa: Remove an unnecessary deref_arry_type check
Only fully-qualified direct derefs, collected in direct_deref_nodes,
are checked for aliasing, so it is already known up front that they
have only array derefs of type direct.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Caio Marcelo de Oliveira Filho [Wed, 11 Apr 2018 06:13:38 +0000 (23:13 -0700)]
nir/vars_to_ssa: Rework register_variable_uses()
The return value was needed to make use of the old nir_foreach_block
helper, but not needed anymore with the macro version. Then go one
step further and move the foreach directly into the register variable
uses function.
v2: Move foreach to register_variable_uses(). (Jason)
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Jason Ekstrand [Mon, 26 Mar 2018 22:38:49 +0000 (15:38 -0700)]
nir: Use nir_builder in lower_io_to_temporaries
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>