Commit Graph

110354 Commits

Author SHA1 Message Date
Dave Airlie ce17e413de virgl/drm: insert correct handles into the table. (v3)
This inserts a handle for the flink name and a handle the correct
gem handle for the bo.

v2: fix handles/names confusion (Lepton Wu)
v3: set flink name correctly (Lepton Wu)

Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
2019-04-25 06:05:43 +10:00
Dave Airlie 8a39f83fb2 virgl/drm: handle flink name better.
This realigns this code with code from radeon.

Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
2019-04-25 06:05:43 +10:00
Dave Airlie 92ef4cf9f0 virgl/drm: cleanup buffer from handle creation (v2)
This cleans up and realigns this code with what is in radeon

v2: fix names->handles (Lepton Wu)

Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
2019-04-25 06:05:43 +10:00
Kenneth Graunke 19b246257d iris: Actually put Mesa in GL_RENDERER string
I constructed the right thing and then returned the other one.
2019-04-24 12:54:27 -07:00
Jiang, Sonny 69430d7e59 va: use a compute shader for the blit
Signed-off-by: Sonny Jiang <sonny.jiang@amd.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
2019-04-24 15:47:41 -04:00
Marek Olšák 7fc3d21646 gallium: add PIPE_CAP_PREFER_COMPUTE_BLIT_FOR_MULTIMEDIA 2019-04-24 15:47:41 -04:00
Dylan Baker 5aedf48713 docs: update calendar, and news item and link release notes for 19.0.3 2019-04-24 10:53:04 -07:00
Dylan Baker 6bd7d4f19e docs: Add SHA256 sums for mesa 19.0.3 2019-04-24 10:50:39 -07:00
Dylan Baker 7cb9043879 docs: add relnotes for 19.0.3 2019-04-24 10:50:37 -07:00
Marek Olšák 09e4771af9 gallium: set PIPE_CAP_MAX_FRAMES_IN_FLIGHT to 2 for all drivers
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2019-04-24 10:41:04 -04:00
Rafael Antognolli f2041d2a92 intel/isl: Resize clear color buffer to full cacheline
Fixes MCS fast clear gpu hangs with Vulkan CTS on ICL in CI.

v2 (Nanley): In the title s/Align/Resize/

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Tested-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Signed-off-by: Rafael Antognolli <rafael.antognolli@intel.com>
2019-04-24 08:56:42 +03:00
Jason Ekstrand 45957c05b0 anv/descriptor_set: Properly align descriptor buffer to a page
Instead of aligning and then taking inline uniforms into account, we
need to take inline uniforms into account and then align to a page.
Otherwise, we may not be aligned to a page and allocation may fail.

Fixes: 43f40dc7cb "anv: Implement VK_EXT_inline_uniform_block"
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
2019-04-24 05:40:27 +00:00
Jason Ekstrand 3d33c13eca anv/descriptor_set: Only vma_heap_finish if we have a descriptor buffer
Fixes: 7bb34ecff9 "anv: release memory allocated by bo_heap when..."
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
2019-04-24 05:40:27 +00:00
Jason Ekstrand 0bc1942c9d anv/descriptor_set: Destroy sets before pool finalization
Fixes: 105002bd2d "anv: destroy descriptor sets when pool gets..."
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
2019-04-24 05:40:27 +00:00
Jason Ekstrand 6be603edf7 anv/descriptor_set: Unlink sets from the pool in set_destroy
anv_descriptor_pool_free_set is called on the clean-up path of
anv_descriptor_set_create and the set may not have been added to the
pool's list of sets yet.  While we're here, we move adding it to that
list into set_create for symmetry.

Fixes: 105002bd2d "anv: destroy descriptor sets when pool gets..."
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
2019-04-24 05:40:27 +00:00
Tapani Pälli 4add3c6880 android/iris: fix driinfo header filename
Fixes iris driver Android build.

Fixes: faa52e328e "iris: Add mechanism for iris-specific driconf options"
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2019-04-23 22:25:17 -07:00
Ian Romanick 21223acf7d intel/fs: Fix D to W conversion in opt_combine_constants
Found by GCC warning:

src/intel/compiler/brw_fs_combine_constants.cpp: In function ‘bool needs_negate(const fs_reg*, const imm*)’:
src/intel/compiler/brw_fs_combine_constants.cpp:306:34: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
       return ((reg->d & 0xffffu) < 0) != (imm->w < 0);
               ~~~~~~~~~~~~~~~~~~~^~~

The result of the bit-and is a 32-bit value with the top bits all zero.
This will never be < 0.  Instead of masking off the bits, just cast to
int16_t and let the compiler handle the actual conversion.

Fixes: e64be391dd ("intel/compiler: generalize the combine constants pass")
Cc: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2019-04-23 19:48:33 -07:00
Alyssa Rosenzweig e4ec814c39 panfrost/midgard: Remove assembler
This code is outdated and unused; now that the compiler is mature,
there's no point keeping it around in-tree (or at all).

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2019-04-24 02:44:00 +00:00
Ryan Houdek 2cd1aa3429 panfrost: Adds Bifrost shader disassembler utility
This code is stable and can live upstream independently while the rest
of the Bifrost stack comes up.

v2: Added a verbose flag to hide away some of the more verbose features
that nobody really needs

[The Bifrost disassembler is written by Connor Abbott, Lyude Paul, and
Ryan Houdek.]

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2019-04-24 02:39:01 +00:00
Alyssa Rosenzweig bb1aff3007 panfrost/midgard: Add "op commutes?" property
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2019-04-24 02:22:32 +00:00
Alyssa Rosenzweig 1f345bc7d6 panfrost/midgard: Refactor opcode tables
We create an all-encompassing opcode table for handling name and
properties, removing a number of ad hoc opcode tables which became
brittle and quickly out of date. While we're at it, we fix some
incorrect opcodes relating to ball/bany, and move a small function out
to midgard_compile.c. Together these changes should allow compilation
without warnings, along with helping the codebase health considerably.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2019-04-24 02:22:32 +00:00
Alyssa Rosenzweig 4d995e0da8 panfrost/midgard: Optimize MIR in progress loop
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2019-04-24 02:22:32 +00:00
Alyssa Rosenzweig e9f84f1447 panfrost/midgard: Implement copy propagation
Most copy prop should occur at the NIR level, but we generate a fair
number of moves implicitly ourselves, etc... long story short, it's a
net win to also do simple copy prop + DCE on the MIR. As a bonus, this
fixes the weird imov precision bug once and for good, I think.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2019-04-24 02:22:32 +00:00
Alyssa Rosenzweig fcdfb67711 panfrost/midgard: Set integer mods
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2019-04-24 02:22:32 +00:00
Alyssa Rosenzweig 422aceb407 panfrost/midgard: Document sign-extension/zero-extension bits (vector)
For floating point ops, these bits determine the "negate?" and "abs?"
modifiers. For integer ops, it turns out they control how sign/zero
extension work, useful for mixing types.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2019-04-24 02:22:32 +00:00
Alyssa Rosenzweig b453c877d9 panfrost/midgard: Update integer op list
In the future, we might want to switch to a table-based approach, but
for now, at least have it current.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2019-04-24 02:22:32 +00:00
Alyssa Rosenzweig 0b380a7868 panfrost/midgard: Remove unused mir_next_block
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2019-04-24 02:22:32 +00:00
Alyssa Rosenzweig 879ff866b6 panfrost/midgard: Fix off-by-one in successor analysis
This reduces register pressure substantially since we get smaller
liveness ranges.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2019-04-24 02:22:31 +00:00
Alyssa Rosenzweig 521ac6e5b1 panfrost/midgard: Track loop depth
This fixes nested loops.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2019-04-24 02:22:31 +00:00
Alyssa Rosenzweig 84f09ff433 panfrost/midgard: Dead code eliminate MIR
We reshuffle the existing "dead move elimination" pass into a generic
dead code elimination layer, fixing bugs incurred with looping in the
process.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2019-04-24 02:22:31 +00:00
Alyssa Rosenzweig 328a5ef598 panfrost: Use actual imov instruction
The bug this worked around is no longer applicable, it seems -- remove
the hack that breaks more than it fixes.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2019-04-24 02:22:31 +00:00
Alyssa Rosenzweig 12cd89da81 panfrost: Disable indirect outputs for now
The hardware needs this lowered anyway; for now, might as well use
mesa's default lowering for pure conformance reasons.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2019-04-24 02:22:31 +00:00
Alyssa Rosenzweig 9db5816e02 panfrost/midgard: imul can only run on *mul
This restriction makes sense logically. Not sure why it wasn't obeyed
before. In conjunction with previous commit's disclaimer, fixes
dEQP-GLES2.functional.shaders.loop.for_dynamic_iterations.*

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2019-04-24 02:22:31 +00:00
Alyssa Rosenzweig a1aaf72915 panfrost/midgard: Don't try to inline constants on branches
Along with a corresponding fix to the move elimination pass (not
included here yet -- I just have it disabled for now), this will fix
dEQP-GLES2.functional.shaders.loops.for_uniform_iterations.*

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2019-04-24 02:22:31 +00:00
Alyssa Rosenzweig c0fb2605dc panfrost: Respect backwards branches in RA
Fixes a bunch of issues with looping. Honestly, I'm not sure why loops
worked at all before.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2019-04-24 02:22:31 +00:00
Alyssa Rosenzweig 7d45bd9c91 panfrost/midgard: Remove useless MIR dump
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2019-04-24 02:22:31 +00:00
Alyssa Rosenzweig 8b15f8a343 panfrost/midgard: Respect component of bcsel condition
Fixes a bunch of non-vec4 indexing.varying_array tests.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2019-04-24 02:22:31 +00:00
Alyssa Rosenzweig 6a466c0a06 panfrost/midgard: Implement indirect loads of varyings/UBOs
This adds preliminary support for indirect loads of varying arrays and
uniform arrays, bringing a few new tests in shader.indexing.* to
passing, although there remains a number of cases still missing.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2019-04-24 02:22:31 +00:00
Alyssa Rosenzweig 1f7b3884c9 panfrost/midgard: Pipe through varying arrays
Varying arrays sometimes are lowered to a series of directly accessed
varyings (which we handled okay), but when indirectly accessed, they
appear as a single array; we need to handle this as well.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2019-04-24 02:22:31 +00:00
Alyssa Rosenzweig 042d0bb5c3 panfrost/mdg/disasm: Print raw varying_parameters
The semantics of this field are not well understood; it is better to
print it unconditionally along with the other unknown state, rather than
silently eat the value. Without this change, some critical state was
being lost in some shaders (notably, the offset for load/store
scratchpad intructions found in shaders that spill registers.)

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2019-04-24 02:22:31 +00:00
Kenneth Graunke 864873dea9 iris: Prefer staging blits when destination supports CCS_E.
Otherwise our textures don't get color compression.  Thanks to
Eero Tamminen for noticing this was missing!

Improves performance of GLB27_FillTestC24Z16 on my Apollolake
laptop with single channel RAM by 2.3x.

Reported-by: Eero Tamminen <eero.t.tamminen@intel.com>
2019-04-23 18:59:27 -07:00
Marek Olšák d8b296d3ad gallium: replace drm_driver_descriptor::configuration with driconf_xml
PIPE_CAPs are better.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2019-04-23 21:20:26 -04:00
Marek Olšák 8ae50e6004 gallium: replace DRM_CONF_SHARE_FD with PIPE_CAP_DMABUF
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2019-04-23 21:20:26 -04:00
Marek Olšák e3841368f3 gallium: replace DRM_CONF_THROTTLE with PIPE_CAP_MAX_FRAMES_IN_FLIGHT
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2019-04-23 21:20:24 -04:00
Marek Olšák a20800f49d st/dri: simplify throttling code
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2019-04-23 21:19:48 -04:00
Marek Olšák d9838f653a gallium: document conservative rasterization flags
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2019-04-23 21:19:48 -04:00
Ian Romanick 26391cceaa intel/compiler: Lower ffma on Gen4 and Gen5
flrp32 is also a 3-source instruction, but there is another pending
series that handles that for Gen4 and Gen5.

v2: Rebase on "intel/compiler: Don't have sepearate, per-Gen
nir_options"

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2019-04-23 17:50:28 -07:00
Ian Romanick fd1fa9afc7 intel/compiler: Don't have sepearate, per-Gen nir_options
Instead, just have separate scalar vs. vector nir_options and do
per-Gen "fix ups".

Suggested-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2019-04-23 17:50:16 -07:00
Ian Romanick 3b087f668f glsl: Silence may unused parameter warnings in glsl/ir.h
Every file that included glsl/ir.h had a warning like:

src/compiler/glsl/ir.h: In member function ‘virtual bool ir_rvalue::is_lvalue(const _mesa_glsl_parse_state*) const’:
src/compiler/glsl/ir.h:236:64: warning: unused parameter ‘state’ [-Wunused-parameter]
    virtual bool is_lvalue(const struct _mesa_glsl_parse_state *state = NULL) const
                                                                ^
Cc: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Fixes: fa4ebf6b8d ("glsl: add _mesa_glsl_parse_state object to is_lvalue()")
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2019-04-23 17:49:19 -07:00
Timothy Arceri a6b7068ff5 st/mesa/radeonsi: fix race between destruction of types and shader compilation
Commit 624789e370 moved the destruction of types out of atexit() and
made use of a ref count instead. This is useful for avoiding a crash
where drivers such as radeonsi are still compiling in a thread when the app
exits and has not called MakeCurrent to change from the current context.

While the above scenario is technically an app bug we shouldn't crash.
However that change caused another race condition between the shader
compilation tread in radeonsi and context teardown functions.

This patch makes two changes to fix this new problem:

First we explicitly call _mesa_destroy_shader_compiler_types() when destroying
the st context rather than calling it indirectly via _mesa_free_context_data().
We do this as we must call it after st_destroy_context_priv() so that we don't
destory the glsl types before the compilation threads finish.

Next wait for the shader threads to finish in si_destroy_context() this
also means we need to call context destroy before destroying the queues
in si_destroy_screen().

Fixes: 624789e370 ("compiler/glsl: handle case where we have multiple users for types")

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2019-04-24 10:23:10 +10:00