Commit Graph

110626 Commits

Author SHA1 Message Date
Erico Nunes 257a9b0a94 lima/gpir: add limit of max 512 instructions
It has been noted that the lima GP has a limit of 512 instructions,
after which the shaders don't work and fail silently.
This commit adds a check to make the shader compilation abort when the
shader exceeds this limit, so that we get a clear reason for why the
program will not work.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
2019-05-02 00:02:58 +00:00
Alyssa Rosenzweig 09c669260f panfrost: Fix blend shader upload
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2019-05-01 23:20:51 +00:00
Alyssa Rosenzweig 910608b29a panfrost/decode: Hit MRT blend shader enable bits
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2019-05-01 23:20:50 +00:00
Alyssa Rosenzweig b304b30f2c panfrost: Remove shader dump
Redundant via the midgard shader dump.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2019-05-01 23:20:48 +00:00
David Riley dec68e32ea virgl: Re-use and extend queue transfers for intersecting buffer subdatas.
Small buffer subdatas which are essentially doing a memcpy were getting
bogged down by all the overhead of creating new transfers.

Signed-off-by: David Riley <davidriley@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
2019-05-01 15:48:51 -07:00
David Riley a54c231b56 virgl: Allow transfer queue entries to be found and extended.
Intersecting transfer queue entries allow for the possibility of
extending an existing transfer instead of creating a new one (and all
the associated mappign/unmapping).

Signed-off-by: David Riley <davidriley@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
2019-05-01 15:48:46 -07:00
David Riley e94a9a7f38 virgl: Store mapped hw resource with transfer object.
Signed-off-by: David Riley <davidriley@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
2019-05-01 15:48:28 -07:00
Kenneth Graunke ebbb05b3c9 iris: Fix imageBuffer and PBO download.
Recently we added checks to try and deny multisampled shader images.
Unfortunately, this messed up imageBuffers, which have sample_count = 0,
which are also used in PBO download, causing us hit CPU map fallbacks.

Fixes: b15f5cfd20 iris: Do not advertise multisampled image load/store.
Reviewed-by: Rafael Antognolli <rafael.antognolli@intel.com>
2019-05-01 14:37:46 -07:00
Dave Airlie e2fecf57e3 r600: reset tex array override even when no view bound
If no view is bound we still should reset the override to 0
and array mode.

This should fix misrendering in firefox WebRender since
the pbo sampler was removed.

Fixes: 1250383e36 (st/mesa: remove sampler associated with buffer texture in pbo logic)
2019-05-02 07:34:32 +10:00
Ian Romanick 85e6865ff6 nir: Saturating integer arithmetic is not associative
In 8-bits,

    iadd_sat(iadd_sat(0x7f, 0x7f), -1) =
    iadd_sat(0x7f, -1) =
    0x7e

but,

    iadd_sat(0x7f, iadd_sat(0x7f, -1)) =
    iadd_sat(0x7f, 0x7e) =
    0x7f

Fixes: 272e927d0e ("nir/spirv: initial handling of OpenCL.std extension opcodes")
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2019-05-01 09:07:47 -07:00
Eric Engestrom 70da00ffd6 util: move #include out of #if linux
This #include is needed for `NULL`, which is used on all OSes, not just Linux.

Reported-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Fixes: 316964709e "util: add os_read_file() helper"
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
2019-05-01 15:45:47 +00:00
Alok Hota a44420d9cc swr/rast: Add general SWTag statistics
Update Archrast parser to use stats, used with an internal tool

Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
2019-05-01 15:11:30 +00:00
Alok Hota b8adb540a0 swr/rast: Add string handling to AR event framework
For use by an internal tool

Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
2019-05-01 15:11:30 +00:00
Alok Hota f355f03388 swr/rast: Add initial SWTag proto definitions
Update gen_archrast.py to properly generate event IDs

Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
2019-05-01 15:11:30 +00:00
Alok Hota 396831adf8 swr/rast: Cleanup and generalize gen_archrast
- Update meson.build
  - Includes current_build_dir() fix
    meson/swr: replace hard-coded path with current_build_dir()

    Fixes: 93cd9905c8 "swr/rast: Cleanup and generalize gen_archrast"
    Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
    Reviewed-by: Alok Hota <alok.hota@intel.com>
    Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
  - Clean up meson.build (remove foreach loop, replace with single call)
- Update SConscript
  - use `$SOURCES` to call `CodeGenerate` with multiple source files

Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
2019-05-01 15:11:30 +00:00
Eric Engestrom 47f419d0b3 gitlab-ci: build vulkan drivers in clang build
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2019-05-01 14:37:31 +00:00
Erik Faye-Lund f753ac355e softpipe: setup pixel_offset for all primitive types
If we don't update this for all primitive-types, we end up rendering
slightly offset points and lines up until the point where the first
triangle gets drawn. This is obviously not correct, and violates
OpenGL's repeatability rule.

Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Fixes: ca9c413647 ("softpipe: Respect gl_rasterization_rules in
       primitive setup.")
Reviewed-By: Gert Wollny <gert.wollny@collabora.com>
2019-05-01 13:53:02 +00:00
Jonathan Marek 0c6702cfa5 nir: improve convert_yuv_to_rgb
Use a different arrangement of constants to allow more ffma.

A vec4 backend will now use 3 fma for yuv_to_rgb. On freedreno/ir3, it is
down from 10 to 7 alu (4 fma, 3 mul, 3 add to 7 fma). Other backends
shouldn't be hurt.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Eric Anholt <eric@anholt.net>
Tested-by: Ian Romanick <ian.d.romanick@intel.com>
2019-05-01 04:13:36 -07:00
Gert Wollny becd192801 doc: Update feature matrix
Since softpipe doesn't truely support multisample, I've not added softpipe
to the "Enhanced per-sample shading" even though with the advertised GLSL
level ARB_gpu_shader5 is advertised.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2019-05-01 08:40:46 +02:00
Gert Wollny 6162ce6c60 softpipe: Increase the GLSL feature level
This will enable calls to the interpolateAt* functions, but also a bunch
of other features.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2019-05-01 08:40:39 +02:00
Gert Wollny 338017c58a softpipe: Add support for TGSI_OPCODE_INTERP_CENTROID
Like with interpolatAtSample this is also not really implementing the
according sampling and will only work correctly for pixels that are fully
covered, but since softpipe only supports one sample this is good enough
for now.

v2: Correct spelling (Roland Scheidegger)

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2019-05-01 08:40:20 +02:00
Gert Wollny c3df4e0601 softpipe: Add support for TGSI_OPCODE_INTERP_OFFSET
Since for this opcode the offsets are given manually the function
should actually also work for non-zero offsets, but the related piglits
only ever test with offset 0. Accordingly the patch satisfies
"fs-interpolateatoffset-*".

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2019-05-01 08:40:16 +02:00
Gert Wollny 27bfd57bc7 softpipe: Add (fake) support for TGSI_OPCODE_INTERP_SAMPLE
Softpipe doesn't support more than one sample, so this function
implements the interpolation at sample 0 and adds a stub to make it
possible to interpolate at other samples.

As it is this makes the piglits "fs-interpolateatsample-*" pass, but
they only ever test sample 0 anyway.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2019-05-01 08:40:10 +02:00
Gert Wollny e405e32d36 softpipe: Add an per-input array for interpolator correctors to machine
This adds entry points for correcting the interpolation values if the
interpolation is done by using one of the interpolateAt* functions.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2019-05-01 08:40:06 +02:00
Gert Wollny 5f0959f8df softpipe: Factor out evaluation of the source indices
We will need these for per sample interpolation as well

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2019-05-01 08:39:58 +02:00
Gert Wollny 7d5c8d3589 softpipe: evaluate cube the faces on a per sample bases
Now that the LOD is evaluated up front the cube faces can also be
evauate on a per sample basis instead of using the quad.

This fixes a large number of deqp gles 3 and 31 cube texture tests.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2019-05-01 08:23:23 +02:00
Gert Wollny aacdce2879 softpipe: keep input lod for explicite derivatives
This only affects anisotropic interpolation.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2019-05-01 08:23:19 +02:00
Gert Wollny d4b6ae223f softpipe: tie in new code path for lod evaluation
This enables the use of explicit gradients.

Also remove an unused parameter when changing the interfaces.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2019-05-01 08:23:07 +02:00
Gert Wollny 9e26a0ed8f softpipe: Move selection of shadow values up and clean parameter list
The shadow evaluation compare parameter is stored in different locations,
depending on the texture type. Move the values to a common location free
the lod storage and to be able to reduce the number of parameters.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2019-05-01 08:23:02 +02:00
Gert Wollny 41dc16b928 softpipe: Pipe gather_comp through from st_tgsi_get_samples
The value is stored in the lod components and this will be overwritten
when swithcing to the new code path.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2019-05-01 08:22:56 +02:00
Gert Wollny 724a73509e softpipe: Prepare handling explicit gradients
This only adds corde that is not yet enabled.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2019-05-01 08:22:47 +02:00
Gert Wollny 7c004d093a softpipe: Factor gradient evaluation out of the lambda evaluation
this is useful when we want to use explicit gradients.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2019-05-01 08:22:28 +02:00
Andrii Simiklit 5c581b3dd6 egl: return correct error code for a case req ver < 3 with forward-compatible
The EGL_KHR_create_context spec says:
   "If an OpenGL context is requested and the values for attributes
    EGL_CONTEXT_MAJOR_VERSION_KHR and EGL_CONTEXT_MINOR_VERSION_KHR,
    when considered together with the value for attribute
    EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE_BIT_KHR, specify an OpenGL
    version and feature set that are not defined, than an
    EGL_BAD_MATCH error is generated."

This case is already correctly handled a bit below in
the same source file.
The correct handling was added by commit: 63beb3df

Reported-by: Ian Romanick <idr@freedesktop.org>
Here: https://bugzilla.freedesktop.org/show_bug.cgi?id=92552#c9
Fixes: 11cabc45b7 "egl: rework handling EGL_CONTEXT_FLAGS"
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Andrii Simiklit <andrii.simiklit@globallogic.com>
2019-05-01 00:14:00 +00:00
Timothy Arceri 90f3bf7437 radeonsi/nir: call radeonsi nir opts before the scan pass
Some of the opts are not called in the general optimastion loop
in the state trackers glsl -> nir conversion. We need to call
the radeonsi specific optimisation once before scanning over
the nir otherwise we can end up gathering info on code that
is later removed.

Fixes an assert in the piglit test:

./bin/varying-struct-centroid_gles3

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2019-05-01 09:41:07 +10:00
Timothy Arceri a004e95dd7 radeonsi/nir: create si_nir_opts() helper
We will make use of this in the following commit.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2019-05-01 09:41:07 +10:00
Alok Hota 4c68acba37 swr/rast: early exit on empty triangle mask
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
2019-04-30 19:48:12 +00:00
Alok Hota e7f381e9ca swr/rast: add guards for cpuid on Linux
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
2019-04-30 19:48:12 +00:00
Alok Hota ae436203d9 swr/rast: add flat shading
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
2019-04-30 19:48:12 +00:00
Alok Hota 9d01f4d631 swr/rast: add SWR_STATIC_ASSERT() macro
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
2019-04-30 19:48:12 +00:00
Alok Hota 3851c6c9bf swr/rast: update guardband rects at draw setup
It's dependent on other state fields

Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
2019-04-30 19:48:12 +00:00
Alok Hota 2729d847ce swr/rast: add more llvm intrinsics
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
2019-04-30 19:48:12 +00:00
Julien Isorce 0e3a348bec st/va: properly set stride and offset in vlVaDeriveImage
Using the new resource_get_info function.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110443
Signed-off-by: Julien Isorce <jisorce@oblong.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
2019-04-30 17:53:12 +00:00
Julien Isorce 1cec049d4d radeonsi: implement resource_get_info
Re-use existing si_texture_get_offset.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110443
Signed-off-by: Julien Isorce <jisorce@oblong.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2019-04-30 17:53:12 +00:00
Julien Isorce a3c202de0a gallium: add resource_get_info to pipe_screen
Generic plumbing.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110443
Signed-off-by: Julien Isorce <jisorce@oblong.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2019-04-30 17:53:12 +00:00
Rob Clark ec6c229763 freedreno/ir3: fixes for half reg in/out
Needs to update max_half_reg, or be remapped to full reg and update
max_reg accordingly, depending on generation..

Signed-off-by: Rob Clark <robdclark@chromium.org>
2019-04-30 10:39:24 -07:00
Axel Davy ce57f4f7c4 st/nine: Check discard_delayed_release is set before allocating more
When discard_delayed_release is set (default), we allocate more buffers
and use a different buffer wait path.
Check if it is set, and use the old paths if not
(the alternative buffer wait path could still be used, but there is no
advantage to using it in this case).

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
2019-04-30 19:18:52 +02:00
Axel Davy b71c300c70 st/nine: Throttle rendering similarly for thread_submit
thread_submit's throttling depending on the number of internal
back buffers, and wasn't affected by the driver requested
throttling value.
Now it is.

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
2019-04-30 19:18:52 +02:00
Axel Davy 562f5a35c8 st/nine: Optimize a bit writeonly buffers
Optimize writeonly by passing PIPE_TRANSFER_WRITE
for these buffers instead of the safer
PIPE_TRANSFER_READ_WRITE.

This seems to improve the performance of d3d8 games
using d3d8to9.

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
2019-04-30 19:18:52 +02:00
Axel Davy 92117c989c st/nine: Use TGSI_SEMANTIC_GENERIC for fog
We used TGSI_SEMANTIC_FOG for fog,
however on vs/ps 3, fog is allowed to have
4 components (even on the ff pipeline according
to a wine test).
Since gallium's TGSI_SEMANTIC_FOG has only one
component, use TGSI_SEMANTIC_GENERIC instead.

Fixes:
https://github.com/iXit/Mesa-3D/issues/346

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
2019-04-30 19:18:52 +02:00
Axel Davy bade3bf615 st/nine: Enable computing const_ranges
All the pieces for constant compact are ready,
thus enable the path.

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
2019-04-30 19:18:52 +02:00