Jason Ekstrand [Fri, 22 Apr 2016 23:04:05 +0000 (16:04 -0700)]
i965/blorp: Convert brw_blorp.cpp to a C file
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Jason Ekstrand [Fri, 22 Apr 2016 21:39:50 +0000 (14:39 -0700)]
i965/blorp: Make all of brw_blorp.h accessible to C
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Jason Ekstrand [Fri, 22 Apr 2016 21:32:48 +0000 (14:32 -0700)]
i965/blorp: Turn brw_blorp_params into a C-style struct
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Jason Ekstrand [Fri, 22 Apr 2016 01:10:53 +0000 (18:10 -0700)]
i965/blorp: Turn coord_transform into a C-style struct
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Jason Ekstrand [Thu, 21 Apr 2016 23:39:56 +0000 (16:39 -0700)]
i965/blorp: Turn blorp_surface_info into a C-style struct
This commit is mostly mechanical except that it changes where we set the
swizzle. Previously, the blorp_surface_info constructor defaulted the
swizzle to SWIZZLE_XYZW. Now, we memset to zero and fill out the swizzle
when we setup the rest of the struct.
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Jason Ekstrand [Thu, 21 Apr 2016 23:19:51 +0000 (16:19 -0700)]
i965/blorp: Roll mip_info into surface_info
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Jason Ekstrand [Fri, 22 Apr 2016 21:06:08 +0000 (14:06 -0700)]
i965/blorp: Get rid of the blorp_blit_params class
It was really just a wrapper around the function that constructed it.
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Jason Ekstrand [Fri, 22 Apr 2016 20:46:25 +0000 (13:46 -0700)]
i965/blorp: Remove the hiz params class
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Jason Ekstrand [Fri, 22 Apr 2016 19:55:49 +0000 (12:55 -0700)]
i965/blorp: Remove the clear params classes
They didn't really add anything other than a key and extra layers of
function calls. This commit just inlines the extra functions and gets rid
of the extra classes.
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Jason Ekstrand [Fri, 22 Apr 2016 20:52:30 +0000 (13:52 -0700)]
i965/blorp: Remove the arguments to brw_blorp_params()
No one was using anything other than the defaults.
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Jason Ekstrand [Fri, 22 Apr 2016 18:38:23 +0000 (11:38 -0700)]
i965/blorp: Refactor to get rid of the get_wm_prog virtual function
Instead of having a virtual member function for getting the WM/PS kernel,
we simply add fields for prog_data and the kernel to brw_blorp_parms and
always make sure those get set as part of the different constructors.
v2: Use use prog_data != NULL to check for a valid program instead of a
magic kernel offset value
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Tim Rowley [Tue, 26 Apr 2016 16:22:24 +0000 (11:22 -0500)]
swr: autogenerate swr_context_llvm.h
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
Laurent Carlier [Sun, 17 Apr 2016 09:38:53 +0000 (11:38 +0200)]
anv: honor DESTDIR when installing icd file
https://bugs.freedesktop.org/show_bug.cgi?id=94969
Reviewed-by: Chad Versace <chad.versace@intel.com>
Juha-Pekka Heikkila [Sat, 16 Apr 2016 19:26:23 +0000 (22:26 +0300)]
i965/meta: initialize values to avoid random behaviour on error path
if brw_meta_stencil_blit() errored at wrong place 'target' would
be uninitialized and cause random behaviour on leaving the funtion.
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Reviewed-by: Eduardo Lima Mitev <elima@igalia.com>
Reviewed-by: Chad Versace <chad.versace@intel.com>
Juha-Pekka Heikkila [Sat, 16 Apr 2016 19:26:22 +0000 (22:26 +0300)]
meta: Avoid random memory access on error
Initialize drawFb to NULL in _mesa_meta_CopyImageSubData_uncompressed()
if getting readFb fails uninitialized drawFb will cause randomness
on cleanup.
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Reviewed-by: Eduardo Lima Mitev <elima@igalia.com>
Reviewed-by: Chad Versace <chad.versace@intel.com>
Grazvydas Ignotas [Fri, 15 Apr 2016 22:50:12 +0000 (01:50 +0300)]
mesa: add tags file to gitignore
For ctags users like me.
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Reviewed-by: Chad Versace <chad.versace@intel.com>
Jakob Sinclair [Thu, 14 Apr 2016 16:07:42 +0000 (18:07 +0200)]
mesa: Remove every double semi-colon
Signed-off-by: Jakob Sinclair <sinclair.jakob@openmailbox.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Chad Versace <chad.versace@intel.com>
Jakob Sinclair [Thu, 14 Apr 2016 16:07:41 +0000 (18:07 +0200)]
glx: Remove every double semi-colon
Signed-off-by: Jakob Sinclair <sinclair.jakob@openmailbox.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Chad Versace <chad.versace@intel.com>
Jakob Sinclair [Thu, 14 Apr 2016 16:07:40 +0000 (18:07 +0200)]
gallium: Remove every double semi-colon
Signed-off-by: Jakob Sinclair <sinclair.jakob@openmailbox.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Chad Versace <chad.versace@intel.com>
Jakob Sinclair [Thu, 14 Apr 2016 16:07:39 +0000 (18:07 +0200)]
egl: Remove every double semi-colon
Removes all accidental semi-colons in egl.
Signed-off-by: Jakob Sinclair <sinclair.jakob@openmailbox.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Chad Versace <chad.versace@intel.com>
Jakob Sinclair [Wed, 13 Apr 2016 16:43:11 +0000 (18:43 +0200)]
gallium/r600: removing double semi-colons
Trivial change. Removing unnecessary semi-colons from the code.
I don't have push access so someone reviewing this can push it.
Signed-off-by: Jakob Sinclair <sinclair.jakob@openmailbox.org>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-by: Chad Versace <chad.versace@intel.com>
Jakob Sinclair [Wed, 13 Apr 2016 16:43:10 +0000 (18:43 +0200)]
mesa/main: removing double semi-colons
Trivial change. Removing unnecessary semi-colons from the code.
I don't have push access so someone reviewing this can push it.
Signed-off-by: Jakob Sinclair <sinclair.jakob@openmailbox.org>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-by: Chad Versace <chad.versace@intel.com>
Jakob Sinclair [Wed, 13 Apr 2016 16:43:09 +0000 (18:43 +0200)]
glsl: removing double semi-colons
Trivial change. Removing unnecessary semi-colons from the code.
I don't have push access so someone reviewing this can push it.
Signed-off-by: Jakob Sinclair <sinclair.jakob@openmailbox.org>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-by: Chad Versace <chad.versace@intel.com>
Jose Fonseca [Tue, 26 Apr 2016 18:48:12 +0000 (19:48 +0100)]
glx: Don't enclose includes inside `extern "C" { }`.
Ran `make check` inside src/glx to verify everything compiles and links
correctly.
https://bugs.freedesktop.org/show_bug.cgi?id=95158
Reviewed-by: Brian Paul <brianp@vmware.com>
Marek Olšák [Fri, 22 Apr 2016 07:38:03 +0000 (09:38 +0200)]
radeonsi: add RW_BUFFERS only once in si_ce_needed_cs_space
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Marek Olšák [Fri, 22 Apr 2016 07:00:29 +0000 (09:00 +0200)]
egl: fix make check broken by interop support
Samuel Pitoiset [Tue, 26 Apr 2016 19:02:16 +0000 (21:02 +0200)]
docs: mark ARB_compute_shader as done for nvc0
This has been merged few months ago but this should help
https://mesamatrix.net/ to update its list of supported extensions.
Please note that compute shaders are not really useful without
ARB_image_load_store and only GK104 and GK110 support it for now.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Samuel Pitoiset [Mon, 18 Apr 2016 16:55:22 +0000 (18:55 +0200)]
nvc0: expose GLSL version 420 on GK110
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Samuel Pitoiset [Mon, 18 Apr 2016 16:54:14 +0000 (18:54 +0200)]
nvc0: enable ARB_shader_image_load_store on GK110
This exposes 8 images for all shader types.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Samuel Pitoiset [Tue, 19 Apr 2016 23:04:28 +0000 (01:04 +0200)]
gk110/ir: add emission for VSHL
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Samuel Pitoiset [Mon, 18 Apr 2016 23:37:44 +0000 (01:37 +0200)]
gk110/ir: add emission for OP_SUEAU, OP_SUBFM and OP_SUCLAMP
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Samuel Pitoiset [Mon, 18 Apr 2016 16:53:37 +0000 (18:53 +0200)]
gk110/ir: add emission for OP_SULDB and OP_SUSTx
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Samuel Pitoiset [Mon, 18 Apr 2016 16:50:24 +0000 (18:50 +0200)]
gk110/ir: add emission for OP_MADSP
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Samuel Pitoiset [Mon, 18 Apr 2016 16:48:52 +0000 (18:48 +0200)]
gk110/ir: add emission for OP_PERMT
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Samuel Pitoiset [Fri, 8 Apr 2016 18:24:58 +0000 (20:24 +0200)]
nvc0: expose GLSL version 420 on GK104
Other chipsets will be added later.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Ilia Mirkin [Sat, 9 Jan 2016 04:06:25 +0000 (23:06 -0500)]
nvc0: enable ARB_shader_image_load_store on GK104
This exposes 8 images for all shader types.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Samuel Pitoiset [Sat, 9 Apr 2016 18:32:25 +0000 (20:32 +0200)]
nvc0: inform users that 3D images are not fully supported
3D images are a bit more complicated to implement and will probably
requires a bunch of headaches and we don't care for now because they
do not seem to be really used by apps.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Samuel Pitoiset [Mon, 11 Apr 2016 14:58:57 +0000 (16:58 +0200)]
nvc0: reduce GL_MAX_3D_TEXTURE_SIZE to 2048 on Kepler+
The blob sets it to 2048 and using 4096 reports an INVALID_DATA error
with RT_ARRAY_MODE when z is 4096. Suggested by Ilia Mirkin.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "11.1 11.2" <mesa-stable@lists.freedesktop.org>
Samuel Pitoiset [Mon, 25 Apr 2016 21:13:00 +0000 (23:13 +0200)]
nvc0/ir: check that the image format doesn't mismatch
This re-uses NVE4_SU_INFO_CALL which is not used anymore because we
don't use our lib for format conversions. While we are at it, add a
todo for image buffers because there are some robustness-related
issues to fix.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Samuel Pitoiset [Tue, 12 Apr 2016 15:12:00 +0000 (17:12 +0200)]
nvc0/ir: prevent out of bounds when no images are bound
Checking if the image address is not 0 should be enough to prevent
read faults. To improve robustness, make sure that the destination
value of atomic operations is correctly initialized in case the
instruction is not performed.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Samuel Pitoiset [Wed, 6 Apr 2016 15:15:35 +0000 (17:15 +0200)]
nvc0/ir: add indirect support for images on Kepler
This fixes arb_shader_image_load_store-indexing and
arb_shader_image_load_store-max-images.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Samuel Pitoiset [Tue, 5 Apr 2016 10:48:32 +0000 (12:48 +0200)]
nvc0/ir: fix 1D arrays images for Kepler
For 1D arrays, the array index is stored in the Z component.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Samuel Pitoiset [Sat, 2 Apr 2016 10:58:46 +0000 (12:58 +0200)]
nvc0/ir: fix cube images for Kepler
Like 2d array images, the z-dimension needs to be clamped.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Ilia Mirkin [Tue, 5 Apr 2016 14:00:56 +0000 (16:00 +0200)]
nv50/ir: add support for SULDP -> SULDB conversion
This will allow to convert surface formats without adding an extra
call to our lib.
[hakzsam: make use of this for GK104]
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Samuel Pitoiset [Sat, 9 Apr 2016 15:10:30 +0000 (17:10 +0200)]
nv50/ir: make use of OP_SUQ for surfaces query
This implements RESQ for surfaces which comes from imageSize() GLSL
bultin. As the dimensions are sticked into the driver constant buffer,
this only has to be lowered with loads.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> (v2)
Samuel Pitoiset [Sat, 9 Apr 2016 15:08:56 +0000 (17:08 +0200)]
nv50/ir: add OP_BUFQ for buffers query
TGSI RESQ allows both images and buffers but we have to make a
distinction between these two type of resources in our lowering pass.
Introducing OP_BUFQ which is a fake operand will allow to implement
OP_SUQ for surfaces.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Samuel Pitoiset [Sun, 27 Mar 2016 20:47:37 +0000 (22:47 +0200)]
nv50/ir: enable early fragment test with explicit user control
This feature can be enabled in two ways: as an optimization and by
explicit user control (with OpenGL 4.2 or ARB_shader_image_load_store).
This makes use of the recent TGSI_PROPERTY_FS_EARLY_DEPTH_STENCIL to
force early fragment tests when needed.
This fixes a bunch of
dEQP-GLES31.functional.image_load_store.early_fragment_tests.* tests.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Samuel Pitoiset [Tue, 5 Apr 2016 10:39:12 +0000 (12:39 +0200)]
nvc0/ir: fix constraints for OP_SUSTx on Kepler
Destination type is actually always 32-bits, so typeSizeof() returns 4
and no sources are condensed.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Samuel Pitoiset [Tue, 5 Apr 2016 13:22:00 +0000 (15:22 +0200)]
nv50/ir: re-introduce TGSI lowering pass for images
This is loosely based on the previous lowering pass wrote by calim
four years ago. I did clean the code and fixed some issues.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Samuel Pitoiset [Sat, 9 Jan 2016 06:38:08 +0000 (01:38 -0500)]
nv50/ir: add support for TGSI image declarations
Old and dead resource code will be removed once images are completely
done. Based on original patch by Ilia Mirkin.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Samuel Pitoiset [Sun, 3 Apr 2016 17:08:20 +0000 (19:08 +0200)]
nvc0: add missing glMemoryBarrier bits
This fixes a bunch of subtests of
arb_shader_image_load_store-host-mem-barrier.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> (v1)
Samuel Pitoiset [Wed, 6 Apr 2016 14:19:37 +0000 (16:19 +0200)]
nvc0: enable RGB10_A2UI format on GK104
No clue why this was not enabled by default before, maybe because
the SULDP conversion was wrong. Anyway, this helps in fixing all
rgb10_a2ui piglit tests.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Samuel Pitoiset [Sat, 9 Apr 2016 18:15:13 +0000 (20:15 +0200)]
nvc0: shift address with blocksize for image buffers
This fixes a bunch of dEQP image buffers related tests.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Samuel Pitoiset [Sat, 9 Apr 2016 18:31:45 +0000 (20:31 +0200)]
nvc0: fix address offset when images have multiple levels
This fixes arb_shader_image_load_store-level.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Samuel Pitoiset [Tue, 5 Apr 2016 11:53:56 +0000 (13:53 +0200)]
nvc0: bind images on 3D shaders for Kepler
Similar to surfaces validation for compute shaders.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Samuel Pitoiset [Thu, 7 Apr 2016 22:56:54 +0000 (00:56 +0200)]
nvc0: bind images on compute shaders for Kepler
Old surfaces validation code will be removed once images are completely
done for Fermi/Kepler, that explains why I only disable it for now.
This also introduces nvc0_get_surface_dims() which computes correct
dimensions regarding the given target.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Samuel Pitoiset [Tue, 22 Mar 2016 17:00:09 +0000 (18:00 +0100)]
nvc0: reserve an area for surfaces info in the driver constbuf
To process surfaces coordinates from the codegen part, and because
some information like the format is not always available (eg. when
writeonly is used), we have to stick some surfaces data in the
driver constbuf. This is especially true for OpenCL because we don't
know the format at shader compile time.
This bumps the size of each shader area from 1K to 2K.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Samuel Pitoiset [Fri, 18 Mar 2016 10:11:24 +0000 (11:11 +0100)]
nvc0: add preliminary support for images
This implements set_shader_images() and resource invalidation for
images. As OpenGL requires at least 8 images, we are going to expose
this minimum value even if this might be raised for Kepler, but this
limit is mainly for Fermi because the hardware only accepts 8 images.
Based on original patch by Ilia Mirkin.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Samuel Pitoiset [Tue, 26 Apr 2016 16:14:05 +0000 (18:14 +0200)]
gk110/ir: add emission for (a OP b) OP c
This is pretty similar to NVC0 except that offsets have changed.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "11.1 11.2" <mesa-stable@lists.freedesktop.org>
Samuel Pitoiset [Tue, 26 Apr 2016 16:12:59 +0000 (18:12 +0200)]
nvc0/ir: fix wrong emission of (a OP b) OP c
The third source must be emitted at offset 49 instead of 17 and the
not modifier is at 52 instead of 20. If you look a bit above in
emitLogicOp() you will see that the dest is emitted at 17 which
confirms that src(2) is obviously wrong.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "11.1 11.2" <mesa-stable@lists.freedesktop.org>
Jose Fonseca [Mon, 18 Apr 2016 15:55:44 +0000 (16:55 +0100)]
scons: Support Clang on Windows.
- Introduce 'gcc_compat' env flag, for all compilers that define __GNUC__,
(which includes Clang when it's not emulating MSVC.)
- Clang doesn't support whole program optimization
- Disable enumerator value warnings (not sure why Clang warns about them,
as my understanding is that MSVC promotes enums to unsigned ints
automatically.)
This is not enough to build with Clang + AddressSanitizer though. More
follow up changes will be required for that.
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Jose Fonseca [Mon, 18 Apr 2016 11:08:35 +0000 (12:08 +0100)]
gallium: Include intrin.h instead of defining ourselves.
More portable, particularly when building with Clang, which implements
all MSVC intrisincs in its own intrin.h, but doesn't actually support
`#pragma instrinsic`.
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Jose Fonseca [Mon, 18 Apr 2016 10:47:07 +0000 (11:47 +0100)]
scons: Whenever possible decide what to do based on platform and not compiler.
Because compilers like GCC and Clang are effectively available everywhere
so their presence/absence is seldom conclusive.
Furthermore, all compilers we use now have stdint.h.
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Jose Fonseca [Mon, 18 Apr 2016 10:41:11 +0000 (11:41 +0100)]
scons: Move fallback HAVE_* definitions to headers.
These were being defined in SCons, but it's not practical:
- we actually need to include Gallium headers from external source trees, with
completely disjoint build infrastructure, and it's unsustainable to
replicate the HAVE_xxx checks or even hard-coded defines across
everywhere.
- checking compiler version via command line doesn't really work due to
Clang essentially being like a cameleon which can fake either GCC or
MSVC
There's no change for autoconf.
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Juha-Pekka Heikkila [Fri, 22 Apr 2016 06:45:10 +0000 (09:45 +0300)]
nir: Add missing break into switch in construct_value()
There seemed to be missing one break in nested switchcases.
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Reviewed-by: Antia Puentes <apuentes@igalia.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Bas Nieuwenhuizen [Thu, 21 Apr 2016 18:34:04 +0000 (20:34 +0200)]
radeonsi: Fix memory leak in error path.
Signed-off-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Oded Gabbay [Tue, 26 Apr 2016 10:47:28 +0000 (13:47 +0300)]
radeonsi: fix build error because of missing param
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Cc: "11.1 11.2" <mesa-stable@lists.freedesktop.org>
Oded Gabbay [Tue, 19 Apr 2016 21:17:45 +0000 (00:17 +0300)]
r600g: use do_endian_swap in texture swapping function
For some texture formats we need to take "do_endian_swap" into account
when configuring their swizzling.
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Cc: "11.1 11.2" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Oded Gabbay [Thu, 21 Apr 2016 12:51:40 +0000 (15:51 +0300)]
r600g: use do_endian_swap in color swapping functions
For some formats we need to take "do_endian_swap" into account when
configuring swapping for color buffers.
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Cc: "11.1 11.2" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Oded Gabbay [Tue, 19 Apr 2016 13:25:23 +0000 (16:25 +0300)]
r600g: set endianess of 16/32-bit buffers according to do_endian_swap
This patch modifies r600_colorformat_endian_swap(), so for 16-bit and for
32-bit buffers, the endianess configuration will be determined not only
by the color/texture format, but also by the do_endian_swap parameter.
The only exception is for array formats, which are always set to not do
swapping, because for them gallium sets an alias based on the machine's
endianess.
v4:
V_0280A0_COLOR_16_16 and V_0280A0_COLOR_16_16_FLOAT should be set to
8IN16 because the bytes inside need to be swapped even for array formats.
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Cc: "11.1 11.2" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Oded Gabbay [Mon, 21 Mar 2016 21:46:15 +0000 (23:46 +0200)]
r600g/radeonsi: send endian info to format translation functions
Because r600 GPUs can't do swap in their DB unit, we need to disable
endianess swapping for textures that are handled by DB.
There are four format translation functions in r600g driver:
- r600_translate_texformat
- r600_colorformat_endian_swap
- r600_translate_colorformat
- r600_translate_colorswap
This patch adds a new parameters to those functions, called
"do_endian_swap". When running in a big-endian machine, the calling
functions will check whether the texture/color is handled by DB -
"rtex->is_depth && !rtex->is_flushing_texture" - and if so, they will
send FALSE through this parameter. Otherwise, they will send TRUE.
The translation functions, in specific cases, will look at this parameter
and configure the swapping accordingly.
v4:
evergreen_init_color_surface_rat() is only used by compute and don't
handle DB surfaces, so just sent hard-coded FALSE to translation
functions when called by it.
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Cc: "11.1 11.2" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Ilia Mirkin [Sun, 24 Apr 2016 17:15:59 +0000 (13:15 -0400)]
glsl: add ability to use essl 3.20
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Ilia Mirkin [Sun, 24 Apr 2016 17:24:25 +0000 (13:24 -0400)]
main: select ES3.2 version when all extensions are available
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Tue, 26 Apr 2016 00:45:00 +0000 (10:45 +1000)]
tgsi: pass a shader type to the machine create and clean up.
There was definitely bugs here mixing up the PIPE_ and TGSI_ defines,
hopefully they didn't cause any problems, since mostly it was special
cases for GEOMETRY.
This clarifies at shader machine create what type of shader this
machine will execute. This is needed also for compute shaders where
we don't want to allocate inputs/outputs.
Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Mon, 25 Apr 2016 23:42:38 +0000 (09:42 +1000)]
gallium/tgsi: move tgsi_exec.h header out of draw_context.h
It gets annoying that changing the tgsi exec rebuilds the state
tracker unnecessarily. Putting this include into draw_gs.h which
uses it causes a lot less rebuilds.
Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Roland Scheidegger [Tue, 26 Apr 2016 02:53:01 +0000 (04:53 +0200)]
gallivm: make sampling more robust against bogus coordinates
Some cases (especially these using fract for coord wrapping) did not handle
NaNs (or Infs) correctly - the following code assumed the fract result
could not be outside [0,1], but if the input is a NaN (or +-Inf) the fract
result was NaN - which then could produce out-of-bound offsets.
(Note that the explicit NaN behavior changes for min/max on x86 sse don't
result in actual changes in the generated jit code, but may on other
architectures. Found by looking through all the wrap functions.)
This fixes https://bugs.freedesktop.org/show_bug.cgi?id=94955
No piglit changes.
(v2: fix min/max typo in coord_mirror, add comment)
Cc: "11.1 11.2" <mesa-stable@lists.freedesktop.org>
Tested-by: Bruce Cherniak <bruce.cherniak@intel.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Dave Airlie [Mon, 25 Apr 2016 23:35:49 +0000 (09:35 +1000)]
radeonsi: fix missing include for Elements.
Since u_blitter.h no longer defines this.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Samuel Pitoiset [Mon, 25 Apr 2016 22:15:25 +0000 (00:15 +0200)]
nvc0: bump the amount of shared memory per MP on Maxwell
According to the CUDA compute capability version, GM10x can expose
64KB of shared memory while GM20x can use 96KB.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Dave Airlie [Mon, 25 Apr 2016 21:59:44 +0000 (07:59 +1000)]
r600: fix missing include for Elements macro
This got removed from u_blitter.h and we were taking it from
there, this should just move to ARRAY_SIZE eventually.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Samuel Pitoiset [Mon, 25 Apr 2016 20:45:17 +0000 (22:45 +0200)]
gm107/ir: s/invalid load/invalid store/
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Rob Clark [Sun, 24 Apr 2016 20:41:12 +0000 (16:41 -0400)]
freedreno/a3xx: remove unused fxn
Signed-off-by: Rob Clark <robclark@freedesktop.org>
Rob Clark [Sun, 24 Apr 2016 18:01:58 +0000 (14:01 -0400)]
freedreno/ir3: convert over to ralloc
The home-grown heap scheme (which is ultra-simple but probably not good
to always allocate and memset such a chunk of memory up front) was a
remnant of fdre (where the ir originally came from). But since we have
ralloc in mesa, lets just use that instead.
Signed-off-by: Rob Clark <robclark@freedesktop.org>
Rob Clark [Mon, 25 Apr 2016 17:16:10 +0000 (13:16 -0400)]
mesa/st: log some additional invalid-fbo cases
Signed-off-by: Rob Clark <robclark@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Rob Clark [Mon, 25 Apr 2016 15:47:21 +0000 (11:47 -0400)]
freedreno: honor handle->offset
Signed-off-by: Rob Clark <robclark@freedesktop.org>
Rob Clark [Mon, 25 Apr 2016 12:24:43 +0000 (08:24 -0400)]
freedreno: disallow cat4 immed src
Normally this would never happen (constant-propagation in NIR would
eliminate the instruction), except it does happen for 'undef' which
we turn into immed 0.0 for bookkeeping purposes.
Signed-off-by: Rob Clark <robclark@freedesktop.org>
Rob Clark [Mon, 25 Apr 2016 19:38:18 +0000 (15:38 -0400)]
freedreno/a4xx: add render-target formats
Signed-off-by: Rob Clark <robclark@freedesktop.org>
Rob Clark [Mon, 25 Apr 2016 19:36:55 +0000 (15:36 -0400)]
freedreno: update generated headers
Signed-off-by: Rob Clark <robclark@freedesktop.org>
Rob Clark [Mon, 25 Apr 2016 18:22:45 +0000 (14:22 -0400)]
freedreno: reduce line width for deqp further
See
a7eb12d0.. but that wasn't restrictive enough. Fixes
dEQP-GLES3.functional.rasterization.primitives.line_strip_wide, and
similar
Signed-off-by: Rob Clark <robclark@freedesktop.org>
Rob Clark [Sat, 23 Apr 2016 13:03:28 +0000 (09:03 -0400)]
freedreno/ir3: fix sin/cos
We seem to need range reduction to get sane results. Fixes glmark2
jellyfish bench, and a whole bunch of
dEQP-GLES3.functional.shaders.builtin_functions.precision.{sin,cos,tan}.*
v2: squashed in android build fixes from Rob Herring
Signed-off-by: Rob Clark <robclark@freedesktop.org>
Kenneth Graunke [Tue, 29 Mar 2016 08:32:52 +0000 (01:32 -0700)]
i965: Unroll SIMD16 DDY_FINE on Sandybridge.
This fixes 10 dEQP-GLES3 subtests:
dEQP-GLES3.functional.shaders.derivate.dfdy.texture.float_nicest.*.
Matt noticed that our Piglit tests for this use even numbered registers,
while the failing dEQP tests use odd numbered registers. We believe
that it works for even numbered registers, but not otherwise.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Brian Paul [Mon, 25 Apr 2016 16:13:32 +0000 (10:13 -0600)]
docs: update the instructions for getting a git account
Reviewed-by: Matt Turner <mattst88@gmail.com>
Brian Paul [Mon, 25 Apr 2016 19:28:56 +0000 (13:28 -0600)]
docs: update link to Intel's graphics website
Reviewed-by: Matt Turner <mattst88@gmail.com>
Jordan Justen [Mon, 25 Apr 2016 02:38:03 +0000 (19:38 -0700)]
mesa/gles: Allow format GL_RED to be used with MESA_FORMAT_R_UNORM
If the bound framebuffer has a format of MESA_FORMAT_R_UNORM, then
IMPLEMENTATION_COLOR_READ_FORMAT will return GL_RED. This change
applies to OpenGLES contexts where additional restrictions are placed
on the formats that are allowed to be supported.
Fixes OpenGLES 3.1 CTS tests:
* ES31-CTS.texture_border_clamp.sampling_texture.Texture2DDC16
* ES31-CTS.texture_border_clamp.sampling_texture.Texture2DDC16Linear
* ES31-CTS.texture_border_clamp.sampling_texture.Texture2DDC32F
* ES31-CTS.texture_border_clamp.sampling_texture.Texture2DDC32FLinear
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Charmaine Lee [Fri, 22 Apr 2016 23:06:32 +0000 (16:06 -0700)]
svga: eliminiate unnecessary constant buffer updates
Currently if the texture binding is changed, emit_fs_consts()
is triggered to update texture scaling factor for
rectangle texture or texture buffer size in the constant buffer.
But the update is only relevant if the texture binding includes
a rectangle texture or a texture buffer.
To eliminate the unnecessary constant buffer updates due to other texture
binding changes, a new flag SVGA_NEW_TEXTURE_CONSTS will be used
to trigger fragment shader constant buffer update when a rectangle texture
or a texture buffer is bound.
With this patch, the number of constant buffer updates in Lightsmark2008
reduces from hundreds per frame to about 28 per frame.
Reviewed-by: Brian Paul <brianp@vmware.com>
Charmaine Lee [Thu, 21 Apr 2016 15:28:26 +0000 (08:28 -0700)]
svga: mark the texture dirty for write transfer map only
Instead of unconditionally mark the texture subresource dirty at transfer map,
we'll set the dirty bit for write transfer only.
Tested with lightsmark2008 and glretrace.
Reviewed-by: Brian Paul <brianp@vmware.com>
Charmaine Lee [Wed, 20 Apr 2016 01:12:17 +0000 (18:12 -0700)]
svga: fix assert with PIPE_QUERY_OCCLUSION_PREDICATE for non-vgpu10
With this patch, when running in hardware version 11, we'll use
SVGA3D_QUERYTYPE_OCCLUSION query type for PIPE_QUERY_OCCLUSION_PREDICATE
and return TRUE if samples-passed count is greater than 0.
Fixes glretrace/solidworks2012_viewport running in hardware version 11.
Reviewed-by: Brian Paul <brianp@vmware.com>
Charmaine Lee [Fri, 15 Apr 2016 00:33:32 +0000 (17:33 -0700)]
svga: minimize surface flush
Currently, we always do a surface flush when we try to establish
a synchronized write transfer map. But if the subresource has not
been modified, we can skip the surface flush. In other words,
we only need to do a surface flush if the to-be-mapped subresource
has been modified in this command buffer.
With this patch, lightsmark2008 shows about 15% performance improvement.
Reviewed-by: Brian Paul <brianp@vmware.com>
Frederic Devernay [Mon, 25 Apr 2016 16:39:43 +0000 (10:39 -0600)]
glapi: fix _glapi_get_proc_address() for mangled function names
In the dispatch table, all functions are stored without the "m" prefix.
Modify code so that OSMesaGetProcAddress works both with gl and mgl
prefixes. Similar to
https://lists.freedesktop.org/archives/mesa-dev/2015-September/095251.html
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94994
Cc: "11.1 11.2" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Brian Paul [Mon, 25 Apr 2016 15:38:05 +0000 (09:38 -0600)]
util/blitter: use ARRAY_SIZE macro
And remove local definition of Elements() macro.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Brian Paul [Mon, 25 Apr 2016 15:34:40 +0000 (09:34 -0600)]
svga: s/Elements/ARRAY_SIZE/
Standardize on the later macro rather than a mix of both.
Reviewed-by: Charmaine Lee <charmainel@vmware.com>