mesa.git
7 years agoradeonsi: fix ARB_transform_feedback_overflow_query on <= VI
Nicolai Hähnle [Fri, 25 Aug 2017 14:19:56 +0000 (16:19 +0200)]
radeonsi: fix ARB_transform_feedback_overflow_query on <= VI

The result written by the shader workaround needs to be written back, or
the CP may read stale data.

Fixes: 78476cfe071a ("radeonsi: enable ARB_transform_feedback_overflow_query")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
7 years agoradeonsi: fix compute shader state dumping
Nicolai Hähnle [Fri, 25 Aug 2017 14:08:50 +0000 (16:08 +0200)]
radeonsi: fix compute shader state dumping

Fixes: 420c438589c8 ("radeonsi: log draw and compute state into log context")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
7 years agoradeonsi: add an assertion that only two-dimensional constant references are used
Nicolai Hähnle [Wed, 23 Aug 2017 16:14:32 +0000 (18:14 +0200)]
radeonsi: add an assertion that only two-dimensional constant references are used

v2: remove some redundant checks

Acked-by: Roland Scheidegger <sroland@vmware.com> (v1)
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de> (v1)
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
7 years agogallium/radeon: always use two-dimensional constant references
Nicolai Hähnle [Wed, 23 Aug 2017 16:13:57 +0000 (18:13 +0200)]
gallium/radeon: always use two-dimensional constant references

Acked-by: Roland Scheidegger <sroland@vmware.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
7 years agogallium/tests: always use two-dimensional constant references
Nicolai Hähnle [Wed, 23 Aug 2017 16:13:40 +0000 (18:13 +0200)]
gallium/tests: always use two-dimensional constant references

Acked-by: Roland Scheidegger <sroland@vmware.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
7 years agopp: always use two-dimensional constant references
Nicolai Hähnle [Wed, 23 Aug 2017 16:13:30 +0000 (18:13 +0200)]
pp: always use two-dimensional constant references

Acked-by: Roland Scheidegger <sroland@vmware.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
7 years agogallium/hud: always use two-dimensional constant references
Nicolai Hähnle [Wed, 23 Aug 2017 16:13:15 +0000 (18:13 +0200)]
gallium/hud: always use two-dimensional constant references

Acked-by: Roland Scheidegger <sroland@vmware.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
7 years agonine: always generate two-dimensional constant file accesses
Nicolai Hähnle [Wed, 23 Aug 2017 16:04:05 +0000 (18:04 +0200)]
nine: always generate two-dimensional constant file accesses

Acked-by: Roland Scheidegger <sroland@vmware.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
7 years agost/glsl_to_tgsi: inline src_register into translate_src
Nicolai Hähnle [Wed, 23 Aug 2017 16:07:58 +0000 (18:07 +0200)]
st/glsl_to_tgsi: inline src_register into translate_src

src_register has no meaningful standalone use, it only makes sense when
called from translate_src.

v2: fix input array handling

Acked-by: Roland Scheidegger <sroland@vmware.com> (v1)
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
7 years agost/glsl_to_tgsi: ir_load_ubo always has a second index
Nicolai Hähnle [Wed, 23 Aug 2017 15:09:09 +0000 (17:09 +0200)]
st/glsl_to_tgsi: ir_load_ubo always has a second index

Acked-by: Roland Scheidegger <sroland@vmware.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
7 years agost/drawpixels: always use two-dimensional constant references
Nicolai Hähnle [Sat, 26 Aug 2017 22:42:11 +0000 (00:42 +0200)]
st/drawpixels: always use two-dimensional constant references

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
7 years agotgsi/build: always generate two-dimensional constant file accesses
Nicolai Hähnle [Sat, 26 Aug 2017 22:42:53 +0000 (00:42 +0200)]
tgsi/build: always generate two-dimensional constant file accesses

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
7 years agotgsi/ureg: always emit constants (and their decls) as 2D
Nicolai Hähnle [Wed, 23 Aug 2017 15:48:27 +0000 (17:48 +0200)]
tgsi/ureg: always emit constants (and their decls) as 2D

Acked-by: Roland Scheidegger <sroland@vmware.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
7 years agogallium: all drivers should accept two-dimensional constant buffer indexing
Nicolai Hähnle [Wed, 23 Aug 2017 15:41:27 +0000 (17:41 +0200)]
gallium: all drivers should accept two-dimensional constant buffer indexing

Most older drivers seem to just ignore the Dimension setting, so virtually
no changes should be needed.

Acked-by: Roland Scheidegger <sroland@vmware.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
7 years agoanv: fix off by one in array check
Eric Engestrom [Sun, 3 Sep 2017 18:22:06 +0000 (19:22 +0100)]
anv: fix off by one in array check

`anv_formats[ARRAY_SIZE(anv_formats)]` is already one too far.
Spotted by Coverity.

CovID: 1417259
Fixes: 242211933a0682696170 "anv/formats: Nicely handle unknown VkFormat enums"
Cc: Jason Ekstrand <jason.ekstrand@intel.com>
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
7 years agoac: reorg ac_shader_binary struct to take less space.
Dave Airlie [Sun, 3 Sep 2017 08:57:49 +0000 (18:57 +1000)]
ac: reorg ac_shader_binary struct to take less space.

This reduces the size from 96 to 80 bytes but putting all the
32-bit sizes at the start.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Signed-off-by: Dave Airlie <airlied@redhat.com>
7 years agoradv: drop emit2d_dst_type.
Dave Airlie [Sun, 3 Sep 2017 08:37:38 +0000 (18:37 +1000)]
radv: drop emit2d_dst_type.

This is completely unused now.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuien.nl>
Signed-off-by: Dave Airlie <airlied@redhat.com>
7 years agoradv/meta: missing initialisations in create_pass().
Xavier Bouchoux [Thu, 31 Aug 2017 08:12:52 +0000 (10:12 +0200)]
radv/meta: missing initialisations in create_pass().

Otherwise radv_cmd_state_setup_attachments() will complain it has no clearvalues,
when called via radv_process_depth_image_inplace().

v2: use LOAD/STORE instead of DONT_CARE, to preserve stencil values.

Signed-off-by: Xavier Bouchoux <xavierb@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
7 years agoradv: Enable command buffer chaining by default.
Bas Nieuwenhuizen [Sat, 2 Sep 2017 19:47:11 +0000 (21:47 +0200)]
radv: Enable command buffer chaining by default.

For approx 5-10% performance improvement in dota2.

Reviewed-by: Dave Airlie <airlied@redhat.com>
7 years agoradv: Put semaphore waits in preamble cs.
Bas Nieuwenhuizen [Sat, 2 Sep 2017 10:59:55 +0000 (12:59 +0200)]
radv: Put semaphore waits in preamble cs.

The separate flush cs gets in the way of batchchain.

Reviewed-by: Dave Airlie <airlied@redhat.com>
7 years agoradv: Actually set the cmd_buffer usage_flags.
Bas Nieuwenhuizen [Sun, 3 Sep 2017 21:35:37 +0000 (23:35 +0200)]
radv: Actually set the cmd_buffer usage_flags.

Otherwise, the simultaneous uage bit doesn't get set from the begin
info, which we need for batchchaining.

Fixes: f4e499ec791 "radv: add initial non-conformant radv vulkan driver"
Reviewed-by: Dave Airlie <airlied@redhat.com>
7 years agoutil: improve compiler guard
Eric Engestrom [Thu, 31 Aug 2017 16:55:56 +0000 (16:55 +0000)]
util: improve compiler guard

Glibc 2.26 has dropped xlocale.h, but the functions needed (strtod_l()
and strdof_l()) can be found in stdlib.h.
Improve the detection method to allow newer builds to still make use of
the locale-setting.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102454
Cc: Laurent Carlier <lordheavym@gmail.com>
Cc: Emil Velikov <emil.l.velikov@gmail.com>
Cc: Rob Herring <robh@kernel.org>
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Laurent Carlier <lordheavym@gmail.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
7 years agoradeon/uvd: add Define Restart Interval to MJPEG bitstream reconstruction
Leo Liu [Fri, 25 Aug 2017 17:17:41 +0000 (13:17 -0400)]
radeon/uvd: add Define Restart Interval to MJPEG bitstream reconstruction

It adds the capacity to decode MJPEG stream with DRI marker

Signed-off-by: Leo Liu <leo.liu@amd.com>
7 years agoradeon/uvd: fix MJPEG quantization table index
Leo Liu [Fri, 25 Aug 2017 17:17:40 +0000 (13:17 -0400)]
radeon/uvd: fix MJPEG quantization table index

Fixes: 130d1f456b8 ("radeon/uvd: reconstruct MJPEG bitstream")
Signed-off-by: Leo Liu <leo.liu@amd.com>
7 years agost/mesa: fix view template initialization in try_pbo_readpixels
Roland Scheidegger [Thu, 31 Aug 2017 23:48:42 +0000 (01:48 +0200)]
st/mesa: fix view template initialization in try_pbo_readpixels

I think this is what the code was meant to do, albeit as far as I can tell
the redundant initialization some analyzers complain about should work as
well just fine (only the first layer will be used, if the view contains one
or more layers doesn't really matter).

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102467
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Cc: mesa-stable@lists.freedesktop.org
7 years agogenxml: Make Border Color Pointer an address on Gen4-5, not an offset.
Kenneth Graunke [Thu, 31 Aug 2017 22:45:57 +0000 (15:45 -0700)]
genxml: Make Border Color Pointer an address on Gen4-5, not an offset.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
7 years agoi965: Inline emit_reloc in __genx_combine_address
Kenneth Graunke [Thu, 31 Aug 2017 20:12:44 +0000 (13:12 -0700)]
i965: Inline emit_reloc in __genx_combine_address

One less layer of baklava.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
7 years agoi965: Fix crash in fallback GTT mapping.
Kenneth Graunke [Fri, 1 Sep 2017 06:54:20 +0000 (23:54 -0700)]
i965: Fix crash in fallback GTT mapping.

We can't perf_debug without a context.

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
7 years agoi965: Fix state flagging of Gen6 SOL programs.
Kenneth Graunke [Tue, 22 Aug 2017 22:12:55 +0000 (15:12 -0700)]
i965: Fix state flagging of Gen6 SOL programs.

It doesn't seem like the old code could possibly work.

1. brw_gs_state_dirty made us bail unless one of these flags were set:
   _NEW_TEXTURE, BRW_NEW_GEOMETRY_PROGRAM, BRW_NEW_TRANSFORM_FEEDBACK
2. If there was no geometry program, we called brw_upload_ff_gs_prog()3
3. That checked brw_ff_gs_state_dirty and bailed unless these were set:
   _NEW_LIGHT, BRW_NEW_PRIMITIVE, BRW_NEW_TRANSFORM_FEEDBACK,
   BRW_NEW_VS_PROG_DATA.
4. brw_ff_gs_prog_key pv_first and attr fields were set based on data
   depending on _NEW_LIGHT and BRW_NEW_VS_PROG_DATA.

This means that if we needed a FF GS program, and changed the VS
outputs or provoking vertex mode, we'd fail to notice that we needed
to emit a new program.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
7 years agoi965: Drop useless gen6_brw_upload_ff_gs_prog() wrapper.
Kenneth Graunke [Tue, 22 Aug 2017 22:18:32 +0000 (15:18 -0700)]
i965: Drop useless gen6_brw_upload_ff_gs_prog() wrapper.

gen6...brw?  Drop some baklava layers.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
7 years agofreedreno: skip batch-cache for compute shaders
Rob Clark [Sat, 26 Aug 2017 15:55:05 +0000 (11:55 -0400)]
freedreno: skip batch-cache for compute shaders

It is kind of pointless for compute, and avoids issues with apps kicking
off more than 32 compute shaders at once.

Signed-off-by: Rob Clark <robdclark@gmail.com>
Cc: "17.2" <mesa-stable@lists.freedesktop.org>
7 years agom4: Use older autoconf 2.63 compatible ax_check_compile_flag.
Vinson Lee [Thu, 31 Aug 2017 22:38:57 +0000 (15:38 -0700)]
m4: Use older autoconf 2.63 compatible ax_check_compile_flag.

CentOS 6 and RHEL 6 have autoconf 2.63.

Fixes: e4b2b69e828c ("configure: Add and use AX_CHECK_COMPILE_FLAG")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
7 years agoi965: Move BATCH_SZ define into intel_batchbuffer.c.
Kenneth Graunke [Wed, 30 Aug 2017 08:16:23 +0000 (01:16 -0700)]
i965: Move BATCH_SZ define into intel_batchbuffer.c.

It's only used in one file.

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
7 years agoi965: Drop batch_size argument from brw_bufmgr_init().
Kenneth Graunke [Wed, 30 Aug 2017 08:13:38 +0000 (01:13 -0700)]
i965: Drop batch_size argument from brw_bufmgr_init().

This is dead code and hasn't been used in a long time.

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
7 years agoi965: Rename brw_bo::offset64 to gtt_offset.
Chris Wilson [Wed, 30 Aug 2017 07:02:10 +0000 (00:02 -0700)]
i965: Rename brw_bo::offset64 to gtt_offset.

We can drop the meaningless "64" suffix - libdrm_intel originally had
an "offset" field that was an "unsigned long" which was the wrong size,
and we couldn't remove/alter that field without breaking ABI, so we had
to add a uint64_t "offset64" field.

"gtt_offset" is also more descriptive than "offset".

(Patch originally written by Ken, but Chris suggested a better name and
supplied the giant comment making up the bulk of the patch, so I changed
the authorship to him.)

Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
7 years agoi965: Drop the BRW_BATCH_STRUCT macro.
Kenneth Graunke [Wed, 30 Aug 2017 08:43:34 +0000 (01:43 -0700)]
i965: Drop the BRW_BATCH_STRUCT macro.

It's used in exactly one place these days, and not much simpler than
just calling intel_batchbuffer_data directly.

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
7 years agoi965: Don't double count the batch in aperture_space.
Kenneth Graunke [Wed, 30 Aug 2017 08:02:30 +0000 (01:02 -0700)]
i965: Don't double count the batch in aperture_space.

intel_batchbuffer_reset calls add_exec_bo on the batch right away,
which adds in the batch BO size.

Fixes: 29ba502a4e28 ("i965: Use I915_EXEC_BATCH_FIRST when available.")
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
7 years agoswr: Report format max_samples=1 to maintain support for "fake" msaa.
Cherniak, Bruce [Fri, 25 Aug 2017 19:59:13 +0000 (14:59 -0500)]
swr: Report format max_samples=1 to maintain support for "fake" msaa.

Accompanying patch "st/mesa: only try to create 1x msaa surfaces for
'fake' msaa" requires driver to report max_samples=1 to enable "fake"
msaa. Previously, 0 and 1 were treated equivalently in st_init_extensions()
and either could enable "fake" msaa.

This patch raises the swr default msaa_max_count from 0 to 1, so that
swr_is_format_supported will report max_samples=1.

Real msaa can still be enabled by exporting SWR_MSAA_MAX_COUNT with a
pow2 value between 2 and 16.

This patch is necessary to prevent an OpenSWR regression resulting from
the st/mesa patch.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102038
Acked-by: Brian Paul <brianp@vmware.com>
Reviewed-By: George Kyriazis <george.kyriazis@intel.com>
7 years agoaubinator: remove duplicate initialisation
Eric Engestrom [Fri, 1 Sep 2017 15:55:55 +0000 (16:55 +0100)]
aubinator: remove duplicate initialisation

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
7 years agoradv: report VM faults if detected
Samuel Pitoiset [Thu, 31 Aug 2017 09:44:00 +0000 (11:44 +0200)]
radv: report VM faults if detected

It's fairly simple for now, but this might be quite useful.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
7 years agoradeonsi: move si_vm_fault_occured() to AMD common code
Samuel Pitoiset [Thu, 31 Aug 2017 09:43:59 +0000 (11:43 +0200)]
radeonsi: move si_vm_fault_occured() to AMD common code

For radv, in order to report VM faults when detected.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
7 years agoradv: add radv_check_gpu_hangs() helper function
Samuel Pitoiset [Fri, 1 Sep 2017 07:44:45 +0000 (09:44 +0200)]
radv: add radv_check_gpu_hangs() helper function

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
7 years agoradv: disassemble SPIR-V binaries with RADV_DEBUG=spirv
Samuel Pitoiset [Wed, 30 Aug 2017 13:12:21 +0000 (15:12 +0200)]
radv: disassemble SPIR-V binaries with RADV_DEBUG=spirv

This introduces a new separate option because the output can
be quite verbose. If spirv-dis is not found in the path, this
debug option is useless.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
7 years agoradv: move RADV_TRACE_FILE functions to radv_debug.c
Samuel Pitoiset [Wed, 30 Aug 2017 13:12:20 +0000 (15:12 +0200)]
radv: move RADV_TRACE_FILE functions to radv_debug.c

At the moment, debugging radv is not really easy because the
driver doesn't report enough information when it hangs. This
new file will be the main location for all debug tools.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
7 years agoradv: silent a compiler warning in radv_emit_framebuffer_state()
Samuel Pitoiset [Mon, 28 Aug 2017 10:17:11 +0000 (12:17 +0200)]
radv: silent a compiler warning in radv_emit_framebuffer_state()

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
7 years agoradv: compute correct maximum wave count per SIMD
Samuel Pitoiset [Wed, 30 Aug 2017 13:12:03 +0000 (15:12 +0200)]
radv: compute correct maximum wave count per SIMD

Ported from RadeonSI (original patch by Marek).

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
7 years agost/mesa: only try to create 1x msaa surfaces for "fake" msaa drivers
Brian Paul [Tue, 22 Aug 2017 02:53:25 +0000 (20:53 -0600)]
st/mesa: only try to create 1x msaa surfaces for "fake" msaa drivers

For software drivers where we want "fake" msaa support for GL 3.x, we
treat 1 sample as being msaa.

For drivers with real msaa support, start format probing at 2x msaa.
For drivers with fake msaa support, start format probing at 1x msaa.

This also tweaks the MaxSamples code in st_init_extensions() so that
we use MaxSamples=1 for fake msaa.  This allows the format proble loops
to run at least one iteration.

This fixes a llvmpipe/VTK regression from commit 6839d3369905eb02151.
And for drivers with fake msaa support, calls such as
glTexImage2DMultisample(samples=1) will now succeed.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102038
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102125
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
7 years agonvc0/ir: propagate immediates to CALL input MOVs
Tobias Klausmann [Sun, 13 Aug 2017 01:02:39 +0000 (03:02 +0200)]
nvc0/ir: propagate immediates to CALL input MOVs

On using builtin functions we have to move the input to registers $0 and $1, if
one of the input value is an immediate, we fail to propagate the immediate:

...
mov u32 $r477 0x00000003 (0)
...
mov u32 $r0 %r473 (0)
mov u32 $r1 $r477 (0)
call abs BUILTIN:0 (0)
mov u32 %r495 $r1 (0)
...

With this patch the immediate is propagated, potentially causing the first MOV
to be superfluous, which we'd remove in that case:

...

mov u32 $r0 %r473 (0)
mov u32 $r1 0x00000003 (0)
call abs BUILTIN:0 (0)
mov u32 %r495 $r1 (0)
...

Shaderdb stats:
total instructions in shared programs : 4893460 -> 4893324 (-0.00%)
total gprs used in shared programs    : 582972 -> 582881 (-0.02%)
total local used in shared programs   : 17960 -> 17960 (0.00%)

                local        gpr       inst      bytes
    helped           0          91         112         112
      hurt           0           0           0           0

v2:
 implement some changes proposed by imirkin, the manual deletion of the dead
 mov is necessary after ea22ac23e0 ("nvc0/ir: unlink values pre- and post-call
 to division function") as the potentially dead mov is unlinked properly,
 causing later passes to not notice the mov op at all and thus not cleaning it
 up. That makes up a big chunk of the regression the above commit caused.
 Keep the deletion of the op where it is, deleting it later unnecessarily blows
 up size of the change.

Signed-off-by: Tobias Klausmann <tobias.johannes.klausmann@mni.thm.de>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
7 years agonvc0: write 0 to pipeline_statistics.cs_invocations
Karol Herbst [Sun, 27 Aug 2017 16:00:52 +0000 (18:00 +0200)]
nvc0: write 0 to pipeline_statistics.cs_invocations

cs_invocations are currently unsupported, but leaving the field uninitialized
is even worse.

fixes on nvc0:
 * KHR-GL45.pipeline_statistics_query_tests_ARB.functional_default_qo_values
 * KHR-GL45.pipeline_statistics_query_tests_ARB.functional_non_rendering_commands_do_not_affect_queries

Signed-off-by: Karol Herbst <karolherbst@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: mesa-stable@lists.freedesktop.org
7 years agollvmpipe: lp_build_gather_elem_vec BE fix for 3x16 load
Ben Crocker [Wed, 23 Aug 2017 20:32:43 +0000 (16:32 -0400)]
llvmpipe: lp_build_gather_elem_vec BE fix for 3x16 load

Fix loading of a 3x16 vector as a single 48-bit load
on big-endian systems (PPC64, S390).

Roland Scheidegger's commit e827d9175675aaa6cfc0b981e2a80685fb7b3a74
plus Ray Strode's patch reduce pre-Roland Piglit failures from ~4000 to ~2000.  This patch fixes
three of the four regressions observed by Ray:

- draw-vertices
- draw-vertices-half-float
- draw-vertices-half-float_gles2

One regression remains:
- draw-vertices-2101010

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100613
Cc: "17.2" "17.1" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Ben Crocker <bcrocker@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
7 years agogallivm: correct channel shift logic on big endian
Ray Strode [Wed, 23 Aug 2017 20:32:42 +0000 (16:32 -0400)]
gallivm: correct channel shift logic on big endian

lp_build_fetch_rgba_soa fetches a texel from a texture.
Part of that process involves first gathering the element
together from memory into a packed format, and then breaking
out the individual color channels into separate, parallel
arrays.

The code fails to account for endianess when reading the packed
values.

This commit attempts to correct the problem by reversing the order
the packed values are read on big endian systems.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100613
Cc: "17.2" "17.1" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Ray Strode <rstrode@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
7 years agoutil: only use SCHED_IDLE in pthread_setschedparam() when it's defined
Roland Scheidegger [Sat, 26 Aug 2017 15:08:07 +0000 (17:08 +0200)]
util: only use SCHED_IDLE in pthread_setschedparam() when it's defined

Fixes build error when it's not.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
7 years agoanv/formats: Nicely handle unknown VkFormat enums
Jason Ekstrand [Thu, 27 Jul 2017 22:04:25 +0000 (15:04 -0700)]
anv/formats: Nicely handle unknown VkFormat enums

This fixes some crashes in the dEQP-VK.memory.requirements.core.* tests.
I'm not sure whether or not passing out-of-bound formats into the query
is supposed to be allowed but there's no harm in protecting ourselves
from it.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Bugzilla: https://bugs.freedesktop.org/101956
Cc: mesa-stable@lists.freedesktop.org
7 years agovbo: fix offset in minmax cache key
Charmaine Lee [Wed, 30 Aug 2017 21:26:41 +0000 (14:26 -0700)]
vbo: fix offset in minmax cache key

Instead of saving primitive offset in the minmax cache key,
save the actual buffer offset which is used in the cache lookup.

Fixes rendering artifact seen with GoogleEarth when run with
VMware driver.

v2: Per Brian's comment, initialize offset to avoid compiler warning.

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Brian Paul <brianp@vmware.com>
7 years agoanv: fix build errors on android
Tapani Pälli [Thu, 31 Aug 2017 05:52:27 +0000 (08:52 +0300)]
anv: fix build errors on android

error: incompatible pointer to integer conversion initializing 'VkFence'
   (aka 'unsigned long long') with an expression of type 'void *' [-Werror,-Wint-conversion]

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
7 years agowinsys/amdgpu: set AMDGPU_GEM_CREATE_VM_ALWAYS_VALID if possible v2
Christian König [Tue, 29 Aug 2017 14:45:46 +0000 (16:45 +0200)]
winsys/amdgpu: set AMDGPU_GEM_CREATE_VM_ALWAYS_VALID if possible v2

When the kernel supports it set the local flag and
stop adding those BOs to the BO list.

Can probably be optimized much more.

v2: rename new flag to AMDGPU_GEM_CREATE_VM_ALWAYS_VALID

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
7 years agoradeonsi: set a per-buffer flag that disables inter-process sharing (v4)
Marek Olšák [Tue, 18 Jul 2017 20:08:44 +0000 (16:08 -0400)]
radeonsi: set a per-buffer flag that disables inter-process sharing (v4)

For lower overhead in the CS ioctl.
Winsys allocators are not used with interprocess-sharable resources.

v2: It shouldn't crash anymore, but the kernel will reject the new flag.
v3 (christian): Rename the flag, avoid sending those buffers in the BO list.
v4 (christian): Remove setting the kernel flag for now

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
7 years agoi965: Use BLORP for buffer object stall avoidance blits instead of BLT.
Kenneth Graunke [Mon, 28 Aug 2017 23:08:32 +0000 (16:08 -0700)]
i965: Use BLORP for buffer object stall avoidance blits instead of BLT.

Improves performance of GFXBench4 tests at 1024x768 on a Kabylake GT2:
- Manhattan 3.1 by 1.32134% +/- 0.322734% (n=8).
- Car Chase by 1.25607% +/- 0.291262% (n=5).

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
7 years agoi965: Always flush caches after blitting to a GL buffer object.
Kenneth Graunke [Tue, 29 Aug 2017 05:04:01 +0000 (22:04 -0700)]
i965: Always flush caches after blitting to a GL buffer object.

When we blit data into a buffer object, we may need to invalidate any
caches that might contain stale data, so the new data becomes visible.

For example, if the buffer object is bound as a vertex buffer, we need
to invalidate the vertex fetch cache.

While this flushing was missing, it usually happened implicitly for
non-obvious reasons: we're usually on the render ring, and calling
intel_emit_linear_blit() would require switching to the BLT ring,
causing an implicit flush.  This likely provoked the kernel to do
PIPE_CONTROLs on our behalf.  Although, Gen4-5 wouldn't have this
behavior.  At any rate, we should do it ourselves.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
7 years agoi965: Add PIPE_CONTRTOL_DATA_CACHE flush to brw_emit_mi_flush().
Kenneth Graunke [Tue, 29 Aug 2017 05:00:12 +0000 (22:00 -0700)]
i965: Add PIPE_CONTRTOL_DATA_CACHE flush to brw_emit_mi_flush().

Although we're phasing out brw_emit_mi_flush(), we still use it in some
places in order to "flush everything".  In a number of those places, we
write data to a buffer that we may then bind as an image surface, SSBO,
or atomic buffer.  Those usages require us to flush the data cache.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
7 years agoi965: Add a brw_blorp_copy_buffers() command.
Kenneth Graunke [Mon, 28 Aug 2017 22:57:20 +0000 (15:57 -0700)]
i965: Add a brw_blorp_copy_buffers() command.

This exposes the new blorp_copy_buffer() functionality to i965.
It should be a drop-in replacement for intel_emit_linear_blit()
(other than the arguments being backwards, for consistency with BLORP).

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
7 years agoblorp: Make blorp_buffer_copy work on Gen4-6.
Kenneth Graunke [Tue, 29 Aug 2017 04:19:22 +0000 (21:19 -0700)]
blorp: Make blorp_buffer_copy work on Gen4-6.

Gen4-6 can only handle surfaces up to 8192.  Only Gen7+ can do 16384.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
7 years agoblorp: Turn anv_CmdCopyBuffer into a blorp_buffer_copy() helper.
Kenneth Graunke [Mon, 28 Aug 2017 22:57:20 +0000 (15:57 -0700)]
blorp: Turn anv_CmdCopyBuffer into a blorp_buffer_copy() helper.

I want to be able to copy between buffer objects using BLORP in the i965
driver.  Anvil already had code to do this, in a reasonably efficient
manner - first using large bpp copies, then smaller bpp copies.

This patch moves that logic into BLORP as blorp_buffer_copy(), so we
can use it in both drivers.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
7 years agoradv: don't assert on empty hash table
Grazvydas Ignotas [Sun, 27 Aug 2017 21:29:36 +0000 (00:29 +0300)]
radv: don't assert on empty hash table

Currently if table_size is 0, it's falling through to:

unreachable("hash table should never be full");

But table_size can be 0 when RADV_DEBUG=nocache is set, or when the
table allocation fails (which is not considered an error).

Fixes: f4e499ec791 "radv: add initial non-conformant radv vulkan driver"
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
7 years agosvga: include sample count in surface_size() computation
Brian Paul [Mon, 21 Aug 2017 19:08:41 +0000 (13:08 -0600)]
svga: include sample count in surface_size() computation

Use MAX2() because sampleCount will be zero for non-MSAA surfaces.
No Piglit regressions.

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
7 years agoi965: drop unused brw->needs_unlit_centroid_workaround
Lionel Landwerlin [Wed, 30 Aug 2017 08:39:36 +0000 (09:39 +0100)]
i965: drop unused brw->needs_unlit_centroid_workaround

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
7 years agoi965: drop brw->has_surface_tile_offset in favor of devinfo's
Lionel Landwerlin [Wed, 30 Aug 2017 08:38:34 +0000 (09:38 +0100)]
i965: drop brw->has_surface_tile_offset in favor of devinfo's

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
7 years agoi965: drop unused brw->no_simd8
Lionel Landwerlin [Wed, 30 Aug 2017 08:36:33 +0000 (09:36 +0100)]
i965: drop unused brw->no_simd8

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
7 years agoi965: drop unused brw->has_pln
Lionel Landwerlin [Wed, 30 Aug 2017 08:36:06 +0000 (09:36 +0100)]
i965: drop unused brw->has_pln

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
7 years agoi965: drop brw->must_use_separate_stencil in favor of devinfo's
Lionel Landwerlin [Wed, 30 Aug 2017 08:35:04 +0000 (09:35 +0100)]
i965: drop brw->must_use_separate_stencil in favor of devinfo's

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
7 years agoi965: drop unused brw->has_negative_rhw_bug
Lionel Landwerlin [Wed, 30 Aug 2017 08:33:13 +0000 (09:33 +0100)]
i965: drop unused brw->has_negative_rhw_bug

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
7 years agoi965: drop unused brw->has_compr4
Lionel Landwerlin [Wed, 30 Aug 2017 08:32:45 +0000 (09:32 +0100)]
i965: drop unused brw->has_compr4

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
7 years agoi965: drop brw->has_llc in favor of devinfo->has_llc
Lionel Landwerlin [Wed, 30 Aug 2017 08:29:11 +0000 (09:29 +0100)]
i965: drop brw->has_llc in favor of devinfo->has_llc

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
7 years agoi965: drop brw->is_broxton
Lionel Landwerlin [Wed, 30 Aug 2017 08:24:32 +0000 (09:24 +0100)]
i965: drop brw->is_broxton

We need to take some take here as brw->is_broxton has been used to
check whether the device is a low power gen9 (aka Atom gen9 platform).

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
7 years agoi965: drop brw->is_cherryview in favor of devinfo->is_cherryview
Lionel Landwerlin [Wed, 30 Aug 2017 08:22:32 +0000 (09:22 +0100)]
i965: drop brw->is_cherryview in favor of devinfo->is_cherryview

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
7 years agoi965: drop brw->is_haswell in favor of devinfo->is_haswell
Lionel Landwerlin [Wed, 30 Aug 2017 08:19:47 +0000 (09:19 +0100)]
i965: drop brw->is_haswell in favor of devinfo->is_haswell

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
7 years agoi965: drop brw->is_baytrail in favor of devinfo->is_baytrail
Lionel Landwerlin [Wed, 30 Aug 2017 08:12:49 +0000 (09:12 +0100)]
i965: drop brw->is_baytrail in favor of devinfo->is_baytrail

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
7 years agoi965: drop brw->is_g4x in favor of devinfo->is_g4x
Lionel Landwerlin [Wed, 30 Aug 2017 08:09:13 +0000 (09:09 +0100)]
i965: drop brw->is_g4x in favor of devinfo->is_g4x

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
7 years agoi965: drop brw->gt in favor of devinfo->gt
Lionel Landwerlin [Wed, 30 Aug 2017 08:07:10 +0000 (09:07 +0100)]
i965: drop brw->gt in favor of devinfo->gt

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
7 years agoi965: drop brw->gen in favor of devinfo->gen
Lionel Landwerlin [Wed, 30 Aug 2017 07:44:37 +0000 (08:44 +0100)]
i965: drop brw->gen in favor of devinfo->gen

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
7 years agoanv: use device->info instead of brw->is_*
Lionel Landwerlin [Wed, 30 Aug 2017 06:53:34 +0000 (07:53 +0100)]
anv: use device->info instead of brw->is_*

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
7 years agoRevert "egl: Allow creation of per surface out fence"
Mark Janes [Wed, 30 Aug 2017 15:45:36 +0000 (08:45 -0700)]
Revert "egl: Allow creation of per surface out fence"

This reverts commit 13c23b19d0b3b965d666498eb759e63fc4a625d9.

Mesa CI was brought down by this commit, with:

mesa/drivers/dri/i965/brw_sync.c:491: brw_dri_create_fence_fd:
Assertion `brw->screen->has_exec_fence' failed.

7 years agoi965: add 2xMSAA 16xMSAA modes to DRI configs.
Kevin Rogovin [Wed, 30 Aug 2017 10:57:48 +0000 (13:57 +0300)]
i965: add 2xMSAA 16xMSAA modes to DRI configs.

For Gen8, add 2xMSAA. For Gen9, add 2xMSAA and 16xMSAA.
Special thanks to Eero Tamminen for reporting rasterizer
numbers being twice what it should be for 2xMSAA under
a benchmark.

V2: Make pointer name less ugly + add 2xMSAA for Gen8

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
7 years agoRevert "i965: add 2xMSAA and 16xMSAA to DRI configs for Gen9."
Kenneth Graunke [Wed, 30 Aug 2017 15:16:06 +0000 (08:16 -0700)]
Revert "i965: add 2xMSAA and 16xMSAA to DRI configs for Gen9."

This reverts commit f6d38785e8b28a6dd303884798b823e289817741.

Kevin's original patch accidentally didn't add 2x for Gen8; he sent
a v2 with a bunch of style fixes shortly after I pushed the original
patch, not knowing it was coming.  Let's just revert this one, apply
v2, and move on.

7 years agomesa/st: remove unwanted backup file
Eric Engestrom [Wed, 30 Aug 2017 13:10:06 +0000 (14:10 +0100)]
mesa/st: remove unwanted backup file

Fixes: 0ac78dc92582a59d4319 "util: move string_to_uint_map to glsl"
Cc: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
7 years agoegl/dri2: only destroy created objects
Michael Olbrich [Tue, 29 Aug 2017 09:51:20 +0000 (11:51 +0200)]
egl/dri2: only destroy created objects

dri2_display_destroy may be called by dri2_initialize_wayland_drm() if
initialization fails. In this case, these objects may not be initialized.

Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
7 years agoegl: Allow creation of per surface out fence
Zhongmin Wu [Wed, 23 Aug 2017 18:05:25 +0000 (23:35 +0530)]
egl: Allow creation of per surface out fence

Add plumbing to allow creation of per display surface out fence.

Currently enabled only on android, since the system expects a valid
fd in ANativeWindow::{queue,cancel}Buffer. We pass a fd of -1 with
which native applications such as flatland fail. The patch enables
explicit sync on android and fixes one of the functional issue for
apps or buffer consumers which depend upon fence and its timestamp.

v2: a) Also implement the fence in cancelBuffer.
    b) The last sync fence is stored in drawable object
       rather than brw context.
    c) format clear.

v3: a) Save the last fence fd in DRI Context object.
    b) Return the last fence if the batch buffer is empty and
       nothing to be flushed when _intel_batchbuffer_flush_fence
    c) Add the new interface in vbtl to set the retrieve fence

v3.1 a) close fd in the new vbtl interface on none Android platform

v4: a) The last fence is saved in brw context.
    b) The retrieve fd is for all the platform but not just Android
    c) Add a uniform dri2 interface to initialize the surface.

v4.1: a) make some changes of variable name.
      b) the patch is broken into two patches.

v4.2: a) Add a deinit interface for surface to clear the out fence

v5: a) Add enable_out_fence to init, platform sets it true or
       false
    b) Change get fd to update fd and check for fence
    c) Commit description updated

v6: a) Heading and commit description updated
    b) enable_out_fence is set only if fence is supported
    c) Review comments on function names
    d) Test with standalone patch, resolves the bug

v6.1: Check for old display fence reverted

v6.2: enable_out_fence initialized to false by default,
      dri2_surf_update_fence_fd updated, deinit changed to fini

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101655

Signed-off-by: Zhongmin Wu <zhongmin.wu@intel.com>
Signed-off-by: Yogesh Marathe <yogesh.marathe@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
7 years agowinsys/amdgpu: add BO to the global list only when RADEON_ALL_BOS is set
Samuel Pitoiset [Tue, 29 Aug 2017 14:24:45 +0000 (16:24 +0200)]
winsys/amdgpu: add BO to the global list only when RADEON_ALL_BOS is set

Only useful when that debug option is enabled.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
7 years agoradeonsi: update dirty_level_mask before dispatching
Samuel Pitoiset [Tue, 29 Aug 2017 15:37:14 +0000 (17:37 +0200)]
radeonsi: update dirty_level_mask before dispatching

This fixes a rendering issue with Hitman when bindless textures
are enabled.

Fixes: 2263610827 ("radeonsi: flush DB caches only when transitioning from DB to texturing")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
7 years agoanv: set right datatypes in anv_pipeline_binding
Juan A. Suarez Romero [Fri, 25 Aug 2017 15:31:14 +0000 (17:31 +0200)]
anv: set right datatypes in anv_pipeline_binding

This structure contains two fields, binding and index, that store the
binding in the descriptor set and the index inside the binding.

These structures are defined as uint8_t, but the types in Vulkan
specification are uint32_t, so big values are clamp.

This fixes dEQP-VK.binding_model.shader_access.*.multiple_arbitrary_descriptors.*

v2: use UINT32_MAX for index when having no render targets (Tapani)

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
7 years agollvmpipe: initialize llvmpipe->dirty with LP_NEW_SCISSOR
Brian Paul [Mon, 28 Aug 2017 20:17:26 +0000 (14:17 -0600)]
llvmpipe: initialize llvmpipe->dirty with LP_NEW_SCISSOR

If llvmpipe_set_scissor_states() is never called, we still need to be sure
that derived scissor/clip state is updated.  As of commit 743ad599a97d09b1
that function might not be called.

Fixes regressed Piglit gl-1.0-scissor-offscreen -fbo -auto test.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101709
Fixes: 743ad599a97 ("st/mesa: don't set 16 scissors and 16 viewports
if they're unused")
Cc: "17.2" <mesa-stable@lists.freedesktop.org>
7 years agoi965: Bump the initial program cache size from 4kB to 16kB.
Kenneth Graunke [Sat, 19 Aug 2017 07:19:34 +0000 (00:19 -0700)]
i965: Bump the initial program cache size from 4kB to 16kB.

Our initial size of 4kB is way too small to do anything useful, so we
end up growing it at least a few times.  We may as well start it larger.

Some data points:

- Dinoshade (from Mesa Demos): hit 8kB.
- Chromium 60: hit 16kB after browsing a few things in Google Docs.
- GFXBench4 TRex/Manhattan 3.1: hit 128kB
- Unigine Valley 1.0: hit 512kB

It might make sense to start it even larger.

Acked-by: Matt Turner <mattst88@gmail.com>
7 years agoi965: Issue performance warnings when growing the program cache
Kenneth Graunke [Fri, 18 Aug 2017 04:23:25 +0000 (21:23 -0700)]
i965: Issue performance warnings when growing the program cache

This involves a bunch of unnecessary copying, a batch flush, and
state re-emission.

Reviewed-by: Matt Turner <mattst88@gmail.com>
7 years agoi965: add 2xMSAA and 16xMSAA to DRI configs for Gen9.
Kevin Rogovin [Thu, 24 Aug 2017 11:16:38 +0000 (14:16 +0300)]
i965: add 2xMSAA and 16xMSAA to DRI configs for Gen9.

Special thanks to Eero Tamminen for reporting rasterizer
numbers being twice what it should be for 2xMSAA under
a benchmark.

Signed-off-by: Kevin Rogovin <kevin.rogovin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
7 years agoglsl: define YY_NO_INPUT to prevent unused symbol warnings
Matt Turner [Mon, 28 Aug 2017 18:11:17 +0000 (11:11 -0700)]
glsl: define YY_NO_INPUT to prevent unused symbol warnings

Otherwise clang warns:

glsl/glsl_lexer.cpp:3507:16: warning: function 'yyinput' is not needed
and will not be emitted [-Wunneeded-internal-declaration]
    static int yyinput (yyscan_t yyscanner)
               ^

Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
7 years agoblorp: Explicitly cast between different enums
Matt Turner [Sat, 26 Aug 2017 03:08:23 +0000 (20:08 -0700)]
blorp: Explicitly cast between different enums

Fixes warnings like

warning: implicit conversion from enumeration type 'enum isl_format' to
different enumeration type 'enum GEN10_SURFACE_FORMAT'
[-Wenum-conversion]
         .SourceElementFormat = ISL_FORMAT_R32_UINT,
                                ^~~~~~~~~~~~~~~~~~~

Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
7 years agointel/isl: Mark functions used conditionally as UNUSED
Matt Turner [Sat, 26 Aug 2017 03:39:12 +0000 (20:39 -0700)]
intel/isl: Mark functions used conditionally as UNUSED

The functions we're marking as UNUSED in isl_surface_state.c are used
only when compiling for particular generations.

Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
7 years agointel/isl: Explicitly cast between different enums
Matt Turner [Sat, 26 Aug 2017 03:08:43 +0000 (20:08 -0700)]
intel/isl: Explicitly cast between different enums

Fixes warnings like

warning: implicit conversion from enumeration type 'enum isl_format' to
different enumeration type 'enum GEN10_SURFACE_FORMAT'
[-Wenum-conversion]
         .SourceElementFormat = ISL_FORMAT_R32_UINT,
                                ^~~~~~~~~~~~~~~~~~~

Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
7 years agointel/isl: Remove 'inline' keywords
Matt Turner [Fri, 7 Jul 2017 04:19:18 +0000 (21:19 -0700)]
intel/isl: Remove 'inline' keywords

Unless you have data, the compiler knows better than you whether a
function should be inlined.

Unlike all other cases in this series, the removal of the inline keyword
from isl_format_has_channel_type actually changes the resulting binary
with gcc-6.3.0:

   text    data     bss     dec     hex filename
7831116  346384  420648 8598148  833284 i965_dri.so before
7830716  346384  420648 8597748  8330f4 i965_dri.so after

I think this is likely an improvement. No difference in the resulting
binary with clang-4.0.

Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
7 years agoanv: Mark functions used conditionally as UNUSED
Matt Turner [Sat, 26 Aug 2017 03:40:01 +0000 (20:40 -0700)]
anv: Mark functions used conditionally as UNUSED

The functions we're marking as UNUSED in genX_pipeline.c are used only
when compiling for particular generations.

Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>