summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* util: use standard name for vsnprintf()Eric Engestrom2019-07-1910-18/+15
| | | | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* util: use standard name for snprintf()Eric Engestrom2019-07-1943-126/+125
| | | | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* util: use standard name for vasprintf()Eric Engestrom2019-07-193-3/+3
| | | | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* util: use standard name for sprintf()Eric Engestrom2019-07-197-20/+20
| | | | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* util: use standard name for strcmp()Eric Engestrom2019-07-192-10/+10
| | | | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* util: use standard name for strcasecmp()Eric Engestrom2019-07-191-2/+1
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* util: use standard name for strncmp()Eric Engestrom2019-07-192-2/+2
| | | | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* util: use standard name for strncat()Eric Engestrom2019-07-193-8/+8
| | | | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* util: use standard name for strdup()Eric Engestrom2019-07-193-5/+4
| | | | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* util: use standard name for strchrnul()Eric Engestrom2019-07-193-7/+4
| | | | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* util: drop unused vsprintf() wrapperEric Engestrom2019-07-191-7/+0
| | | | | | Suggested-by: Emil Velikov <[email protected]> Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* util: drop unused strchr() wrapperEric Engestrom2019-07-192-10/+1
| | | | | | Suggested-by: Emil Velikov <[email protected]> Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* util: drop unused strstr() wrapperEric Engestrom2019-07-191-14/+0
| | | | | | Suggested-by: Emil Velikov <[email protected]> Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* nir: Only rematerialize comparisons with all SSA sourcesJason Ekstrand2019-07-191-0/+15
| | | | | | | | | | | Otherwise, you may end up moving a register read and that could result in an incorrect shader. This commit fixes a rendering issue in Elite: Dangerous. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111152 Fixes: 3ee2e84c60 "nir: Rematerialize compare instructions" Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* spirv: Fix order of barriers in SpvOpControlBarrierDaniel Schürmann2019-07-191-4/+4
| | | | | | | | Semantically, the memory barrier has to come first to wait for the completion of pending memory requests. Afterwards, the workgroups can be synchronized. Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
* nir: use a switch when printing intrinsic indicesCaio Marcelo de Oliveira Filho2019-07-191-8/+32
| | | | Reviewed-by: Eric Engestrom <[email protected]>
* nir/algebraic: mark a few comparison simplifications as preciseRhys Perry2019-07-191-2/+2
| | | | | | | | No vkpipeline-db changes found. Signed-off-by: Rhys Perry <[email protected]> Reveiewed-by: Alyssa Rosenzweig [email protected] Reviewed-by: Connor Abbott <[email protected]>
* nir/algebraic: optimize contradictory iand operandsRhys Perry2019-07-191-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | Some of these were found in a few GTAV, Rise of the Tomb Raider and Shadow of the Tomb Raider shaders. Results from vkpipeline-db run with ACO: Totals from affected shaders: SGPRS: 376 -> 376 (0.00 %) VGPRS: 220 -> 220 (0.00 %) Spilled SGPRs: 0 -> 0 (0.00 %) Spilled VGPRs: 0 -> 0 (0.00 %) Private memory VGPRs: 0 -> 0 (0.00 %) Scratch size: 0 -> 0 (0.00 %) dwords per thread Code Size: 13492 -> 11560 (-14.32 %) bytes LDS: 6 -> 6 (0.00 %) blocks Max Waves: 69 -> 69 (0.00 %) Wait states: 0 -> 0 (0.00 %) v2: use False instead of 0 Signed-off-by: Rhys Perry <[email protected]> Reveiewed-by: Alyssa Rosenzweig [email protected] Reviewed-by: Connor Abbott <[email protected]>
* lima/ppir: handle all node types in ppir_node_replace_childErico Nunes2019-07-191-2/+30
| | | | | | | | | | ppir_node_replace_child is used by the const lowering routine in ppir. All types need to be handled here, otherwise the src node is not updated properly when one of the lowered nodes is a const, which results in, for example, regalloc not assigning registers correctly. Signed-off-by: Erico Nunes <[email protected]> Reviewed-by: Vasily Khoruzhick <[email protected]>
* lima/ppir: branch regalloc fixesErico Nunes2019-07-191-0/+33
| | | | | | | | The branch instruction has sources which must be handled in src handling paths so that regalloc assigns registers to them properly. Signed-off-by: Erico Nunes <[email protected]> Reviewed-by: Vasily Khoruzhick <[email protected]>
* main: Destroy static hash tableYevhenii Kolesnikov2019-07-191-0/+8
| | | | | | | | | format_array_format_table has a static lifetime - it will be destroyed by an atexit handler. Signed-off-by: Yevhenii Kolesnikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* radv: reset the window scissor with no clear state.Dave Airlie2019-07-191-1/+1
| | | | | | | | | | If we don't have clear state (which gfx10 doesn't currently) we will fix to reset the scissor. AMDVLK will leave it set to something else. Marek also has this fix for radeonsi pending. Reviewed-by: Samuel Pitoiset <[email protected]>
* radv: fix crash in shader tracing.Dave Airlie2019-07-193-3/+8
| | | | | | | | | | | Enabling tracing, and then having a vmfault, can leads to a segfault before we print out the traces, as if a meta shader is executing and we don't have the NIR for it. Just pass the stage and give back a default. Fixes: 9b9ccee4d64 ("radv: take LDS into account for compute shader occupancy stats") Reviewed-by: Samuel Pitoiset <[email protected]>
* iris: change last_vue_stage() to look at uncompiled shadersTimothy Arceri2019-07-191-3/+3
| | | | | | | This allows us to find the last vue stage before we have compiled the shaders. Reviewed-by: Kenneth Graunke <[email protected]>
* nir/lower_clip: add support for geometry shadersTimothy Arceri2019-07-192-0/+58
| | | | | | | This will be used to enabled compat profile support for geometry shaders. Reviewed-by: Kenneth Graunke <[email protected]>
* nir/lower_clip: add lower_clip_outputs() helperTimothy Arceri2019-07-191-42/+51
| | | | | | | This will be reused in the following patch to add support for clip vertex lowering in geometry shaders. Reviewed-by: Kenneth Graunke <[email protected]>
* nir/lower_clip: add create_clipdist_vars() helperTimothy Arceri2019-07-191-16/+18
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* nir/lower_clip: add a find_clipvertex_and_position_outputs() helperTimothy Arceri2019-07-191-24/+35
| | | | | | | | This will allow code sharing in a following patch that adds support for lowering in geometry shaders. It also allows us to exit early if there is no lowering to do which allows a small code tidy up. Reviewed-by: Kenneth Graunke <[email protected]>
* panfrost: Set rt_countAlyssa Rosenzweig2019-07-182-8/+11
| | | | | | | | | | This doesn't quite work yet, but it illustrates how MRT is implemented in the MFBD: rt_count is set appropriately based on the number of render targets, while additional render target descriptors are appended on with an index variable in them (not quite decoded since there's some aspects we don't understand there, but conceptually this should be right). Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Trace invisible BOsAlyssa Rosenzweig2019-07-181-1/+5
| | | | | | | Helps make the decode a little more readable (names instead of addresses). Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost/decode: Preserve empty tiler heap symmetryAlyssa Rosenzweig2019-07-181-5/+13
| | | | | | | If tiler_heap_end == tiler_heap_start, ensure it's printed the same rather than one erroring out as hex. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Zero polygon list body size for clearsAlyssa Rosenzweig2019-07-181-0/+4
| | | | | | | There's no polygons, so you can't have any size to the polygon list, although there is a minimal header. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost/mfbd: Unify depth-only with masked FBO pathAlyssa Rosenzweig2019-07-181-22/+24
| | | | Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Simplify set_framebuffer_stateAlyssa Rosenzweig2019-07-181-35/+9
| | | | | | Most of the ad hoc logic is already in Gallium. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Check for NULL surface in placesAlyssa Rosenzweig2019-07-185-5/+14
| | | | | | | | | | Fixes a bunch of NULL dereferences, although it does cause GPU faults of course. This is caused by color buffers masked out in MRT, which we'll eventually have to solve the right way... one thing at a time. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Expose 4 render targetsAlyssa Rosenzweig2019-07-181-2/+2
| | | | | | Hidden behind deqp flag as usual. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Shrink tiler heapAlyssa Rosenzweig2019-07-181-1/+1
| | | | | | | 128MB is excessive and 16MB is still plenty. Saves 112MB/context on kernels without growable/heap support. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* nir/large_constants: De-duplicate constantsCaio Marcelo de Oliveira Filho2019-07-181-21/+75
| | | | | | | | | | | | | | | | | | | | | If a function has a constant and is called more than once, after inlining we may end up with different variables representing the same constant. This commit look into the data and de-duplicate them. The first pass now will collect the constant data in a per variable buffer, then de-duplication happens (by sorting then linear walk), and the second pass will use the data in var->data.location. One side-effect of the current implementation is that constants will be reordered. If this turns out to be a problem is something that can be fixed. An alternative strategy considered was to perform this in a per-function basis and then merge the results, the problem is that we would have to fix up the offsets during the merge. Given the data we have, the current patch is good enough. Reviewed-by: Jason Ekstrand <[email protected]>
* nir/large_constants: Use ralloc for var_infosCaio Marcelo de Oliveira Filho2019-07-181-3/+3
| | | | | | | | This will be used later on to allocate constant data for each variable (and then deduplicate). Also drop initializing found_read, as it is already implicitly false in the literal. Reviewed-by: Jason Ekstrand <[email protected]>
* freedreno: Convert nir_lower_tg4_to_tex to the NIR lowering helper.Eric Anholt2019-07-181-88/+51
| | | | | | Cuts a bunch of boilerplate. Reviewed-by: Kristian H. Kristensen <[email protected]>
* freedreno: Convert load_barycentric_at_sample to the NIR lowering helper.Eric Anholt2019-07-181-48/+30
| | | | | | Cuts out a ton of boilerplate. Reviewed-by: Kristian H. Kristensen <[email protected]>
* freedreno: Convert load_barycentric_at_offset to the NIR lowering helper.Eric Anholt2019-07-181-39/+19
| | | | | | Cuts out a ton of boilerplate. Reviewed-by: Kristian H. Kristensen <[email protected]>
* v3d: Use nir_shader_lower_instructions() for txf_ms lowering.Eric Anholt2019-07-181-26/+16
| | | | | | Cuts out a bunch of boilerplate. Reviewed-by: Iago Toral Quiroga <[email protected]>
* nir: Allow internal changes to the instr in nir_shader_lower_instructions().Eric Anholt2019-07-182-1/+11
| | | | | | | | | v3d's NIR txf_ms lowering wants to swizzle around the input coordinates in NIR, but doesn't generate a new txf_ms instructions as replacement. It's pretty easy to allow that in nir_shader_lower_instructions, and it may be common in lowering passes. Reviewed-by: Jason Ekstrand <[email protected]>
* vc4: Convert vc4_nir_lower_txf_ms to nir_shader_lower_instructions().Eric Anholt2019-07-181-32/+13
| | | | | | Cuts out a bunch of boilerplate. Reviewed-by: Iago Toral Quiroga <[email protected]>
* v3d: Fix assertion failures in debug builds.Eric Anholt2019-07-181-0/+2
| | | | | | | | | nir_lower_io leaves around deref_var instructions after lowering away deref intrinsics. This ends up breaking validation after v3d_nir_lower_io removes variables not actually being stored by the shader's store_output()s. Reviewed-by: Iago Toral Quiroga <[email protected]>
* panfrost: Handle Z24 texturesAlyssa Rosenzweig2019-07-181-1/+1
| | | | | | Just use the Z32 code. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost/ci: Update expectationsAlyssa Rosenzweig2019-07-181-14/+0
| | | | | | We just fixed some stencil tests. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Make scissor test more robustAlyssa Rosenzweig2019-07-181-8/+15
| | | | | | See v3d implementation. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Use correct NO_DITHER field on MFBDAlyssa Rosenzweig2019-07-183-1/+9
| | | | Signed-off-by: Alyssa Rosenzweig <[email protected]>