Commit Graph

98002 Commits

Author SHA1 Message Date
Gert Wollny 537d04615d gallium/aux/os/os_thread.h: Silence -Wunused-param.
With --disable-debug a parameter is not used. Silence this
warning by fake-using it.

Signed-off-by: Gert Wollny <gw.fossdev@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2017-11-17 09:27:57 -07:00
Gert Wollny 4bdad3d98c gallium/aux/util/u_debug_refcnt.h: Fix -Wunused-param warnings
Annotate the according parameters accordingly.

v2: move UNUSED decoration in front of parameter declaration

Signed-off-by: Gert Wollny <gw.fossdev@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com> (v1)
2017-11-17 09:27:57 -07:00
Gert Wollny 2049c635ee gallium/aux/util/u_blit.c: Fix -Wunused-param warnings
Annotate the parameters accordingly.

v2: move UNUSED decoration in front of parameter declaration

Signed-off-by: Gert Wollny <gw.fossdev@gmail.com>
v1: Reviewed-by: Brian Paul <brianp@vmware.com> (v1)
2017-11-17 09:27:57 -07:00
Gert Wollny 0b984188f9 src/util/simple_mtx.h: Fix two -Wunused-param warnings.
Decorate the parameters accordingly with "UNUSED" or "MAYBE_UNUSED" (for
the param that is used in debug mode, but not in release mode).

v2: move UNUSED decoration in front of parameter declaration

Signed-off-by: Gert Wollny <gw.fossdev@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com> (v1)
2017-11-17 09:27:57 -07:00
Gert Wollny 811eb70a57 mesa/main/texcompress_s3tc_tmp.h: Fix two -Wparam-unused warnings.
Decorate the params accordingly with "UNUSED".

v2: move UNUSED decoration in front of parameter declaration

Signed-off-by: Gert Wollny <gw.fossdev@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com> (v1)
2017-11-17 09:27:57 -07:00
Gert Wollny 28a02eb3b8 gallium/aux/util/u_transfer.c: Fix some -Wunused-param warnings.
Decorate the params with "UNUSED" accordingly.

v2: move UNUSED decoration in front of parameter declaration

Signed-off-by: Gert Wollny <gw.fossdev@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com> (v1)
2017-11-17 09:27:57 -07:00
Gert Wollny 82e2f1ea34 gallium/aux/util/u_threaded_context.c: Fix some -Wunused-param warnings.
Decorate the params accordingly with UNUSED or MAYBE_UNUSED (for params
that are used in debug mode).

v2: move *UNUSED decoration in front of parameter declaration

Signed-off-by: Gert Wollny <gw.fossdev@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com> (v1)
2017-11-17 09:27:57 -07:00
Gert Wollny a5da06d9b7 gallium/aux/util/u_surface.c: Silence a -Wsign-compare warning.
Explicitely convert one value to compare.

Signed-off-by: Gert Wollny <gw.fossdev@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2017-11-17 09:27:57 -07:00
Gert Wollny c9fef0fa9f gallium/aux/util/u_pstipple.c: Fix one -Wsign-compare warning in ?: construct.
Silence the warning by making the conversion to int explicit.

Signed-off-by: Gert Wollny <gw.fossdev@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2017-11-17 09:27:57 -07:00
Gert Wollny 2644a80ccf gallium/aux/util/u_mm.c: Fix one -Wparam-unused warning.
Decorate the unused param accordingly with "UNUSED".

v2: move UNUSED decoration in front of parameter declaration

Signed-off-by: Gert Wollny <gw.fossdev@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com> (v1)
2017-11-17 09:27:57 -07:00
Gert Wollny 1c0d4baaf7 gallium/aux/util/u_format_yuv.c: Fix a number of -Wunused-param warnings.
Decorate the params accordingly with "UNUSED".

v2: move UNUSED decoration in front of parameter declaration

Signed-off-by: Gert Wollny <gw.fossdev@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com> (v1)
2017-11-17 09:27:57 -07:00
Gert Wollny a837a3d10d gallium/aux/util/u_format_rgtc.c: Fix a number of -Wunused-param warnings
Decorate the params accordingly with "UNUSED".

v2: move UNUSED decoration in front of parameter declaration

Signed-off-by: Gert Wollny <gw.fossdev@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com> (v1)
2017-11-17 09:27:57 -07:00
Gert Wollny a29181d3c1 gallium/aux/util/u_format_other.c: Fix various -Wunused-param warnings
Decorate the unused params with "UNUSED".

v2: move UNUSED decoration in front of parameter declaration

Signed-off-by: Gert Wollny <gw.fossdev@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com> (v1)
2017-11-17 09:27:57 -07:00
Gert Wollny 3b4bacc09f gallium/aux/util/u_format_latc.c: Fix various -Wunused-param warnings, (v2)
Decorate the unused params with "UNUSED".

v2: move UNUSED decoration in front of parameter declaration

Signed-off-by: Gert Wollny <gw.fossdev@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com> (v1)
2017-11-17 09:27:57 -07:00
Gert Wollny d744387b08 gallium/aux/util/u_format_etc.c: Fix eight -Wunused-param warnings (v2)
Decorate the parameters accordingly with "UNUSED".

v2: move UNUSED decoration in front of parameter declaration

Signed-off-by: Gert Wollny <gw.fossdev@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com> (v1)
2017-11-17 09:27:56 -07:00
Gert Wollny cf93a7fc9e gallium/aux/util/u_format.c: Fix one -Wunused-param warning
This warning was issued only in release mode. Fix it by fake-using the
parameter.

Signed-off-by: Gert Wollny <gw.fossdev@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com> (v1)
2017-11-17 09:27:56 -07:00
Gert Wollny e979ab70c2 gallium/aux/util/u_dump_state.c: Fix two -Wunused-paramter warnings
v2: move UNUSED decoration in front of parameter declaration

Signed-off-by: Gert Wollny <gw.fossdev@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com> (v1)
2017-11-17 09:27:56 -07:00
Gert Wollny 20d3e943b1 gallium/aux/util/u_dump_defines.c: Fix -Wcompare-unsigned warning
u_bit_scan may return -1 that then may be interpreted as (unsigned)-1 in
the following comparison, since num_names is unsigned. Convert the latter to
be int as well.

Signed-off-by: Gert Wollny <gw.fossdev@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2017-11-17 09:27:56 -07:00
Gert Wollny 373c263e2c gallium/aux/util/u_debug_stack.c: Silence -Wunused-result warning
asprintf is decorated with the attrbute "warn_unused_result", and if the
function call fails, the pointer "temp" will be undefined, but since it is
used later it should contain some usable value.
Test return value of asprintf and assign some save value to "temp" if
the call failed.

Signed-off-by: Gert Wollny <gw.fossdev@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com> (v1)
2017-11-17 09:27:56 -07:00
Gert Wollny 9b80c03870 gallium/aux/util/u_debug_describe.c: Silence an -Wunused-param warning
Annotate the unused parameter.

v2: move UNUSED decoration in front of parameter declaration

Signed-off-by: Gert Wollny <gw.fossdev@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com> (v1)
2017-11-17 09:27:56 -07:00
Gert Wollny ca7d5170eb gallium/aux/util/u_blitter.c: Silence some warnings
* Annotate three parameters that are not used in release mode.
* explicitely convert an int to unsigned in an ?: construct.

v2: move MAYBE_UNUSED decoration in front of parameter declaration

Signed-off-by: Gert Wollny <gw.fossdev@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com> (v1)
2017-11-17 09:27:56 -07:00
Rob Clark c267750bb1 freedreno/a5xx: stencil texturing support
Signed-off-by: Rob Clark <robdclark@gmail.com>
2017-11-17 11:19:34 -05:00
Rob Clark a39d403202 freedreno/a5xx/gmem: fix z32/s8 restore/resolve
BLIT_ZS mode is used for either combined z24/s8 or z32 in which case
BLIT_S mode is used for separate stencil.

Signed-off-by: Rob Clark <robdclark@gmail.com>
2017-11-17 11:19:34 -05:00
Rob Clark 010ebed72a freedreno/a5xx/gmem: move ZS restore tiling hack
Code motion to simplify next patch.

Signed-off-by: Rob Clark <robdclark@gmail.com>
2017-11-17 11:19:33 -05:00
Rob Clark 22605dce4b freedreno: update generated headers 2017-11-17 11:19:33 -05:00
Brian Paul 501591e852 svga: add missing PIPE_SHADER_CAP_MAX_HW_ATOMIC_COUNTER* cases
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Acked-by: Dave Airlie <airlied@redhat.com>
2017-11-16 20:35:17 -07:00
Brian Paul 92c1290dc5 glsl: s/unsigned/glsl_base_type/ in glsl type code (v2)
Declare glsl_type::sampled_type as glsl_base_type as we do for the
base_type field.  And make base_type a bitfield to save a few bytes.

Update glsl_type constructor to take glsl_base_type instead of unsigned
and pass GLSL_TYPE_VOID instead of zero.

No Piglit regressions with llvmpipe.

v2:
- Declare both base_type and sampled_type as 8-bit fields
- Use the new ASSERT_BITFIELD_SIZE() macro.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-11-16 20:35:17 -07:00
Brian Paul 940fba68c9 util/tgsi: use ASSERT_BITFIELD_SIZE() to check opcode field size
I've noticed at least two places where we store the TGSI opcode in
an unsigned:8 bitfield.  We're at 249 opcodes now.  If we hit 256 we'll
need to grow those bitfields.  Use the new ASSERT_BITFIELD_SIZE() macro
to detect that.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-11-16 20:35:17 -07:00
Brian Paul d4726b1318 st/mesa: use enum types instead of int/unsigned (v3)
Use the proper enum types for various variables.  Makes life in gdb
a little nicer.  Note that the size of enum bitfields must be one
larger so the high bit is always zero (for MSVC).

v2: also increase size of image_format bitfield, per Eric Engestrom.
v3: use the new ASSERT_BITFIELD_SIZE() macro

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-11-16 20:35:17 -07:00
Brian Paul fe81e1f975 util: add new ASSERT_BITFIELD_SIZE() macro (v3)
For checking that bitfields are large enough to hold the largest
expected value.

v2: move into existing util/macros.h header where STATIC_ASSERT() lives.
v3: add MAYBE_UNUSED to variable declaration

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2017-11-16 20:35:17 -07:00
Dave Airlie c8ce3c2689 st/mesa: don't move ssbo after atomic buffers if we support hw atomics
There is no need to have these overlap if we support hw atomics.

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-11-17 13:15:38 +10:00
Kenneth Graunke 8f91aa35a5 i965: Upload invariant state once at the start of the batch on Gen4-5.
We want to emit invariant state at the start of a render batch.  In the
past, this more or less happened: a new batch flagged BRW_NEW_CONTEXT
(because we don't have hardware contexts), which triggered the
brw_invariant_state atom.  So, it would be emitted before any 3D
drawing.  (Technically, there might be some BLT commands in the batch
because Gen4-5 have a single combined render/BLT ring, but that should
be harmless).

With the advent of BLORP, this broke.  The first item in a batch might
be a BLORP operation, which bypasses the normal draw upload path.  So,
we need to ensure invariant state happens first.  To do that, we just
upload it when creating a new batch.  On Gen6+ we'd need to worry about
whether it's a RENDER or BLT batch, but because we have a combined ring,
this approach should work fine on Gen4-5.

Seems to fix GPU hangs when playing hardware accelerated video with
mpv -hwdec=vaapi on Ironlake.

Cc: mesa-stable@lists.freedesktop.org
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103529
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2017-11-16 17:39:01 -08:00
Dave Airlie 59162c122f docs: update features/relnotes for r600 shader image support. (v2)
v2: update GLES

Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-11-17 11:31:41 +10:00
Dave Airlie 8c52ece581 r600: enable ARB_shader_image_load_store, ARB_shader_image_size
This also enables GL4.2 for gpus with hw fp64 (cayman, cypress)

Tested-By: Gert Wollny <gw.fossdev@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-11-17 11:31:41 +10:00
Dave Airlie 31db4a3200 r600: handle image size support.
This adds support for the RESQ opcode with the workaround
required due to hw bugs for buffers and cube arrays.

Tested-By: Gert Wollny <gw.fossdev@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-11-17 11:31:41 +10:00
Dave Airlie f94f5c9a9f r600/sb: disable SB for images.
Until we can work further on sb, disable it for images for now.

Tested-By: Gert Wollny <gw.fossdev@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-11-17 11:31:41 +10:00
Dave Airlie aa38bf658f r600/shader: add support for load/store/atomic ops on images.
This adds support to the shader assembler for load/store/atomic
ops on images which are handled via the RAT operations.

Tested-By: Gert Wollny <gw.fossdev@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-11-17 11:31:41 +10:00
Dave Airlie a6b3792843 r600: add core pieces of image support.
This adds the atoms and gallium api implementations,
along with support for compress/decompress paths for
shader images.

Tested-By: Gert Wollny <gw.fossdev@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-11-17 11:31:40 +10:00
Dave Airlie 5689bb0022 r600/shader: implement getting thread id.
We need the thread id to use the immediate buffer readback
mechanism, so add support for calculating it.

Tested-By: Gert Wollny <gw.fossdev@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-11-17 11:31:40 +10:00
Dave Airlie c119a1acb3 r600/shader: add flag to denote if shader uses images
Tested-By: Gert Wollny <gw.fossdev@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-11-17 11:31:40 +10:00
Dave Airlie 894e2deb7e r600: implement basic memory barrier.
This isn't 100% perfect (fglrx also fails a bunch of those tests)
but implement the start of a memory barrier for image support.

Tested-By: Gert Wollny <gw.fossdev@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-11-17 11:31:40 +10:00
Dave Airlie ac4f175d79 r600: allocate immed buffer resource for images.
In order to image readback we have to execute a MEM_RAT instruction
that needs a buffer to transfer the result into until the shader
can fetch it.

Tested-By: Gert Wollny <gw.fossdev@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-11-17 11:31:40 +10:00
Dave Airlie 77d36cbc8d r600: handle writes_memory properly
This implements proper handling for shaders with side effects.

Tested-By: Gert Wollny <gw.fossdev@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-11-17 11:31:40 +10:00
Dylan Baker d8acf79f0c autotools: change version TINY -> PATCH
Because patch is more common than tiny for talking about the 3rd element
of a version.

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Emil Velikov <emli.velikov@collabora.com>
2017-11-16 16:16:45 -08:00
Dylan Baker 65fc16c974 autotools: set XA versions in configure.ac and configure header file
Currently the versions are set in the header, and then sed is used to
extract them, so that autotools can use them elsewhere.

This is odd. Autotools is perfectly capable of configuring the header
with the versions, and then they don't need to be extracted from the
the header. This is cleaner and more obvious.

Tested with make distcheck.

v2: - Split tiny -> patch change
    - Drop temporary variables
    - change XA_VERSION_* -> XA_*
v3: - Finish splitting the tiny -> patch change

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Emil Velikov <emli.velikov@collabora.com>
Reviewed-by: Matt Turner <mattst88@gmail.com> (v2)
2017-11-16 16:16:29 -08:00
Kenneth Graunke f274687413 genxml: Fix PIPELINE_SELECT on G45/Ironlake.
Original 965 sets bits 28:27 to 0, while G45 and later set it to 1.

Note that the G45 docs are incorrect in this regard - see the DevCTG+
note in the Ironlake PRMs.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
2017-11-16 11:01:50 -08:00
Emil Velikov 9b02230466 egl: pass the dri2_dpy to the $plat_teardown functions
Cc: Mark Janes <mark.a.janes@intel.com>
Fixes: 40a01c9a0e ("egl/drm: move teardown code to the platform file")
Fixes: 8d745abc00 ("egl/wayland: move teardown code to the platform file")
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Tested-by: Dylan Baker <dylan@pnwbakers.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103784
2017-11-16 18:46:01 +00:00
Rafael Antognolli 306914db92 meson: Add dridriverdir variable to dri.pc.
Xorg (and possibly other things) depend on this variable to find the
path to DRI drivers.

Signed-off-by: Rafael Antognolli <rafael.antognolli@intel.com>
Cc: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2017-11-16 10:40:26 -08:00
Dylan Baker bc17ac5866 docs: add documentation for building with meson
v2: - Add information about CC, CXX, CFLAGS, and CXXFLAGS (Nicolai)
    - Add message at top that meson for mesa is still a work in progress
    - Add trailing "/" to directories (Eric E.)
    - Fix a number of spelling/grammar/style suggestions from Eric E.
    - Make a number of changes as suggested by Emil.
v3: - Fix order of commands in example (Eric E.)
    - Add documentation for overriding LLVM version (Eric E.)
v4: - Rebase on master
    - update default buildtype
    - add note about b_ndebug
    - Clarify meson configure a bit
v5: - use <code> for command line arguments (Eric E.)
    - Add note about listing options without a build directory
    - Minor formatting changes (Eric E.)
    - Replace the CC, CFLAGS, etc section with an environment variables
      section, which mentions CC, CXX, CFLAGS, CXXFLAGS, LDFLAGS, and
      DESTDIR
    - Add comment that not using buildtype debug might make debugging
      harder
    - Add comment that b_ndebug and buildtype are orthogonal

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch> (v3)
2017-11-16 09:48:09 -08:00
Kai Wasserbäch d25123e23a docs: Point to apt.llvm.org for development snapshot packages
Signed-off-by: Kai Wasserbäch <kai@dev.carbon-project.org>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-11-16 16:21:09 +00:00