Commit Graph

84740 Commits

Author SHA1 Message Date
Haixia Shi b1d636aa00 egl/android: Set EGL_MAX_PBUFFER_WIDTH and EGL_MAX_PBUFFER_HEIGHT
Set config attributes EGL_MAX_PBUFFER_WIDTH and EGL_MAX_PBUFFER_HEIGHT to
hard-coded non-zero values. These two attributes are required on Android.

v2: use _EGL_MAX_PBUFFER_WIDTH/HEIGHT from egldefines.h
    (based on discussion on the first version)

Signed-off-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2016-09-09 07:51:04 +03:00
Tapani Pälli 478fbc2348 android: depend on libmesa_genxml from i965 Android.gen.mk
Static library dependency is required to pull the generated
XML headers into the generated C file.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2016-09-09 07:51:04 +03:00
Tapani Pälli 4542c7ed5f i965: release GLSL IR in LinkShader after it's not needed
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
2016-09-09 07:51:04 +03:00
Tapani Pälli 2cd02e30d2 glsl: use hash instead of exec_list in copy propagation
This change makes copy propagation pass faster. Complete link time
spent in test case attached to bug 94477 goes down to ~400 secs from
over 500 secs on my HSW machine. Does not fix the actual issue but
brings down the total. No regressions seen in CI.

v2: do not leak hash_table structure

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2016-09-09 07:50:42 +03:00
Jason Ekstrand 175ac629be i965/fs: Fail the shader compile instead of asserting when we can't spill
Blorp doesn't handle spilling so we set allow_spilling to false in that
case.  The blorp 16x MSAA resolve shader spills in 16-wide but not 8-wide.
This commit makes it so that we fail the 16-wide compile and successfully
fall back to 8-wide instead of just assert-failing when trying to compile
the 16-wide shader.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
2016-09-08 20:53:01 -07:00
Jason Ekstrand 88a2a2e053 nir/gcm: Add global value numbering support
Unlike the current CSE pass, global value numbering is capable of detecting
common values even if one does not dominate the other.  For instance, in
you have

if (...) {
   ssa_1 = ssa_0 + 7;
   /* use ssa_1 */
} else {
   ssa_2 = ssa_0 + 7;
   /* use ssa_2 */
}

Global value numbering doesn't care about dominance relationships so it
figures out that ssa_1 and ssa_2 are the same and converts this to

if (...) {
   ssa_1 = ssa_0 + 7;
   /* use ssa_1 */
} else {
   /* use ssa_1 */
}

Obviously, we just broke SSA form which is bad.  Global code motion,
however, will repair this for us by turning this into

ssa_1 = ssa_0 + 7;
if (...) {
   /* use ssa_1 */
} else {
   /* use ssa_1 */
}

This intended to eventually mostly replace CSE.  However, conventional CSE
may still be useful because it's less of a scorched-earth approach and
doesn't require GCM.  This makes it a bit more appropriate for use as a
clean-up in a late optimization run.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-09-08 20:53:01 -07:00
Jason Ekstrand 99ff4b3eb2 nir/gcm: Call nir_metadata_preserve
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-09-08 20:53:01 -07:00
Max Staudt 02675622b0 r300g: Set R300_VAP_CNTL on RSxxx to avoid triangle flickering
On the RSxxx chip series, HW TCL is missing and r300_emit_vs_state()
is never called.

However, if R300_VAP_CNTL is never set, the hardware (at least the
RS690 I tested this on) comes up with rendering artifacts, and
parts that are uploaded before this "fix" remain broken in VRAM.
This causes artifacts as in fdo#69076 ("triangle flickering").

It seems like this setup needs to happen at least once after power on
for 3D rendering to work properly. In the DDX with EXA, this happens in
RADEON_SWITCH_TO_3D() when processing an XRENDER Composite or an
Xv request. So playing back a video or starting a GTK+2 application
fixes 3D rendering for the rest of the session. However, this auto-fix
doesn't happen when EXA is not used, such as with GLAMOR or Wayland.

This patch ensures the register is configured even in absence of
the DDX's EXA module.

The register setting is taken from:
  xf86-video-ati  --  RADEONInit3DEngineInternal()
  mesa/src/mesa/drivers/dri/r300  --  r300EmitClearState()

Tested on RS690.

CC: <mesa-stable@lists.freedesktop.org>
Signed-off-by: Max Staudt <mstaudt@suse.de>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-09-09 13:30:47 +10:00
Marek Olšák 5981ab5445 gallium: remove PIPE_BIND_TRANSFER_READ/WRITE
not used in any useful way

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2016-09-08 22:51:33 +02:00
Marek Olšák 0fbaf74977 radeonsi: unify si_set_optimal_micro_tile_mode call sites
There is nothing special happening in those code blocks.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2016-09-08 22:51:33 +02:00
Marek Olšák 758bc52959 radeonsi: fix texture reinterpretation after DCC fast clear
The problem is that TC-compatible DCC clear codes translate
into different clear values when you change the format.

I have a new piglit reproducing the issue.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2016-09-08 22:51:33 +02:00
Marek Olšák 46c425e7c8 radeonsi: enable DCC fast clear for 128-bit formats
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2016-09-08 22:51:33 +02:00
Marek Olšák 831c0c80f1 radeonsi: clamp integer clear color values for DCC fast clear
It should be possible to get TC-compatible fast clear more often now.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2016-09-08 22:51:33 +02:00
Marek Olšák 93f3d8e10d Revert "radeonsi: enable SDMA on CIK"
This reverts commit 0241d8300f.

It doesn't work with mobile Bonaire. It looks like the programming of
tiling parameters is wrong on some chips.
2016-09-08 22:51:33 +02:00
Christoph Haag 7b414bc512 doc: fix typo of GALLIUM_HUD_TOGGLE_SIGNAL
In the original commit message in 56a1c10 it was wrongly used too:
- env GALLIUM_HUD_SIGNAL_TOGGLE: toggle visibility via signal

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2016-09-08 20:19:35 +02:00
Jason Ekstrand a00bd7bc27 nir/spirv: Refactor variable deocration handling
Previously, we dind't apply variable decorations to the members of a split
structure variable.  This doesn't quite work, unfortunately, because things
such as the "flat" qualifier may get applied to an entire structure instead
of propagated to the members.  This fixes 9 of the new CTS tests in the
dEQP-VK.glsl.linkage.varying.struct.* group.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Cc: "12.0" <mesa-stable@lists.freedesktop.org>
2016-09-08 10:45:23 -07:00
Jason Ekstrand f5505730d3 nir/spirv: Break variable decoration handling into a helper
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Cc: "12.0" <mesa-stable@lists.freedesktop.org>
2016-09-08 10:45:23 -07:00
Jonathan Gray d50c56f868 aubinator: only use program_invocation_short_name with glibc/cygwin
program_invocation_short_name is a gnu extension.  Limit use of it
to glibc and cygwin and otherwise use getprogname() which is available
on BSD and OS X.

Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2016-09-08 18:37:02 +01:00
Jonathan Gray 2d3ebb474c aubinator: include libgen.h for basename(3)
Include libgen.h for basename as required by posix.
The definition is not found on at least OpenBSD otherwise.

Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2016-09-08 18:37:02 +01:00
Jonathan Gray 0ba9e281fc aubinator: stop using non portable error() function
error() is a gnu extension and is not present on OpenBSD
and likely other systems.

Convert use of error to fprintf/strerror/exit.

Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2016-09-08 18:37:02 +01:00
Adam Jackson dbda375d6f egl: Fix up indentation on previous commit
This was requested in review but I pushed the wrong version.

Signed-off-by: Adam Jackson <ajax@redhat.com>
2016-09-08 13:21:27 -04:00
Adam Jackson a279760536 egl: Document why EGL_OPENGL{, _ES}_API are mostly identical
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
2016-09-08 13:19:58 -04:00
Chad Versace bad80c26e7 anv: Link to libX11-xcb only when unneeded
The Makefile unconditionally linked libX11-xcb into libvulkan_intel.so.
But it's needed only if HAVE_PLATFORM_X11.

Fixes build of libvulkan_intel.so on Chromium OS, which has no X11
libraries.

Fixes: 71258e9462 ("anv/x11: Add support for Xlib platform")
Cc: Kevin Strasser <kevin.strasser@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2016-09-08 09:24:30 -07:00
Tim Rowley 7514e326f8 swr: fixes for format mapping and texture sizing
Signed-off-by: Tim Rowley <timothy.o.rowley@intel.com>
2016-09-08 10:43:21 -05:00
Topi Pohjolainen b863f4a39a intel/blorp: Allow single slice converter to suppress number of layers
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2016-09-08 08:53:45 +03:00
Lionel Landwerlin 0ad84b4366 spirv/nir: Implement OpAtomicLoad/Store for shared variables
Missing bits from 2afb950161.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2016-09-07 17:37:37 +01:00
Jason Ekstrand 37763bf446 nir/spirv: Remove an erroneous "fall through" comment 2016-09-07 09:04:34 -07:00
Kyle Brenneman 6e066f76ee EGL: Combine the GL and GLES current contexts (v2)
Only keep track of a single current context, instead of separate
contexts for GL and GLES.

In EGL 1.4 (and 1.5), EGL_OPENGL_API and EGL_OPENGL_ES_API are supposed
to be interchangeable for all purposes except for eglCreateContext.

The _EGLThreadInfo::CurrentContexts array is now a single pointer to the
current context, which may be a GL or GLES context. In addition, it now
keeps track of the current API as an enum instead of an index.

eglMakeCurrent will now replace the current context, regardless of which
client API is used for for the current and new contexts. It no longer
checks for a conflicting context. In addition, calling eglMakeCurrent
with EGL_NO_CONTEXT will now release the current context regardless of
the current API.

v2: Rebased against master (Adam Jackson)

Reviewed-by: Adam Jackson <ajax@redhat.com>
2016-09-07 11:56:48 -04:00
Rob Clark 74b1969d71 gbm: wire up fence extension
v2: make fence extension optional to not break non-i965 classic
    drivers, and move __DRI2_FENCE into core extensions, based
    on comments from Emil

Signed-off-by: Rob Clark <robdclark@gmail.com>
2016-09-07 11:54:00 -04:00
Rob Clark 32c061b110 freedreno: reject imports with bogus pitch
Signed-off-by: Rob Clark <robdclark@gmail.com>
2016-09-07 11:41:38 -04:00
Rob Clark b4e88b500c gbm: add missing R8 and GR88 formats
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Signed-off-by: Rob Clark <robdclark@gmail.com>
2016-09-07 11:30:41 -04:00
Lionel Landwerlin 2afb950161 spirv/nir: Add support for OpAtomicLoad/Store
Fixes new CTS tests :

dEQP-VK.spirv_assembly.instruction.compute.opatomic.load
dEQP-VK.spirv_assembly.instruction.compute.opatomic.store

v2: don't handle images like ssbo/ubo (Jason)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2016-09-07 11:00:30 +01:00
Marek Olšák fe40a65fb6 radeonsi: skip redundant INDEX_TYPE writes
Ported from Vulkan.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2016-09-07 11:13:13 +02:00
Marek Olšák bdf767dac4 radeonsi: add more unlikely() uses into si_draw_vbo
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2016-09-07 11:13:13 +02:00
Marek Olšák a8e7ea6abc radeonsi: skip draws with instance_count == 0
loosely ported from Vulkan

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2016-09-07 11:13:13 +02:00
Marek Olšák 53d74e055e gallium/radeon/winsyses: fix counting mapped memory
Not all buffers are unmapped explicitly.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2016-09-07 11:13:13 +02:00
Ilia Mirkin 8c8874eafb nir: fix definition of pack_uvec2_to_uint
Found by inspection. Untested beyond compilation. This also matches the
logic used in nir_lower_alu_to_scalar.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Cc: mesa-stable@lists.freedesktop.org
2016-09-06 22:45:44 -04:00
Ilia Mirkin c42acd93d4 mesa/formatquery: limit ES target support, fix core context support
First off, as late as ES 3.2, GetInternalformat only supports
RENDERBUFFER and 2DMS(_ARRAY) targets.

Secondly, the _mesa_has_ext helpers are very accurate... a little too
accurate, some might say. If we only show an extension in compat
profiles because core profiles have the functionality guaranteed, they
will return false. Fix these to either check for a core profile
explicitly, or to a different-but-identical extension available in core
profile.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Matteo Bruni <matteo.mystral@gmail.com>
Tested-by: Matteo Bruni <matteo.mystral@gmail.com>
Cc: mesa-stable@lists.freedesktop.org
2016-09-06 22:45:44 -04:00
Ilia Mirkin f654b4983a mapi: add gl32.h to the list of GLES3 headers for installation
This was missed when I added the updated (and new) Khronos headers.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Mark Janes <mark.a.janes@intel.com>
Tested-by: Mark Janes <mark.a.janes@intel.com>
2016-09-06 22:45:44 -04:00
Ilia Mirkin 36347c8d6f main: GL_RGB10_A2UI does not come with GL 3.0/EXT_texture_integer
Add a separate extension check for that format. Prevents glTexImage from
trying to find a matching format, which fails on drivers without support
for this format.

Fixes: sized-texture-format-channels (on a3xx)
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Cc: mesa-stable@lists.freedesktop.org
2016-09-06 22:41:48 -04:00
Jason Ekstrand 2b18a3f5d3 nir/spirv: Use fill_common_atomic_sources for image atomics
We had two almost identical copies of this code and they were both broken
but in different ways.  The previous two commits fixed both of them.  This
one just unifies them so that it's easier to handle in the future.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
2016-09-06 17:08:13 -07:00
Jason Ekstrand f2a10937d8 nir/spirv: Use the correct sources for CompareExchange on images
The CompareExchange operation has two "Memory Semantics" parameters instead
of one so the real arguments start at w[7] instead of w[6].

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Cc: "12.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Dave Airlie <airlied@redhat.com>
2016-09-06 17:08:13 -07:00
Jason Ekstrand 0ead7bef6b nir/spirv: Swap the argument order for AtomicCompareExchange
SPIR-V has the two arguments in the opposite order from GLSL.  NIR uses the
GLSL order so we had them backwards.

Fixes dEQP-VK.spirv_assembly.instruction.compute.opatomic.compex

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Cc: "12.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Dave Airlie <airlied@redhat.com>
2016-09-06 17:08:13 -07:00
Tim Rowley edd688d986 vbo: increase VBO_SAVE_BUFFER_SIZE from 8k to 256k dwords
Increases the performance of legacy geometry-heavy apps
still using display lists.

Performance increase for a targeted testcase is on the
order of 8x, and applications like ParaView 4.x (5.x uses
no longer used display lists) improve by about 10%-20%.

Reviewed-by: Mathias Fröhlich <mathias.froehlich@web.de>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-09-06 15:15:11 -05:00
Vinson Lee 215075ae30 glsl: Add positional argument specifiers.
Fix build with Python < 2.7.

  File "./glsl/ir_expression_operation.py", line 360, in get_enum_name
    return "ir_{}op_{}".format(("un", "bin", "tri", "quad")[self.num_operands-1], self.name)
ValueError: zero length field name in format

Fixes: e31c72a331 ("glsl: Convert tuple into a class")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
2016-09-06 12:03:30 -07:00
Roland Scheidegger 31a380c8dd util: (trivial) add <stdint.h> include to slab.c
should fix "src/util/slab.c:57:13: error: ‘uint8_t’ undeclared"
2016-09-06 19:47:14 +02:00
Jason Ekstrand 92162dbe32 glsl: Add .gitignore for make check warnings test 2016-09-06 08:32:19 -07:00
Jason Ekstrand 20b2f1ecb9 anv/pipeline: Lower indirect outputs when EmitNoIndirectOutput is set
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reported-by: Timothy Arceri <timothy.arceri@collabora.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-09-06 08:27:23 -07:00
Rob Herring 244f0aba16 Android: glsl: add rules to generate ir_expression*.h header files
Recent changes to generate ir_expression*.h header files broke Android
builds. This adds the generation rules. This change is complicated due to
creating a circular dependency between libmesa_glsl, libmesa_nir, and
libmesa_compiler. Normally, we add static libraries so that include paths
are added even if there's no linking dependency. That is the case here.
Instead, we explicitly add the include path using $(MESA_GEN_GLSL_H) to
libmesa_compiler. This in turn requires shuffling the order of make
includes. It also uncovered missing dependency tracking of glsl_parser.h.

Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2016-09-06 15:58:55 +01:00
Leo Liu 2593354643 st/omx/dec: enable hevc omx decode support
Signed-off-by: Leo Liu <leo.liu@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
2016-09-06 10:08:01 -04:00