Marek Olšák [Sun, 3 Jul 2016 12:33:55 +0000 (14:33 +0200)]
glsl_to_tgsi: don't use the negate modifier in integer ops after bitcast
This bug is uncovered by glsl/lower_if_to_cond_assign.
I don't know if it can be reproduced in any other way.
Cc: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Francisco Jerez [Mon, 6 Jun 2016 02:12:22 +0000 (19:12 -0700)]
clover/api: Implement clLinkProgram per-device binary presence validation rule.
Reviewed-by: Serge Martin <edb+mesa@sigluy.net>
Tested-by: Jan Vesely <jan.vesely@rutgers.edu>
Serge Martin [Mon, 9 May 2016 04:57:34 +0000 (21:57 -0700)]
clover: Add clLinkProgram (CL 1.2).
[ Francisco Jerez: Use validate_build_common for error checking,
simplify control flow slightly and handle additional exception
types. ]
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Tested-by: Jan Vesely <jan.vesely@rutgers.edu>
Francisco Jerez [Tue, 17 May 2016 14:03:18 +0000 (16:03 +0200)]
clover: Trivial cleanups for api/program.cpp.
Reviewed-by: Serge Martin <edb+mesa@sigluy.net>
Tested-by: Jan Vesely <jan.vesely@rutgers.edu>
Francisco Jerez [Tue, 17 May 2016 14:03:17 +0000 (16:03 +0200)]
clover/core: Remove compiler.hpp.
header_map was the only definition left in compiler.hpp, move it into
program.hpp which is its only user in clover/core.
Reviewed-by: Serge Martin <edb+mesa@sigluy.net>
Tested-by: Jan Vesely <jan.vesely@rutgers.edu>
Francisco Jerez [Tue, 17 May 2016 14:03:16 +0000 (16:03 +0200)]
clover/llvm: Get rid of compile_program_llvm().
Superseded by compile_program() and link_program().
Reviewed-by: Serge Martin <edb+mesa@sigluy.net>
Tested-by: Jan Vesely <jan.vesely@rutgers.edu>
Francisco Jerez [Tue, 17 May 2016 14:03:14 +0000 (16:03 +0200)]
clover: Provide separate program methods for compilation and linking.
[ Serge Martin: Fix inverted opts and log build ctor args.
Keep the log related to the build. Fix indentation ]
Reviewed-by: Serge Martin <edb+mesa@sigluy.net>
Tested-by: Jan Vesely <jan.vesely@rutgers.edu>
Francisco Jerez [Tue, 17 May 2016 14:03:13 +0000 (16:03 +0200)]
clover: Unify program::build_* into a single method returning a struct.
This gets rid of the program::build_* query methods and replaces them
with the program::build() method that returns a single data structure
containing all parameters for the last build done on the given target
device (including build logs, options and the binary itself).
[ Serge Martin: Fix inverted opts and log build ctor args ]
Reviewed-by: Serge Martin <edb+mesa@sigluy.net>
Tested-by: Jan Vesely <jan.vesely@rutgers.edu>
Serge Martin [Tue, 17 May 2016 14:03:12 +0000 (16:03 +0200)]
clover: Change program::build opts argument to std::string.
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Tested-by: Jan Vesely <jan.vesely@rutgers.edu>
Francisco Jerez [Tue, 17 May 2016 14:03:11 +0000 (16:03 +0200)]
clover: Define error subclass to signal build option parse failure.
Reviewed-by: Serge Martin <edb+mesa@sigluy.net>
Tested-by: Jan Vesely <jan.vesely@rutgers.edu>
Francisco Jerez [Sun, 19 Jun 2016 21:31:59 +0000 (14:31 -0700)]
clover: Move back to using build_error to signal compilation failure.
This partially reverts
7e0180d57d330bd8d3047e841086712376b2a1cc.
Having two different exception subclasses for compilation and linking
makes it more difficult to share or move code between the two
codepaths, because the exact same function under the same error
condition would need to throw one exception or the other depending on
what top-level API is being implemented with it. There is little
benefit anyway because clCompileProgram() and clLinkProgram() can tell
whether they are linking or compiling a program.
Reviewed-by: Serge Martin <edb+mesa@sigluy.net>
Tested-by: Jan Vesely <jan.vesely@rutgers.edu>
Serge Martin [Tue, 17 May 2016 14:03:09 +0000 (16:03 +0200)]
clover: Override ret_object.
Return an API object from an intrusive reference to a Clover object,
incrementing the reference count of the object.
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Tested-by: Jan Vesely <jan.vesely@rutgers.edu>
Francisco Jerez [Tue, 17 May 2016 14:03:08 +0000 (16:03 +0200)]
clover/tgsi: Add stub link_program() function.
Reviewed-by: Serge Martin <edb+mesa@sigluy.net>
Tested-by: Jan Vesely <jan.vesely@rutgers.edu>
Francisco Jerez [Tue, 17 May 2016 14:03:07 +0000 (16:03 +0200)]
clover/tgsi: Move compiler entry point declaration into tgsi directory and namespace.
Reviewed-by: Serge Martin <edb+mesa@sigluy.net>
Tested-by: Jan Vesely <jan.vesely@rutgers.edu>
Francisco Jerez [Fri, 3 Jun 2016 22:46:21 +0000 (15:46 -0700)]
clover/llvm: Implement the -create-library linker option.
[ Serge Martin: disable internalize pass when building a library.
Otherwise some functions may be inlined and removed ]
Reviewed-by: Serge Martin <edb+mesa@sigluy.net>
Tested-by: Jan Vesely <jan.vesely@rutgers.edu>
Francisco Jerez [Mon, 13 Jun 2016 08:41:05 +0000 (01:41 -0700)]
clover/llvm: Implement linkage of multiple clover modules.
Reviewed-by: Serge Martin <edb+mesa@sigluy.net>
Tested-by: Jan Vesely <jan.vesely@rutgers.edu>
Francisco Jerez [Tue, 17 May 2016 14:03:04 +0000 (16:03 +0200)]
clover/llvm: Split compilation and linking.
Split the work previously done by compile_program_llvm() into
compile_program() (which simply runs the front-end and serializes the
resulting LLVM IR) and link_program() (which takes care of everything
else down to binary codegen).
[ Serge Martin: allow LLVM IR dump after compilation ]
Reviewed-by: Serge Martin <edb+mesa@sigluy.net>
Tested-by: Jan Vesely <jan.vesely@rutgers.edu>
Francisco Jerez [Tue, 17 May 2016 14:03:03 +0000 (16:03 +0200)]
clover/llvm: Implement library bitcode codegen.
Reviewed-by: Serge Martin <edb+mesa@sigluy.net>
Tested-by: Jan Vesely <jan.vesely@rutgers.edu>
Francisco Jerez [Tue, 17 May 2016 14:03:02 +0000 (16:03 +0200)]
clover/llvm: Trivial assorted cleanups for invocation.cpp.
Drop a few include and using directives which are no longer necessary.
Reviewed-by: Serge Martin <edb+mesa@sigluy.net>
Tested-by: Jan Vesely <jan.vesely@rutgers.edu>
Francisco Jerez [Mon, 20 Jun 2016 00:56:15 +0000 (17:56 -0700)]
clover/llvm: Split native codegen into separate file.
Reviewed-by: Serge Martin <edb+mesa@sigluy.net>
Tested-by: Jan Vesely <jan.vesely@rutgers.edu>
Francisco Jerez [Tue, 17 May 2016 14:03:00 +0000 (16:03 +0200)]
clover/llvm: Split bitcode codegen into separate file.
Reviewed-by: Serge Martin <edb+mesa@sigluy.net>
Tested-by: Jan Vesely <jan.vesely@rutgers.edu>
Francisco Jerez [Sun, 3 Jul 2016 22:44:01 +0000 (15:44 -0700)]
clover/llvm: Split shared codegen support code into separate file.
This is the common part of the code used to generate a clover::module
from LLVM bitcode, shared between the native and LLVM paths.
Reviewed-by: Serge Martin <edb+mesa@sigluy.net>
Tested-by: Jan Vesely <jan.vesely@rutgers.edu>
Francisco Jerez [Tue, 17 May 2016 14:02:58 +0000 (16:02 +0200)]
clover/llvm: Define function for bitcode print-out.
Reviewed-by: Serge Martin <edb+mesa@sigluy.net>
Tested-by: Jan Vesely <jan.vesely@rutgers.edu>
Francisco Jerez [Tue, 17 May 2016 14:02:57 +0000 (16:02 +0200)]
clover/llvm: Split native codegen and assembly print-out into separate functions.
Reviewed-by: Serge Martin <edb+mesa@sigluy.net>
Tested-by: Jan Vesely <jan.vesely@rutgers.edu>
Francisco Jerez [Tue, 17 May 2016 14:02:56 +0000 (16:02 +0200)]
clover/llvm: Clean up bitcode codegen.
Reviewed-by: Serge Martin <edb+mesa@sigluy.net>
Tested-by: Jan Vesely <jan.vesely@rutgers.edu>
Francisco Jerez [Tue, 28 Jun 2016 07:03:24 +0000 (00:03 -0700)]
clover/llvm: Use metadata introspection utils for kernel enumeration.
Reviewed-by: Serge Martin <edb+mesa@sigluy.net>
Tested-by: Jan Vesely <jan.vesely@rutgers.edu>
Francisco Jerez [Sun, 3 Jul 2016 22:41:51 +0000 (15:41 -0700)]
clover/llvm: Use metadata introspection utils for kernel argument set-up.
Reviewed-by: Serge Martin <edb+mesa@sigluy.net>
Tested-by: Jan Vesely <jan.vesely@rutgers.edu>
Francisco Jerez [Tue, 17 May 2016 14:02:53 +0000 (16:02 +0200)]
clover/llvm: Add simplified utility functions for metadata introspection.
v2: Fix for latest LLVM from SVN.
Reviewed-by: Serge Martin <edb+mesa@sigluy.net> (v1)
Tested-by: Jan Vesely <jan.vesely@rutgers.edu>
Francisco Jerez [Tue, 17 May 2016 14:02:52 +0000 (16:02 +0200)]
clover/llvm: Clean up codestyle of get_kernel_args().
Reviewed-by: Serge Martin <edb+mesa@sigluy.net>
Tested-by: Jan Vesely <jan.vesely@rutgers.edu>
Francisco Jerez [Tue, 28 Jun 2016 06:46:26 +0000 (23:46 -0700)]
clover/llvm: Fold compile_native() call into build_module_native().
Reviewed-by: Serge Martin <edb+mesa@sigluy.net>
Tested-by: Jan Vesely <jan.vesely@rutgers.edu>
Francisco Jerez [Tue, 17 May 2016 14:02:50 +0000 (16:02 +0200)]
clover/llvm: Factor out duplicated construction of clover::module.
Reviewed-by: Serge Martin <edb+mesa@sigluy.net>
Tested-by: Jan Vesely <jan.vesely@rutgers.edu>
Francisco Jerez [Tue, 17 May 2016 14:02:49 +0000 (16:02 +0200)]
clover/llvm: Clean up compile_native().
This switches compile_native() to the C++ API (which the rest of this
file makes use of anyway so there is little benefit from using the C
API), what should get rid of an amount of boilerplate and fix a leak
of the TargetMachine object in the error path.
v2: Additional fixes for LLVM 3.6.
v3: Update for the latest LLVM SVN changes.
Reviewed-by: Serge Martin <edb+mesa@sigluy.net>
Tested-by: Jan Vesely <jan.vesely@rutgers.edu>
Francisco Jerez [Tue, 17 May 2016 14:02:48 +0000 (16:02 +0200)]
clover/llvm: Clean up ELF parsing.
This function was doing three separate things:
- Initializing and releasing the ELF parsing state (the latter can be
better done using RAII).
- Searching for the symbol table in the ELF file.
- Extraction of kernel symbol offsets from the symbol table.
Split each one into a separate function for clarity and clean up the
result slightly.
Reviewed-by: Serge Martin <edb+mesa@sigluy.net>
Tested-by: Jan Vesely <jan.vesely@rutgers.edu>
Francisco Jerez [Tue, 17 May 2016 14:02:47 +0000 (16:02 +0200)]
clover/llvm: Move a bunch of utility functions into separate file.
Some of these will be useful from a different compilation unit in the
same subtree so put them in a publicly accessible header file.
Reviewed-by: Serge Martin <edb+mesa@sigluy.net>
Tested-by: Jan Vesely <jan.vesely@rutgers.edu>
Francisco Jerez [Tue, 17 May 2016 14:02:46 +0000 (16:02 +0200)]
clover/llvm: Tidy debug handling.
Most significant change is debugging flags are now a scoped enum and
all debugging helpers live in the debug namespace.
Reviewed-by: Serge Martin <edb+mesa@sigluy.net>
Tested-by: Jan Vesely <jan.vesely@rutgers.edu>
Francisco Jerez [Tue, 17 May 2016 14:02:45 +0000 (16:02 +0200)]
clover/llvm: Use helper function to abort compilation with error message.
Reviewed-by: Serge Martin <edb+mesa@sigluy.net>
Tested-by: Jan Vesely <jan.vesely@rutgers.edu>
Francisco Jerez [Tue, 17 May 2016 14:02:44 +0000 (16:02 +0200)]
clover/llvm: Simplify diagnostic_handler().
Reviewed-by: Serge Martin <edb+mesa@sigluy.net>
Tested-by: Jan Vesely <jan.vesely@rutgers.edu>
Francisco Jerez [Tue, 17 May 2016 14:02:43 +0000 (16:02 +0200)]
clover/llvm: Trivial codestyle clean-up for optimize().
Reviewed-by: Serge Martin <edb+mesa@sigluy.net>
Tested-by: Jan Vesely <jan.vesely@rutgers.edu>
Francisco Jerez [Tue, 17 May 2016 14:02:42 +0000 (16:02 +0200)]
clover/llvm: Clean up compilation into LLVM IR.
Some assorted and mostly trivial clean-ups for the source to bitcode
compilation path.
Reviewed-by: Serge Martin <edb+mesa@sigluy.net>
Tested-by: Jan Vesely <jan.vesely@rutgers.edu>
Francisco Jerez [Tue, 17 May 2016 14:02:41 +0000 (16:02 +0200)]
clover/llvm: Factor out LLVM context init.
So it can be shared between the compilation and linking codepaths.
Reviewed-by: Serge Martin <edb+mesa@sigluy.net>
Tested-by: Jan Vesely <jan.vesely@rutgers.edu>
Francisco Jerez [Tue, 28 Jun 2016 06:45:30 +0000 (23:45 -0700)]
clover/llvm: Declare compiler instance at top level and pass down as argument.
This allows simplifying the interface of compile_llvm() because it no
longer needs to read out and return the optimization level and address
space map from the compiler instance. Instead declare the compiler
instance at the top level so that both properties are available
directly.
Reviewed-by: Serge Martin <edb+mesa@sigluy.net>
Tested-by: Jan Vesely <jan.vesely@rutgers.edu>
Francisco Jerez [Sat, 25 Jun 2016 23:56:58 +0000 (16:56 -0700)]
clover/llvm: Refactor compiler instance initialization.
This will be shared between the compiler and linker codepaths.
Reviewed-by: Serge Martin <edb+mesa@sigluy.net>
Tested-by: Jan Vesely <jan.vesely@rutgers.edu>
Francisco Jerez [Tue, 17 May 2016 14:02:38 +0000 (16:02 +0200)]
clover/llvm: Factor out compiler option tokenization.
Reviewed-by: Serge Martin <edb+mesa@sigluy.net>
Tested-by: Jan Vesely <jan.vesely@rutgers.edu>
Francisco Jerez [Sat, 25 Jun 2016 23:52:55 +0000 (16:52 -0700)]
clover/llvm: Factor out target string parsing.
Reviewed-by: Serge Martin <edb+mesa@sigluy.net>
Tested-by: Jan Vesely <jan.vesely@rutgers.edu>
Francisco Jerez [Sat, 25 Jun 2016 23:52:11 +0000 (16:52 -0700)]
clover/llvm: Collect #ifdef mess into a separate file.
This gets rid of most ifdef's from the invocation.cpp code -- Only a
couple of them are left which will be removed differently in the
following commits.
Reviewed-by: Serge Martin <edb+mesa@sigluy.net>
Tested-by: Jan Vesely <jan.vesely@rutgers.edu>
Francisco Jerez [Tue, 17 May 2016 14:02:35 +0000 (16:02 +0200)]
clover/llvm: Drop dead code.
This ifdef'ed out code was meant to handle compilation into TGSI, but
it doesn't seem likely that it will ever be useful even if the TGSI
back-end is resurrected because the TGSI bitcode can just be plumbed
through in ELF format and dealt with as a regular "native" back-end.
Reviewed-by: Serge Martin <edb+mesa@sigluy.net>
Tested-by: Jan Vesely <jan.vesely@rutgers.edu>
Francisco Jerez [Tue, 28 Jun 2016 06:24:59 +0000 (23:24 -0700)]
clover/llvm: Drop support for LLVM < 3.6.
Reviewed-by: Serge Martin <edb+mesa@sigluy.net>
Tested-by: Jan Vesely <jan.vesely@rutgers.edu>
Serge Martin [Tue, 17 May 2016 14:02:33 +0000 (16:02 +0200)]
clover: Bump required LLVM version to 3.6.
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Tested-by: Jan Vesely <jan.vesely@rutgers.edu>
Ilia Mirkin [Fri, 8 Jul 2016 18:24:38 +0000 (14:24 -0400)]
mesa: set _NEW_BUFFERS when updating texture bound to current buffers
When a glTexImage call updates the parameters of a currently bound
framebuffer, we might miss out on revalidating whether it is complete.
Make sure to set _NEW_BUFFERS which will trigger the revalidation in
that case.
Also while we're at it, fix the fb parameter passed in to the eventual
RenderTexture call.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94148
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "11.2 12.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Tested-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
Ilia Mirkin [Fri, 8 Jul 2016 16:35:11 +0000 (12:35 -0400)]
meta/texsubimage: tex_image is always non-null, avoid confusing code
Probably a copy-paste from mesa_meta_pbo_GetTexSubImage where tex_image
may apparently be null.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Ilia Mirkin [Fri, 8 Jul 2016 03:46:28 +0000 (23:46 -0400)]
st/mesa: return appropriate mesa format for ETC texture formats
Even when the backend driver does not support ETC formats, we handle the
decoding into an uncompressed backing texture. However as far as core
mesa is concerned, it's an ETC texture and we should return the relevant
ETC mesa format. This condition can get hit when using glTexStorage to
create the texture object.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Cc: "11.2 12.0" <mesa-stable@lists.freedesktop.org>
Ilia Mirkin [Fri, 8 Jul 2016 22:41:03 +0000 (18:41 -0400)]
mesa: etc2 online compression is unsupported, don't attempt it
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Cc: "11.2 12.0" <mesa-stable@lists.freedesktop.org>
Ben Skeggs [Sat, 9 Jul 2016 00:06:44 +0000 (10:06 +1000)]
nvc0: initial support for GP100 GPUs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Samuel Pitoiset [Mon, 11 Jul 2016 20:25:05 +0000 (22:25 +0200)]
nvc0: use a define for the driver constant buffer size
This might avoid mistakes if the size is bumped in the future.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Samuel Pitoiset [Mon, 11 Jul 2016 19:26:25 +0000 (21:26 +0200)]
nvc0: fix the driver cb size when draw parameters are used
The size of the driver constant buffer for each stage should be 2048
and not 512 because it has been increased recently for buffers/images.
While we are at it, do the same change for indirect draws.
This fixes all ARB_shader_draw_parameters tests on GM107.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: 12.0 <mesa-stable@lists.freedesktop.org>
Samuel Pitoiset [Sun, 10 Jul 2016 14:19:46 +0000 (16:19 +0200)]
nvc0/ir: fix images indirect access on Fermi
This fixes the following piglits:
arb_arrays_of_arrays-basic-imagestore-mixed-const-non-const-uniform-index
arb_arrays_of_arrays-basic-imagestore-mixed-const-non-const-uniform-index2
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: 12.0 <mesa-stable@lists.freedesktop.org>
Marek Olšák [Fri, 1 Jul 2016 18:43:29 +0000 (20:43 +0200)]
st/mesa: remove st_dump_program_for_shader_db
replaced by MESA_SHADER_CAPTURE_PATH in core Mesa
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Marek Olšák [Fri, 1 Jul 2016 18:09:47 +0000 (20:09 +0200)]
gallivm: set LLVMNoUnwindAttribute on all intrinsics
RadeonSI stats: Mostly 0% difference, but Valley shows a small improvement:
Application Files SGPRs VGPRs SpillSGPR SpillVGPR Code Size LDS Max Waves Waits
unigine_valley 278 0.00 % -0.29 % 0.00 % 0.00 % 0.01 % 0.00 % 0.17 % 0.00 %
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Francesco Ansanelli [Sat, 9 Jul 2016 08:16:29 +0000 (10:16 +0200)]
i965: fix ignored qualifiers warning
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Nicolai Hähnle [Sat, 9 Jul 2016 17:44:13 +0000 (19:44 +0200)]
gallium/u_queue: assert that users must wait on fences before destroying them
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Nicolai Hähnle [Sat, 9 Jul 2016 17:40:51 +0000 (19:40 +0200)]
gallium/u_queue: guard fence->signalled checks with fence->mutex
I have seen a hang during application shutdown that could be explained by the
following race condition which this patch fixes:
1. Worker thread enters util_queue_fence_signal, sets fence->signalled = true.
2. Main thread calls util_queue_job_wait, which returns immediately.
3. Main thread deletes the job and fence structures, leaving garbage behind.
4. Worker thread calls pipe_condvar_broadcast, which gets stuck forever because
it is accessing garbage.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Chad Versace [Thu, 7 Jul 2016 23:04:59 +0000 (16:04 -0700)]
anv/dump: Fix post-blit memory barrier
Swap srcAccessMask and dstAccessMask.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Chad Versace [Thu, 7 Jul 2016 23:04:58 +0000 (16:04 -0700)]
anv/dump: Fix vkCmdPipelineBarrier flags
'true' is not valid for VkDependencyFlags.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Jason Ekstrand [Wed, 15 Jun 2016 23:13:46 +0000 (16:13 -0700)]
anv/dump: Add support for dumping framebuffers
Reviewed-by: Chad Versace <chad.versace@intel.com>
Jason Ekstrand [Wed, 15 Jun 2016 22:08:09 +0000 (15:08 -0700)]
anv/dump: Add a barrier for the source image
Reviewed-by: Chad Versace <chad.versace@intel.com>
Jason Ekstrand [Wed, 15 Jun 2016 22:01:45 +0000 (15:01 -0700)]
anv/dump: Refactor the guts into helpers
Reviewed-by: Chad Versace <chad.versace@intel.com>
Jason Ekstrand [Wed, 15 Jun 2016 21:30:07 +0000 (14:30 -0700)]
anv/dump: Use anv_minify instead of hand-rolling it
Reviewed-by: Chad Versace <chad.versace@intel.com>
Jason Ekstrand [Tue, 14 Jun 2016 00:08:59 +0000 (17:08 -0700)]
anv/dump: Take an aspect in dump_image_to_ppm
Reviewed-by: Chad Versace <chad.versace@intel.com>
Nicolai Hähnle [Fri, 8 Jul 2016 17:12:00 +0000 (19:12 +0200)]
radeonsi: fix bad assertion in si_emit_sample_mask
The blitter sets mask == 1, which is fine since it doesn't use smoothing.
Fixes a regression introduced in commit
5bcfbf91.
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Matt Turner [Thu, 23 Jun 2016 06:11:27 +0000 (23:11 -0700)]
glx: Fix for commit
2c86668694.
Ian suggested these changes in his review and I made them, but I pushed
the old version of the patch.
Emil Velikov [Fri, 8 Jul 2016 23:09:51 +0000 (00:09 +0100)]
docs: add news item and link release notes for 12.0.0/12.0.1
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Emil Velikov [Fri, 8 Jul 2016 23:02:13 +0000 (00:02 +0100)]
docs: add sha256 checksums for 12.0.1
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
(cherry picked from commit
edfc17a19a17e8dae41a703a9cb4b9eb3c255c34)
Emil Velikov [Fri, 8 Jul 2016 22:45:44 +0000 (23:45 +0100)]
docs: add release notes for 12.0.1
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
(cherry picked from commit
04277f058d00238937e664cf546c43b16cea7b2b)
Emil Velikov [Fri, 8 Jul 2016 22:47:39 +0000 (23:47 +0100)]
docs: add sha256 checksums for 12.0.0
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
(cherry picked from commit
3a146a789c5aa45e0de52bff764c2b371dd253aa)
Emil Velikov [Thu, 7 Jul 2016 12:39:06 +0000 (13:39 +0100)]
docs: Update 12.0.0 release notes
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
(cherry picked from commit
8b06176f310f65628ce136b90a99005278ba5e0d)
Matt Turner [Thu, 23 Jun 2016 06:11:27 +0000 (23:11 -0700)]
glx: Undo memory allocation checking damage.
This partially reverts commit
d41f5396f3cb619729021390c273f838d92f11fb.
That untested commit broke the tex-skipped-unit piglit test and the
arbvparray Mesa demo when run with indirect GLX.
state->array_state is used during initialization, so its assignment cannot be
moved to the end of the function.
The backtrace looked like:
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff77c7a5c in __glXGetActiveTextureUnit (state=0x6270e0) at indirect_vertex_array.c:1952
1952 return state->array_state->active_texture_unit;
(gdb) bt
0 0x00007ffff77c7a5c in __glXGetActiveTextureUnit (state=0x6270e0) at indirect_vertex_array.c:1952
1 0x00007ffff77cbf62 in get_client_data (gc=0x626f50, cap=34018, data=0x7fffffffd7a0) at single2.c:159
2 0x00007ffff77cce51 in __indirect_glGetIntegerv (val=34018, i=0x7fffffffd830) at single2.c:498
3 0x00007ffff77c4340 in __glXInitVertexArrayState (gc=0x626f50) at indirect_vertex_array.c:193
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Colin McDonald [Thu, 23 Jun 2016 02:19:30 +0000 (19:19 -0700)]
glx: Fix indirect multi-texture GL_DOUBLE coordinate arrays.
There is no draw arrays protocol support for multi-texture coordinate
arrays, so it is implemented by sending batches of immediate mode
commands from emit_element_none in indirect_vertex_array.c. This sends
the target texture unit (which has been previously setup in the
array_state header field), followed by the texture coordinates. But for
GL_DOUBLE coordinates the texture unit must be sent *after* the texture
coordinates. This is documented in the glx protocol description, and can
also be seen in the indirect.c immediate mode commands generated from
gl_API.xml. Sending the target texture unit in the wrong place can crash
the remote X server.
To fix this required some more extensive changes to
indirect_vertex_array.c and indirect_vertex_array_priv.h, in order to
remove the texture unit value out of the array_state "header" field, and
send it separately.
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=61907
Colin McDonald [Thu, 23 Jun 2016 02:11:55 +0000 (19:11 -0700)]
glx: Correct opcode typos in __indirect_glTexCoordPointer.
At the same time, replace opcode numbers with names in
__indirect_glVertexAttribPointer.
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=61907
Colin McDonald [Thu, 23 Jun 2016 02:07:49 +0000 (19:07 -0700)]
glx: Call __glXInitVertexArrayState() with a usable gc.
For each indirect context the indirect vertex array state must be initialised
by __glXInitVertexArrayState in indirect_vertex_array.c. As noted in the
routine header it requires that the glx context has been setup prior to the
call, in order to test the server version and extensions.
Currently __glXInitVertexArrayState is called from indirect_bind_context in
indirect_glx.c, as follows:
state = gc->client_state_private;
if (state->array_state == NULL) {
glGetString(GL_EXTENSIONS);
glGetString(GL_VERSION);
__glXInitVertexArrayState(gc);
}
But, the gc context is not yet usable at this stage, so the server queries
fail, and __glXInitVertexArrayState is called without the server version and
extension information it needs. This breaks multi-texturing as
glXInitVertexArrayState doesn't get GL_MAX_TEXTURE_UNITS. It probably also
breaks setup of other arrays: fog, secondary colour, vertex attributes.
To fix this I have moved the call to __glXInitVertexArrayState to the end of
MakeContextCurrent in glxcurrent.c, where the glx context is usable.
Fixes a regression caused by commit
4fbdde889c. Fixes ARB_vertex_program
usage in the arbvparray Mesa demo when run with indirect GLX and also
the tex-skipped-unit piglit test when run with indirect GLX.
Reviewed-by: Matt Turner <mattst88@gmail.com>
Acked-by: Ian Romanick <ian.d.romanick@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=61907
Christian König [Thu, 7 Jul 2016 09:27:21 +0000 (11:27 +0200)]
radeon/uvd: simplify sending context buffer message
Just send it whenever it is allocated.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Christian König [Thu, 7 Jul 2016 09:22:32 +0000 (11:22 +0200)]
radeon/uvd: fix contex buffer destruction in the error path
Destroying a not allocated buffer is harmless.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Christian König [Thu, 7 Jul 2016 09:20:30 +0000 (11:20 +0200)]
radeon/uvd: move polaris fw check into radeon_video.c v2
It's actually not very clever to claim to support H.264
and then fail to create a decoder.
v2: prefix FW macro with UVD_.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Christian König [Thu, 7 Jul 2016 08:56:23 +0000 (10:56 +0200)]
radeon/video: fix coding style in radeon_video.c v2
v2: fix other tabs as well.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Brian Paul [Wed, 6 Jul 2016 23:24:18 +0000 (17:24 -0600)]
svga: simplify/fix 1D/2D array resource copies
Fixes the one of the piglit arb_copy_image-targets tests for 1D arrays.
Previously, we were applying the 1D array z/face adjustment twice.
Also simplify the copy_region_vgpu10() function. It never has to copy
multiple array layers/slices. The Mesa code for glCopyImageSubData does
the loop over slices/faces.
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Brian Paul [Wed, 6 Jul 2016 23:10:52 +0000 (17:10 -0600)]
mesa: print number of samples in renderbuffer_storage error msg
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
Brian Paul [Wed, 6 Jul 2016 23:21:36 +0000 (17:21 -0600)]
svga: remove unused variable
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Brian Paul [Wed, 6 Jul 2016 21:25:55 +0000 (15:25 -0600)]
svga: add dumping for more device commands
Signed-off-by: Brian Paul <brianp@vmware.com>
Brian Paul [Wed, 6 Jul 2016 21:25:23 +0000 (15:25 -0600)]
svga: silence a couple unused variable warnings
Signed-off-by: Brian Paul <brianp@vmware.com>
Charmaine Lee [Thu, 30 Jun 2016 20:08:25 +0000 (13:08 -0700)]
svga: rebind using render target surfaces in hw draw state
Currently when we rebind framebuffer resources at the beginning of
the command buffer, we use the color buffer surfaces saved in the context
hw clear state. But the surfaces could be different from the actual
emitted render target surfaces if any of the color buffer surfaces
is also used for shader resource, in that case, we create
a backed surface for the collided render target surface. So to rebind
the framebuffer resources correctly, use the render target surfaces saved
in the context hw draw state.
Tested with Heaven, Lightsmark2008, MTT piglit, glretrace, conform.
Reviewed-by: Brian Paul <brianp@vmware.com>
Charmaine Lee [Tue, 8 Mar 2016 19:18:51 +0000 (11:18 -0800)]
svga: invalidate gb surface before it is reused
With this patch, a guest-backed surface will be invalidated
using the SVGA_3D_CMD_INVALIDATE_GB_SURFACE command before
the surface is reused. This fixes the updating dirty image error
from the device when a surface is reused.
v2: Instead of invalidating the surface when it is reused,
send the invalidate command before the surface is put into
the recycle pool.
v3: (1) surface invalidate is a noop operation in Linux winsys, since
surface invalidation is not needed for DMA path.
(2) Instead of invalidating the surface content in
svga_screen_surface_destroy() when a surface is to be destroyed,
it is done in svga_screen_cache_flush() when the surface is
no longer referenced in a command buffer and is ready to
be moved to the unused list. At this point, the surface will
be moved to the invalidate list. When the surface invalidation
is submitted, the surface will be moved to the unused list.
Tested with piglit, glretrace.
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Sinclair Yeh <syeh@vmware.com>
Brian Paul [Tue, 17 May 2016 16:44:01 +0000 (10:44 -0600)]
svga: fix use of provoking vertex control
If the SVGA3D_DEVCAP_DX_PROVOKING_VERTEX query returns false, never
define rasterizer state objects with provokingVertexLast set. Despite
what the device reports, it may interpret the provokingVertexLast flag
anyway. This fixes an issue when using capability clamping.
Tested with piglit provoking-vertex and glsl-fs-flat-color tests.
VMware bug
1550143.
Reviewed-by: <charmainel@vmware.com>
Nayan Deshmukh [Tue, 5 Jul 2016 18:17:56 +0000 (23:47 +0530)]
vl: add half pixel to v_tex before adding offsets
Since pixel center lies at 0.5, add half_pixel to vtex
before adding offsets to it.
Signed-off-by: Nayan Deshmukh <nayan26deshmukh@gmail.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Samuel Pitoiset [Tue, 5 Jul 2016 12:01:34 +0000 (14:01 +0200)]
nvc0/ir: remove unused resource info loading helpers
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Samuel Pitoiset [Tue, 5 Jul 2016 12:01:33 +0000 (14:01 +0200)]
nvc0/ir: refactor the surfaces info loading logic
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Samuel Pitoiset [Tue, 5 Jul 2016 12:01:32 +0000 (14:01 +0200)]
nvc0/ir: move the shift left op inside loadTexHandle()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Nicolai Hähnle [Wed, 6 Jul 2016 21:51:05 +0000 (23:51 +0200)]
radeonsi: disable multi-threading when shader dumps are enabled
Otherwise, shader dumps can become interleaved and unusable.
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Nicolai Hähnle [Thu, 7 Jul 2016 07:28:25 +0000 (09:28 +0200)]
radeonsi: use multi-threaded compilation in debug contexts
We only have to stay single-threaded when debug output must be synchronous.
This yields better parallelism in shader-db runs for me.
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Nicolai Hähnle [Thu, 7 Jul 2016 07:25:31 +0000 (09:25 +0200)]
st/mesa: set debug callback async flag
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Nicolai Hähnle [Thu, 7 Jul 2016 07:11:17 +0000 (09:11 +0200)]
gallium: add async flag to pipe_debug_callback
v2: fix typo db -> cb
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Nicolai Hähnle [Wed, 6 Jul 2016 14:55:08 +0000 (16:55 +0200)]
radeonsi: catch a potential state tracker error with non-MSAA FBs
At least st/mesa ensures this, so I'd rather not handle deviations in radeonsi.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>