Brian Paul [Sat, 20 Jan 2018 04:03:07 +0000 (21:03 -0700)]
vbo: move, rename vp_mode enums, get_program_mode() function
Instead of NONE/ARB use FF/SHADER. Move the enum declaration to
vbo_private.h where it's used.
Reviewed-by: Mathias Fröhlich <mathias.froehlich@web.de>
Brian Paul [Fri, 19 Jan 2018 17:52:57 +0000 (10:52 -0700)]
vbo: s/cl/array/ in vbo_context.c
I think 'cl' used to mean client array.
Reviewed-by: Mathias Fröhlich <mathias.froehlich@web.de>
Tapani Pälli [Fri, 26 Jan 2018 09:26:18 +0000 (11:26 +0200)]
nir: mark unused space in packed_tex_data
This change cleans following scary warnings in valgrind output
when disk cache is being written:
==6532== Uninitialised byte(s) found during client check request
==6532== at 0x14423FAD: blob_write_bytes (blob.c:152)
==6532== by 0x144240FB: blob_write_uint32 (blob.c:194)
==6532== by 0x144001A5: write_tex (nir_serialize.c:613)
and later (loads of):
==6532== Use of uninitialised value of size 8
==6532== at 0x62FCD9E: crc32_z (in /usr/lib64/libz.so.1.2.11)
==6532== by 0x13F65014: util_hash_crc32 (crc32.c:127)
==6532== by 0x13F5DABA: cache_put (disk_cache.c:947)
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Tapani Pälli [Fri, 26 Jan 2018 08:47:31 +0000 (10:47 +0200)]
i965: fix disk_cache leak when destroying context
==2780== 1,024 bytes in 1 blocks are possibly lost in loss record 180 of 205
==2780== at 0x4C31A1E: calloc (vg_replace_malloc.c:711)
==2780== by 0x13F6467E: util_queue_init (u_queue.c:309)
==2780== by 0x13F5C9F6: disk_cache_create (disk_cache.c:369)
==2780== by 0x13F05406: brw_disk_cache_init (brw_disk_cache.c:428)
==2780== by 0x13F01E78: brwCreateContext (brw_context.c:1068)
Fixes:
1a61a8b9a7c ("i965: Initialize disk shader cache if MESA_GLSL_CACHE_DISABLE is false")
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Tapani Pälli [Fri, 26 Jan 2018 08:25:16 +0000 (10:25 +0200)]
i965: fix prog_data leak in brw_disk_cache
==25481== 576 bytes in 1 blocks are definitely lost in loss record 179 of 208
==25481== at 0x4C2FB6B: malloc (vg_replace_malloc.c:299)
==25481== by 0x1404E2CC: ralloc_size (ralloc.c:121)
==25481== by 0x14119F82: read_and_upload (brw_disk_cache.c:176)
==25481== by 0x1411A5C9: brw_disk_cache_upload_program (brw_disk_cache.c:271)
==25481== by 0x1412FCA4: brw_upload_wm_prog (brw_wm.c:597)
Fixes:
516d50db319 ("i965: add initial implementation of on disk shader cache")
Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Timothy Arceri [Mon, 29 Jan 2018 00:07:28 +0000 (11:07 +1100)]
ac: fix indentation
Reviewed-by: Dave Airlie <airlied@redhat.com>
Timothy Arceri [Mon, 22 Jan 2018 07:26:12 +0000 (18:26 +1100)]
ac: remove unused nir2llvmtype()
The last use of this was removed in the previous patch.
Reviewed-by: Dave Airlie <airlied@redhat.com>
Timothy Arceri [Mon, 22 Jan 2018 07:23:27 +0000 (18:23 +1100)]
ac: fix gs load inputs type
This fixes the scenario where the input is a struct. With this
the Unreal engines Elemental demo now works on radeonsi.
Reviewed-by: Dave Airlie <airlied@redhat.com>
Kai Wasserbäch [Tue, 23 Jan 2018 20:14:54 +0000 (21:14 +0100)]
ac/nir: call glsl_get_sampler_dim() only once where possible
Changes since v1:
* Rebased on top of
e68150de263156a3f3d1b609b6506c5649967f61 and
82adf53308c137ce0dc5f2d5da4e7cc40c5b808c.
Signed-off-by: Kai Wasserbäch <kai@dev.carbon-project.org>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Dave Airlie [Thu, 25 Jan 2018 00:21:03 +0000 (10:21 +1000)]
docs/features: add r600 ARB_query_buffer_object support
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Sun, 3 Dec 2017 19:31:46 +0000 (05:31 +1000)]
r600: add ARB_query_buffer_object support
This uses a different shader than radeonsi, as we can't address non-256
aligned ssbos, which the radeonsi code does. This passes some extra
offsets into the shader.
It also contains a set of u64 instruction implementation that may
or may not be complete (at least the u64div is definitely not something
that works outside this use-case). If r600 grows 64-bit integers,
it will use the GLSL lowering for divmod.
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Sun, 21 Jan 2018 22:39:46 +0000 (08:39 +1000)]
r600/shader: refactor mul hi/lo instruction emission
This just makes it a bit simpler for cayman vs eg
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Fri, 19 Jan 2018 03:20:36 +0000 (13:20 +1000)]
r600/eg: construct proper rat mask for image/buffers.
If the images/buffer bindings had a gap, this produced the wrong values,
this should fix that to generate the correct rat mask for mixes of
images/buffers/cbs.
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Cc: "18.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Jon Turney [Thu, 25 Jan 2018 18:53:08 +0000 (18:53 +0000)]
meson: libdrm shouldn't appear in Requires.private: if it wasn't found
Otherwise, using pkg-config to retrieve flags will fail, e.g.
$ pkg-config gl --cflags
Package libdrm was not found in the pkg-config search path.
Perhaps you should add the directory containing `libdrm.pc'
to the PKG_CONFIG_PATH environment variable
Package 'libdrm', required by 'gl', not found
Fixes:
3218056e0eb3 ("meson: Build i965 and dri stack")
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Eric Anholt [Wed, 24 Jan 2018 03:23:01 +0000 (14:23 +1100)]
broadcom/vc5: Don't forget to get the BO offset when opening a dmabuf.
Fixes black display in DRI due to storing to 0x00000000.
Eric Anholt [Sat, 27 Jan 2018 07:12:29 +0000 (18:12 +1100)]
broadcom/vc5: Enable the driver on V3D 4.2.
The changes in 4.2 haven't impacted any of our CL or state struct entries
that I can see, so I haven't enabled custom compile for doing 4.2 instead
of 4.1.
Eric Anholt [Sat, 27 Jan 2018 07:45:35 +0000 (18:45 +1100)]
broadcom/vc5: Enable CLIF dumping of V3D 4.2.
Eric Anholt [Sat, 27 Jan 2018 07:34:35 +0000 (18:34 +1100)]
broadcom/vc5: Update the compiler for V3D 4.2.
Eric Anholt [Sat, 27 Jan 2018 07:29:37 +0000 (18:29 +1100)]
broadcom/vc5: Update QPU instruction pack/unpack for v4.2.
After the 4.1 spec, 4.2 retroactively renamed patchid to barrierid because
it's used for other barriers in compute.
Eric Anholt [Sat, 27 Jan 2018 07:05:58 +0000 (18:05 +1100)]
broadcom/vc5: Add XML for V3D 4.2.
Eric Anholt [Sat, 27 Jan 2018 07:50:10 +0000 (18:50 +1100)]
broadcom/vc5: Fix a race between XML codegen build and CLIF build.
Eric Anholt [Wed, 17 Jan 2018 20:46:35 +0000 (12:46 -0800)]
Android: Attempt to fix broadcom build after vc5 changes.
Marek Olšák [Sun, 31 Dec 2017 22:35:59 +0000 (23:35 +0100)]
ac: rename and move si_const_array into common code
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Marek Olšák [Mon, 1 Jan 2018 20:03:29 +0000 (21:03 +0100)]
ac: move address space definitions to common code
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Marek Olšák [Sun, 31 Dec 2017 23:30:51 +0000 (00:30 +0100)]
ac: don't use byval LLVM qualifier in shaders
shader-db doesn't show any regression and 32-bit pointers with byval
are declared as VGPRs for some reason.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Marek Olšák [Mon, 1 Jan 2018 21:58:43 +0000 (22:58 +0100)]
gallium/radeon: set number of pb_cache buckets = number of heaps
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Marek Olšák [Mon, 1 Jan 2018 21:47:36 +0000 (22:47 +0100)]
pb_cache: let drivers choose the number of buckets
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Marek Olšák [Mon, 1 Jan 2018 21:38:14 +0000 (22:38 +0100)]
pb_cache: call os_time_get outside of the loop
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Marek Olšák [Sun, 31 Dec 2017 19:42:27 +0000 (20:42 +0100)]
gallium/radeon: simplify radeon_flags_from_heap
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Timothy Arceri [Fri, 26 Jan 2018 00:56:50 +0000 (11:56 +1100)]
st/shader_cache: restore num_tgsi_tokens when loading from cache
Without this we will fail to correctly serialise programs when
using glGetProgramBinary() if the program was retrieved from
the disk cache rather than freshly compiled.
Fixes:
c69b0dd6817b "st/glsl_to_tgsi: store num_tgsi_tokens in st_*_program"
Reviewed-by: Gert Wollny <gw.fossdev@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104762
Marek Olšák [Fri, 26 Jan 2018 02:48:37 +0000 (03:48 +0100)]
winsys/amdgpu: fix assertion failure with UVD and VCE rings
Cc: 18.0 <mesa-stable@lists.freedesktop.org>
Brian Paul [Thu, 25 Jan 2018 20:44:19 +0000 (13:44 -0700)]
mesa: remove MESA_FUNCTION
Just use __func__ in the two macros where it was used.
Reviewed-by: Neha Bhende <bhenden@vmware.com>
Brian Paul [Thu, 25 Jan 2018 19:50:12 +0000 (12:50 -0700)]
mesa: change gl_link_status enums to uppercase
follow the convention of other enums.
Reviewed-by: Neha Bhende <bhenden@vmware.com>
Brian Paul [Thu, 25 Jan 2018 19:43:48 +0000 (12:43 -0700)]
mesa: change gl_compile_status enums to uppercase
To follow the convention of other enums.
Reviewed-by: Neha Bhende <bhenden@vmware.com>
Brian Paul [Thu, 25 Jan 2018 19:37:14 +0000 (12:37 -0700)]
mesa: minor comment reformatting, whitespace fixes in mtypes.h
Trivial.
Rafael Antognolli [Fri, 26 Jan 2018 19:19:31 +0000 (11:19 -0800)]
i965/gen10: Use CS Stall instead of WriteImmediate.
Fixes:
ca19ee33d7d39cb89d948b1c983763065975ce5b
Signed-off-by: Rafael Antognolli <rafael.antognolli@intel.com>
Cc: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Rafael Antognolli [Fri, 26 Jan 2018 19:15:47 +0000 (11:15 -0800)]
anv/gen10: Emit CS stall and mark push constants dirty.
I got reviews and fixed the patches locally, but ended up merging the
ones that I sent originally to the list. This patch fixes those
mistakes.
Fixes:
78c125af3904c539ea69bec2dd9fdf7a5162854f
Signed-off-by: Rafael Antognolli <rafael.antognolli@intel.com>
Cc: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Rafael Antognolli [Thu, 25 Jan 2018 00:33:58 +0000 (16:33 -0800)]
i965/gen10: Re-enable push constants.
The GPU hang caused by push constants is apparently fixed, so let's
enable them again.
Signed-off-by: Rafael Antognolli <rafael.antognolli@intel.com>
Cc: "18.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Rafael Antognolli [Thu, 25 Jan 2018 00:33:57 +0000 (16:33 -0800)]
anv/gen10: Ignore push constant packets during context restore.
Similar to the GL driver, ignore 3DSTATE_CONSTANT_* packets when doing a
context restore.
Signed-off-by: Rafael Antognolli <rafael.antognolli@intel.com>
Cc: Jason Ekstrand <jason@jlekstrand.net>
Cc: "18.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Rafael Antognolli [Thu, 25 Jan 2018 00:33:56 +0000 (16:33 -0800)]
i965/gen10: Ignore push constant packets during context restore.
These packets were causing GPU hangs when the context was restored,
possibly because they were pointing to BO's that were already
unreferenced. So we tell the hardware to ignore such packets after the
batch buffer ends, since we know those BO's are not around anymore.
This change fixes GPU hangs on CNL. The (partial) solution to this
problem so far was to entirely disable push constants on this platform.
Signed-off-by: Rafael Antognolli <rafael.antognolli@intel.com>
Cc: Kenneth Graunke <kenneth@whitecape.org>
Cc: "18.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Brian Paul [Thu, 25 Jan 2018 21:37:34 +0000 (14:37 -0700)]
mesa: silence MinGW 'may be unused uninitialized' warning in get.c
The warning happens on line 2114 for the memcpy(data, p, size) call.
I'm not sure why that generates the warning but not the earlier use
of p in the code.
Reviewed-by: Neha Bhende <bhenden@vmware.com>
Eleni Maria Stea [Thu, 25 Jan 2018 20:09:00 +0000 (13:09 -0700)]
mesa: Fix function pointers initialization in status tracker
We assigned the function that gets the device uuid to the GetDriverUuid
function pointer and the function that gets the driver uuid to the
GetDeviceUuid function pointer inside the state tracker. Exchanged the
pointers.
cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Brian Paul <brianp@vmware.com>
Iago Toral Quiroga [Thu, 25 Jan 2018 11:07:34 +0000 (12:07 +0100)]
anv/pipeline: remove the pipeline layout field from anv_pipeline
It no longer has any users.
Suggested-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Iago Toral Quiroga [Thu, 25 Jan 2018 10:54:35 +0000 (11:54 +0100)]
anv/cmd_buffer: add the pipeline layout to the pipeline state
We need to access the pipeline layout to compute correct dynamic
offsets for dyamic UBO/SSBO descriptors when we emit draw commands.
Instead of taking it from the pipeline object, store the layout
in the command buffer pipeline state.
Suggested-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Iago Toral Quiroga [Thu, 25 Jan 2018 09:25:00 +0000 (10:25 +0100)]
anv/pipeline: don't take the layout from the pipeline to compile shaders
The Vulkan spec states that VkPipelineLayout objects must not be
destroyed while any command buffer that uses them is in the recording
state, but it permits them to be destroyed otherwise. This means that
applications are allowed to free pipeline layouts after command recording
is finished even if there are pipeline objects that still exist and were
created with these layouts.
There are two solutions to this, one is to use reference counting on
pipeline layout objects. The other is to avoid holding references to
pipeline layouts where they are not really needed.
This patch takes a step towards the second option by making the
pipeline shader compile code take pipeline layout from the
VkGraphicsPipelineCreateInfo provided rather than the pipeline
object.
A follow-up patch will remove any remaining uses of the layout field
so we can remove it from the pipeline object and avoid the need
for reference counting.
v2: Use ANV_FROM_HANDLE, remove unnecessary braces (Jason)
Suggested-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Iago Toral Quiroga [Thu, 25 Jan 2018 08:43:22 +0000 (09:43 +0100)]
anv/descriptor_set: add reference counting for descriptor set layouts
The spec states that descriptor set layouts can be destroyed almost
at any time:
"VkDescriptorSetLayout objects may be accessed by commands that
operate on descriptor sets allocated using that layout, and those
descriptor sets must not be updated with vkUpdateDescriptorSets
after the descriptor set layout has been destroyed. Otherwise,
descriptor set layouts can be destroyed any time they are not in
use by an API command."
v2: allocate off the device allocator with DEVICE scope (Jason)
Fixes the following work-in-progress CTS tests:
dEQP-VK.api.descriptor_set.descriptor_set_layout_lifetime.graphics
dEQP-VK.api.descriptor_set.descriptor_set_layout_lifetime.compute
Suggested-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Samuel Pitoiset [Wed, 24 Jan 2018 22:26:21 +0000 (23:26 +0100)]
ac/nir: set amdgpu.uniform and invariant.load for SSBOs
For descriptors.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Samuel Pitoiset [Wed, 24 Jan 2018 22:26:20 +0000 (23:26 +0100)]
ac/nir: set amdgpu.uniform and invariant.load for UBOs
UBOs are constants buffers.
Cc: "18.0" <mesa-stable@lists.freedesktop.org>
Fixes:
41c36c45 ("amd/common: use ac_build_buffer_load() for emitting UBO loads")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Tested-by: Alex Smith <asmith@feralinteractive.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Samuel Pitoiset [Wed, 24 Jan 2018 22:26:18 +0000 (23:26 +0100)]
ac/nir: set the noalias attribute on input pointers
This attribute is similar to the definition of restrict in
C99 and it might help LLVM.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Samuel Pitoiset [Wed, 10 Jan 2018 19:12:11 +0000 (20:12 +0100)]
ac: only load used channels when sampling buffer views
This allows to reduce the number of dwords that are loaded
with buffer_load_format_xyzw. For example, when the only used
channel is 1, the driver will emit buffer_load_format_x instead.
Shader stats for DOW3 (with some local hacky scripts for SPIRV):
143 shaders in 143 tests
Totals:
SGPRS: 5344 -> 5352 (0.15 %)
VGPRS: 3476 -> 3452 (-0.69 %)
Spilled SGPRs: 30 -> 29 (-3.33 %)
Spilled VGPRs: 0 -> 0 (0.00 %)
Private memory VGPRs: 0 -> 0 (0.00 %)
Scratch size: 0 -> 0 (0.00 %) dwords per thread
Code Size: 269860 -> 269808 (-0.02 %) bytes
LDS: 0 -> 0 (0.00 %) blocks
Max Waves: 1267 -> 1272 (0.39 %)
Wait states: 0 -> 0 (0.00 %)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Samuel Pitoiset [Wed, 10 Jan 2018 19:12:10 +0000 (20:12 +0100)]
ac: pass the number of channels to ac_build_buffer_load_format()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Samuel Pitoiset [Wed, 10 Jan 2018 19:12:09 +0000 (20:12 +0100)]
ac: add ac_build_buffer_load_common() helper
For both versions of llvm.amdgcn.buffer.load.{format}.*.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Samuel Pitoiset [Thu, 25 Jan 2018 14:46:51 +0000 (15:46 +0100)]
radv: fix RADV_DEBUG=syncshaders on GFX9
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Samuel Pitoiset [Thu, 25 Jan 2018 14:46:50 +0000 (15:46 +0100)]
radv: fix a GPU hang with RADV_DEBUG=syncshaders
The GPU hangs when the driver forces a PS_PARTIAL_FLUSH after
a dispatch call (and vice versa for graphics). Something has
changed in the kernel driver because it used to work.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Samuel Pitoiset [Wed, 24 Jan 2018 16:44:35 +0000 (17:44 +0100)]
ac/shader: scan if fragment shaders write memory
It's better to do that in ac_shader_info.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Samuel Pitoiset [Wed, 24 Jan 2018 11:31:40 +0000 (12:31 +0100)]
ac/nir: only canonicalize 32-bit float min/max outputs on pre-GFX9
According to LLVM, only pre-GFX9 targets do not flush denorms
for fmin/fmax.
All dEQP-VK.glsl.builtin.precision.* still pass.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Jason Ekstrand [Thu, 18 Jan 2018 01:10:34 +0000 (17:10 -0800)]
anv/pipeline: Don't look at blend state unless we have an attachment
Without this, we may end up dereferencing blend before we check for
binding->index != UINT32_MAX. However, Vulkan allows the blend state to
be NULL so long as you don't have any color attachments. This fixes a
segfault when running The Talos Principal.
Fixes:
12f4e00b69e724a23504b7bd3958fb75dc462950
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Alex Smith <asmith@feralinteractive.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Maxin B. John [Thu, 18 Jan 2018 11:33:37 +0000 (13:33 +0200)]
anv_icd.py: improve reproducible builds
Sort the output to ensure build reproducibility
Signed-off-by: Maxin B. John <maxin.john@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Fixes:
0ab04ba979b ("anv: Use python to generate ICD json files")
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Ian Romanick [Thu, 4 Jan 2018 02:28:57 +0000 (18:28 -0800)]
nouveau: Remove no-op nvgl_logicop_func function
The values that this function returned were always the values passed
in. The only thing that happened was either an assertion or undefined
results when an unknown value was passed in. This doesn't seem that
useful. Most of nouveau_gldefs.h could be removed in this manner.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Ian Romanick [Wed, 3 Jan 2018 21:29:13 +0000 (13:29 -0800)]
i915: Silence unused parameter warnings
../../SOURCE/master/src/mesa/drivers/dri/i915/intel_fbo.c: In function ‘intel_alloc_window_storage’:
../../SOURCE/master/src/mesa/drivers/dri/i915/intel_fbo.c:290:48: warning: unused parameter ‘ctx’ [-Wunused-parameter]
intel_alloc_window_storage(struct gl_context * ctx, struct gl_renderbuffer *rb,
^~~
../../SOURCE/master/src/mesa/drivers/dri/i915/intel_fbo.c: In function ‘intel_nop_alloc_storage’:
../../SOURCE/master/src/mesa/drivers/dri/i915/intel_fbo.c:303:74: warning: unused parameter ‘rb’ [-Wunused-parameter]
intel_nop_alloc_storage(struct gl_context * ctx, struct gl_renderbuffer *rb,
^~
../../SOURCE/master/src/mesa/drivers/dri/i915/intel_fbo.c:304:32: warning: unused parameter ‘internalFormat’ [-Wunused-parameter]
GLenum internalFormat, GLuint width, GLuint height)
^~~~~~~~~~~~~~
../../SOURCE/master/src/mesa/drivers/dri/i915/intel_fbo.c:304:55: warning: unused parameter ‘width’ [-Wunused-parameter]
GLenum internalFormat, GLuint width, GLuint height)
^~~~~
../../SOURCE/master/src/mesa/drivers/dri/i915/intel_fbo.c:304:69: warning: unused parameter ‘height’ [-Wunused-parameter]
GLenum internalFormat, GLuint width, GLuint height)
^~~~~~
../../SOURCE/master/src/mesa/drivers/dri/i915/intel_fbo.c: In function ‘intel_bind_framebuffer’:
../../SOURCE/master/src/mesa/drivers/dri/i915/intel_fbo.c:396:47: warning: unused parameter ‘fb’ [-Wunused-parameter]
struct gl_framebuffer *fb, struct gl_framebuffer *fbread)
^~
../../SOURCE/master/src/mesa/drivers/dri/i915/intel_fbo.c:396:74: warning: unused parameter ‘fbread’ [-Wunused-parameter]
struct gl_framebuffer *fb, struct gl_framebuffer *fbread)
^~~~~~
../../SOURCE/master/src/mesa/drivers/dri/i915/intel_fbo.c: In function ‘intel_renderbuffer_update_wrapper’:
../../SOURCE/master/src/mesa/drivers/dri/i915/intel_fbo.c:422:57: warning: unused parameter ‘intel’ [-Wunused-parameter]
intel_renderbuffer_update_wrapper(struct intel_context *intel,
^~~~~
../../SOURCE/master/src/mesa/drivers/dri/i915/intel_fbo.c: In function ‘intel_blit_framebuffer_with_blitter’:
../../SOURCE/master/src/mesa/drivers/dri/i915/intel_fbo.c:644:61: warning: unused parameter ‘filter’ [-Wunused-parameter]
GLbitfield mask, GLenum filter)
^~~~~~
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Ian Romanick [Wed, 3 Jan 2018 20:43:24 +0000 (12:43 -0800)]
i915: Make intelEmitCopyBlit static
And rename to emit_copy_blit.
v2: sed --in-place -e 's/color_logic_ops/gl_logicop_mode/g' $(grep -lr
color_logic_ops src/) suggested by Brian.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> [v1]
Ian Romanick [Wed, 3 Jan 2018 20:40:00 +0000 (12:40 -0800)]
i965: Make intelEmitCopyBlit static
And rename to emit_copy_blit.
v2: sed --in-place -e 's/color_logic_ops/gl_logicop_mode/g' $(grep -lr
color_logic_ops src/) suggested by Brian.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> [v1]
Ian Romanick [Wed, 3 Jan 2018 20:33:20 +0000 (12:33 -0800)]
i915: Use enum color_logic_ops for blits
v2: sed --in-place -e 's/color_logic_ops/gl_logicop_mode/g' $(grep -lr
color_logic_ops src/) suggested by Brian.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> [v1]
Ian Romanick [Wed, 3 Jan 2018 20:03:58 +0000 (12:03 -0800)]
i965: Use enum color_logic_ops for blits
v2: sed --in-place -e 's/color_logic_ops/gl_logicop_mode/g' $(grep -lr
color_logic_ops src/) suggested by Brian.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> [v1]
Ian Romanick [Wed, 3 Jan 2018 19:45:58 +0000 (11:45 -0800)]
mesa: Pass the translated color logic op dd_function_table::LogicOpcode
And delete the resulting dead code. This has only been compile-tested.
v2: sed --in-place -e 's/color_logic_ops/gl_logicop_mode/g' $(grep -lr
color_logic_ops src/) suggested by Brian.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Ian Romanick [Wed, 3 Jan 2018 19:44:17 +0000 (11:44 -0800)]
st/mesa: Use the translated color logic op from the context
And delete the resulting dead code.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Ian Romanick [Wed, 3 Jan 2018 19:43:10 +0000 (11:43 -0800)]
i965: Use the translated color logic op from the context
And delete the resulting dead code.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Ian Romanick [Wed, 3 Jan 2018 19:26:41 +0000 (11:26 -0800)]
mesa: Also track a remapped version of the color logic op
With the exception of NVIDIA hardware, these are is the values that all
hardware and Gallium want. The remapping is currently implemented in at
least 6 places. This starts the process of consolidating to a single
place.
v2: sed --in-place -e 's/color_logic_ops/gl_logicop_mode/g' $(grep -lr
color_logic_ops src/) suggested by Brian. Added some comments about the
selection of bit patterns for gl_logicop_mode and the GLenums.
Suggested by Nicolai. Folded the GLenum_to_color_logicop macro into its
only users.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com> [v1]
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Bas Nieuwenhuizen [Thu, 25 Jan 2018 15:48:17 +0000 (16:48 +0100)]
radeonsi: Export signalled sync file instead of -1.
-1 is considered an error for EGL_ANDROID_native_fence_sync, so
we need to actually create a sync file.
Fixes:
f536f45250 "radeonsi: implement sync_file import/export"
Reviewed-by: Dave Airlie <airlied@redhat.com>
Jason Ekstrand [Fri, 15 Dec 2017 06:10:10 +0000 (22:10 -0800)]
i965/fs: Reset the register file to VGRF in lower_integer_multiplication
18fde36ced4279f2577097a1a7d31b55f2f5f141 changed the way temporary
registers were allocated in lower_integer_multiplication so that we
allocate regs_written(inst) space and keep the stride of the original
destination register. This was to ensure that any MUL which originally
followed the CHV/BXT integer multiply regioning restrictions would
continue to follow those restrictions even after lowering. This works
fine except that I forgot to reset the register file to VGRF so, even
though they were assigned a number from alloc.allocate(), they had the
wrong register file. This caused some GLES 3.0 CTS tests to start
failing on Sandy Bridge due to attempted reads from the MRF:
ES3-CTS.functional.shaders.precision.int.highp_mul_fragment.snbm64
ES3-CTS.functional.shaders.precision.int.mediump_mul_fragment.snbm64
ES3-CTS.functional.shaders.precision.int.lowp_mul_fragment.snbm64
ES3-CTS.functional.shaders.precision.uint.highp_mul_fragment.snbm64
ES3-CTS.functional.shaders.precision.uint.mediump_mul_fragment.snbm64
ES3-CTS.functional.shaders.precision.uint.lowp_mul_fragment.snbm64
This commit remedies this problem by, instead of copying inst->dst and
overwriting nr, just make a new register and set the region to match
inst->dst.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103626
Fixes:
18fde36ced4279f2577097a1a7d31b55f2f5f141
Cc: "17.3" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Jason Ekstrand [Thu, 25 Jan 2018 03:01:47 +0000 (19:01 -0800)]
vulkan: Update the XML and headers to 1.0.68
Acked-by: Dave Airlie <airlied@redhat.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Chad Versace <chadversary@chromium.org>
Dave Airlie [Wed, 24 Jan 2018 23:29:55 +0000 (09:29 +1000)]
radv: don't enable tc compat for d32s8 + 4/8 samples (v1.1)
This seems to be broken, at least the cts tests fail.
This fixes:
dEQP-VK.renderpass.suballocation.multisample.d32_sfloat_s8_uint.samples_4
dEQP-VK.renderpass.suballocation.multisample.d32_sfloat_s8_uint.samples_8
2 samples seems to pass fine, amdvlk doesn't appear to enable TC for
possibly some other reasons here.
This is most likely a hack.
v1.1: add a bit of explaination text. (Samuel)
Fixes:
ad3d98da9 (radv: enable tc compatible htile for d32s8 also.)
Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Chuck Atkins [Tue, 23 Jan 2018 13:52:46 +0000 (08:52 -0500)]
configure.ac: add missing llvm dependencies to .pc files
v2: Only add as dependencies for gallium-osmesa and gallium-xlib
CC: <mesa-stable@lists.freedesktop.org>
Signed-of-by: Chuck Atkins <chuck.atkins@kitware.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
George Kyriazis [Wed, 24 Jan 2018 20:15:02 +0000 (14:15 -0600)]
swr/rast: Optimize DumpToFile output size
Modify DumpToFile to only dump the function, not the entire module.
Reduces file sizes and speeds up the dumping.
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
George Kyriazis [Wed, 24 Jan 2018 01:29:05 +0000 (19:29 -0600)]
swr/rast: Updated copyright dates
on knob-related files.
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
George Kyriazis [Tue, 23 Jan 2018 01:23:32 +0000 (19:23 -0600)]
swr/rast: Move memory-related JIT functions
Move them to their own file (builder_mem.{h|cpp}). Add builder_mem.cpp
to the build system.
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
George Kyriazis [Tue, 23 Jan 2018 07:51:00 +0000 (01:51 -0600)]
swr/rast: Add extra (optional) parameter in GATHERPS
Now also takes in an additional parameter (draw context) for future
expansion.
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
George Kyriazis [Sat, 20 Jan 2018 00:03:16 +0000 (18:03 -0600)]
swr/rast: Better ExecCmd (i.e. system()) implmentation
Hides console window creation during JIT linker execution in apps that
don't have a console. Remove hooking of CreateProcessInternalA - the
MSFT implementation just turns around and calls CreateProcessInternalW
which, we do hook.
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
George Kyriazis [Fri, 19 Jan 2018 23:58:33 +0000 (17:58 -0600)]
swr/rast: Support USE_SIMD16_FRONTEND=0 for EarlyRast
Early Rasterization did not initially work with USE_SIMD16_FRONTEND=0.
Fix it so it works there, too. Please note that the default setting
is USE_SIMD16_FRONTEND=1.
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
Brian Paul [Thu, 25 Jan 2018 16:56:06 +0000 (09:56 -0700)]
mesa: whitespace fixes in attrib.c
Trivial.
Brian Paul [Thu, 25 Jan 2018 16:19:10 +0000 (09:19 -0700)]
mesa: whitespace fixes in varray.h
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Brian Paul [Thu, 25 Jan 2018 16:16:54 +0000 (09:16 -0700)]
mesa: include mtypes.h in varray.h
We actually use some of the types from mtypes.h so include it directly
instead of relying on indirectly including it via bufferobj.h
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Brian Paul [Thu, 25 Jan 2018 16:12:59 +0000 (09:12 -0700)]
mesa: s/gl_vertex_attrib_array/gl_array_attributes/ in comments
The structure type was renamed some time ago, but some comments
were not updated.
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Brian Paul [Sat, 20 Jan 2018 03:57:24 +0000 (20:57 -0700)]
mesa: simplify _mesa_delete_list() a bit, add some assertions
All but two cases of the switch did the same n += InstSize[n[0].opcode]
instruction. Just move it after the switch.
Add some sanity check assertions.
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Brian Paul [Fri, 12 Jan 2018 16:32:41 +0000 (09:32 -0700)]
st/mesa: expand glDrawPixels cache to handle multiple images
The newest version of WSI Fusion makes several glDrawPixels calls
per frame. By caching more than one image, we get better performance
when panning/zooming the map.
v2: move pixel unpack param checking out of cache search loop, per Roland
v3: also move unpack->BufferObj check out of loop, per Roland.
Brian Paul [Thu, 11 Jan 2018 18:53:02 +0000 (11:53 -0700)]
st/mesa: add some debug code in st_choose_format()
To aid in debugging gallium surface format selection issues.
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Brian Paul [Thu, 25 Jan 2018 18:36:53 +0000 (11:36 -0700)]
svga: s/Bool/SVGA3dBool/ in SVGA3dDevCapResult
And fix whitespace. To sync up with in-house code.
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Emil Velikov [Wed, 20 Dec 2017 17:34:55 +0000 (17:34 +0000)]
configure.ac: correct driglx-direct help text
The default was toggled a while back, but the text wasn't updated.
Fixes:
bd526ec9e1b ("configure: Always default to
--enable-driglx-direct")
Cc: Jon TURNEY <jon.turney@dronecode.org.uk>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Emil Velikov [Thu, 7 Dec 2017 17:07:39 +0000 (17:07 +0000)]
swrast: remove non-applicable GLX_SWAP_COPY_OML comment
Noticed while skimming for GLX_ instances in the dri codebase.
Comment is completely off and was in such a state since day 1.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Emil Velikov [Thu, 7 Dec 2017 17:07:38 +0000 (17:07 +0000)]
mapi: remove duplicate GL typedefs
Remove the instances already available in gl.h or glext.h.
Sadly GLclampx is only available in GLES(1) so we need to keep that one.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Emil Velikov [Thu, 7 Dec 2017 17:07:37 +0000 (17:07 +0000)]
mapi: remove non applicable HAVE_DIX_CONFIG_H hunk
Seeming artefact from when the xserver build was diving directly into
mesa's tree.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Emil Velikov [Thu, 7 Dec 2017 17:07:36 +0000 (17:07 +0000)]
mapi: autotools: remove unused MAPI_FILES file list
The sole user was OpenVG, which was removed couple of years ago.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Emil Velikov [Thu, 25 Jan 2018 15:31:10 +0000 (15:31 +0000)]
automake: st/mesa/tests: add st_tests_common.h to the tarball
Fixes:
6569b33b6ee ("mesa/st/tests: unify MockCodeLine* classes")
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Emil Velikov [Thu, 25 Jan 2018 15:27:20 +0000 (15:27 +0000)]
automake: mesa: include vbo_private.h in the tarball
Fixes:
a7cfec3be0e ("vbo: move VBO-private types, prototypes, etc. into
new vbo_private.h header")
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Emil Velikov [Tue, 23 Jan 2018 13:04:57 +0000 (13:04 +0000)]
automake: small cleanup after the meson.build inclusion
Namely extend the EXTRA_DIST list, instead of re-assigning it and bring
back a file dropped by mistake.
Fixes:
436ed65d38d ("autotools: include meson build files in tarball")
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Emil Velikov [Tue, 23 Jan 2018 13:02:50 +0000 (13:02 +0000)]
automake: anv: ship anv_extensions_gen.py in the tarball
Fixes:
dd088d4bec7 ("anv/extensions: Generate a header file with
extension tables")
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Emil Velikov [Tue, 23 Jan 2018 11:52:49 +0000 (11:52 +0000)]
automake: vc5: remove non-applicable v3dx_simulator.h
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Roland Scheidegger [Thu, 25 Jan 2018 03:30:41 +0000 (04:30 +0100)]
gallivm: fix crash with seamless cube filtering with different min/mag filter
We are not allowed to modify the incoming coords values, or things may
crash (as we may be inside a llvm conditional and the values may be used
in another branch).
I recently broke this when fixing an issue with NaNs and seamless cube
map filtering, and it causes crashes when doing cubemap filtering
if the min and mag filters are different.
Add const to the pointers passed in to prevent this mishap in the future.
Fixes:
a485ad0bcd ("gallivm: fix an issue with NaNs with seamless cube filtering")
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Eric Engestrom [Mon, 8 Jan 2018 15:47:09 +0000 (15:47 +0000)]
egl: keep extension list sorted, per comment at the top
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
George Kyriazis [Tue, 23 Jan 2018 22:12:42 +0000 (16:12 -0600)]
swr/rast: support llvm 3.9 type declarations
LLVM 3.9 was not taken into account in initial check-in.
Fixes:
01ab218bbc ("swr/rast: Initial work for debugging support.")
cc: mesa-stable@lists.freedesktop.org
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104749
Acked-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>