summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* nir: remove fnot/fxor/fand/for opcodesJonathan Marek2019-06-269-40/+4
| | | | | | | | | | There doesn't seem to be any reason to keep these opcodes around: * fnot/fxor are not used at all. * fand/for are only used in lower_alu_to_scalar, but easily replaced Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* nir: opt_vectorize: combine different constant sourcesJonathan Marek2019-06-261-2/+25
| | | | | | | | We can vectorize instructions with different constant sources by creating a new load_const and using that. Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]>
* panfrost/midgard: Merge embedded constantsAlyssa Rosenzweig2019-06-261-19/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Midgard, a bundle consists of a few ALU instructions. Within the bundle, there is room for an optional 128-bit constant; this constant is shared across all instructions in the bundle. Unfortunately, many instructions want a 128-bit constant all to themselves (how selfish!). If we run out of space for constants in a bundle, the bundle has to be broken up, incurring a performance and space penalty. As an optimization, the scheduler now analyzes the constants coming in per-instruction and attempts to merge shared components, adjusting the swizzle accessing the bundle's constants appropriately. Concretely, given the GLSL: (a * vec4(1.5, 0.5, 0.5, 1.0)) + vec4(1.0, 2.3, 2.3, 0.5) instead of compiling to the naive two bundles: vmul.fmul [temp], [a], r26 fconstants 1.5, 0.5, 0.5, 1.0 vadd.fadd [out], [temp], r26 fconstants 1.0, 2.3, 2.3, 0.5 The scheduler can now fuse into a single (pipelined!) bundle: vmul.fmul [temp], [a], r26.xyyz vadd.fadd [out], [temp], r26.zwwy fconstants 1.5, 0.5, 1.0, 2.3 Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost/midgard: Share swizzle composeAlyssa Rosenzweig2019-06-262-8/+30
| | | | Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost/midgard: Share swizzle/mask codeAlyssa Rosenzweig2019-06-262-30/+32
| | | | Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Fix checksumming typoAlyssa Rosenzweig2019-06-261-1/+1
| | | | | Fixes: 3e6c6bb0 ("panfrost: Merge checksum buffer with main BO") Signed-off-by: Alyssa Rosenzweig <[email protected]>
* iris: Fix overzealous query object batch flushing.Kenneth Graunke2019-06-261-4/+4
| | | | | | | | | | | | | | | | | | | | | | In the past, each query object had their own BO. Checking if the batch referenced that BO was an easy way to check if commands were still queued to compute the query value. If so, we needed to flush. More recently (c24a574e6c), we started using an u_upload_mgr for query objects, placing multiple queries in the same BO. One side-effect is that iris_batch_references is a no longer a reasonable way to check if commands are still queued for our query. Ours might be done, but a later query that happens to be in the same BO might be queued. We don't want to flush in that case. Instead, check if the current batch's signalling syncpt is the one we referenced when ending the query. We know the syncpt can't have been reused because our query is holding a reference, so a simple pointer comparison should suffice. Removes all batch flushing caused by query objects in Shadow of Mordor. Reviewed-by: Chris Wilson <[email protected]>
* iris: Make an iris_batch_get_signal_syncpt() helper.Kenneth Graunke2019-06-261-3/+14
| | | | | | | This returns a pointer to the signalling syncpt, without incrementing the reference count. This can be useful for comparisons. Reviewed-by: Chris Wilson <[email protected]>
* panfrost: Remove unneeded check in panfrost_scissor_culls_everything()Boris Brezillon2019-06-261-1/+1
| | | | | | | | The ss local var is guaranteed to be != NULL. Get rid of this useless check. Signed-off-by: Boris Brezillon <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Update copyright identifiersAlyssa Rosenzweig2019-06-2614-14/+14
| | | | | | | "Collabora, Ltd." should be listed in lieu of simply "Collabora" Signed-off-by: Alyssa Rosenzweig <[email protected]> Suggested-by: Daniel Stone <[email protected]>
* panfrost/midgard: Reorder to permit constant biasAlyssa Rosenzweig2019-06-262-67/+61
| | | | Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost/midgard: Add helper to encode constant biasAlyssa Rosenzweig2019-06-261-0/+34
| | | | Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost/midgard: Handle negative immediate biasAlyssa Rosenzweig2019-06-262-4/+5
| | | | Signed-off-by: Alyssa Rosenzweig <[email protected]>
* freedreno: correct batch_depends_on() logicRob Clark2019-06-261-1/+1
| | | | Signed-off-by: Rob Clark <[email protected]>
* freedreno: drop unused arg from fd_batch_flush()Rob Clark2019-06-2612-23/+23
| | | | | | | The `force` arg has been unused for a while.. but apparently I forgot to garbage collect it. Signed-off-by: Rob Clark <[email protected]>
* st/glsl: fix silly regression finding gs/tes variantsTimothy Arceri2019-06-261-1/+1
| | | | | | Fixes: d19fe5e67a39 ("st/glsl: support clamping color outputs in compat for gs/tes") Reviewed-by: Ilia Mirkin <[email protected]>
* st/glsl: support clamping color outputs in compat for gs/tesTimothy Arceri2019-06-264-13/+60
| | | | | | | This support requires the driver to be a NIR driver as we use the NIR lowering pass to do the clamping. Reviewed-by: Kenneth Graunke <[email protected]>
* nir: add tess support to nir_lower_clamp_color_outputs()Timothy Arceri2019-06-261-0/+1
| | | | | | | This will be used to add compat profile support for higher GL versions. Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Fix round64 conversion functionSagar Ghuge2019-06-251-9/+12
| | | | | | | | | | | | | | | | | | | | Fix round64 function to handle round to nearest even cases specially with positive and negative numbers with fraction part 0.5. v2: 1) Simplify unused bits (Elie Tournier) Fixes: KHR-GL45.gpu_shader_fp64.builtin.round_dvec2 KHR-GL45.gpu_shader_fp64.builtin.round_dvec3 KHR-GL45.gpu_shader_fp64.builtin.round_dvec4 KHR-GL45.gpu_shader_fp64.builtin.roundeven_double KHR-GL45.gpu_shader_fp64.builtin.roundeven_dvec2 KHR-GL45.gpu_shader_fp64.builtin.roundeven_dvec3 KHR-GL45.gpu_shader_fp64.builtin.roundeven_dvec4 Signed-off-by: Sagar Ghuge <[email protected]> Reviewed-by: Elie Tournier <[email protected]> Acked-by: Anuj Phogat <[email protected]>
* panfrost/ci: Add RK3288 flipflops I don't want to deal with right nowAlyssa Rosenzweig2019-06-251-0/+6
| | | | Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost/ci: Update failures listAlyssa Rosenzweig2019-06-251-363/+3
| | | | | | | | A ton of tests were fixed by this series. A few were incorrectly passing before (QualityError, for instance) and now are explicitly failing. A few legitimate regressions but overwhelmingly positive. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost/ci: Set MESA_GLES_VERSION_OVERRIDE=3.0Alyssa Rosenzweig2019-06-251-0/+1
| | | | | | | | Fixes cube map tests due to disagreements between Mesa, dEQP, and the spec... Signed-off-by: Alyssa Rosenzweig <[email protected]> Cc: Tomeu Vizoso <[email protected]>
* panfrost/ci: Run full set of mipmap testsAlyssa Rosenzweig2019-06-251-3/+0
| | | | Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Advertise support for other 8-bit UNORM formatsAlyssa Rosenzweig2019-06-251-26/+15
| | | | Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Use pipe_surface->format directly in blitterAlyssa Rosenzweig2019-06-251-1/+1
| | | | Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Invert swizzle for renderingAlyssa Rosenzweig2019-06-251-2/+30
| | | | | | Fixes rendering to e.g. alpha textures. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Honour first_layer...last_layer when samplingAlyssa Rosenzweig2019-06-251-1/+3
| | | | Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Use the sampler_view target (not the textures)Alyssa Rosenzweig2019-06-251-2/+2
| | | | | | | u_blitter gets "special treatment" and uses this mechanism to cast cube maps to 2D textures in order to texelFetch them. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost/midgard: Assert guard texelFetch against cubemapsAlyssa Rosenzweig2019-06-251-0/+3
| | | | Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Zero pixels in any axis is zero pixels totalAlyssa Rosenzweig2019-06-251-1/+1
| | | | | | Multiplication, not addition, so switch the logic operator. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Respect mip level when wallpaperingAlyssa Rosenzweig2019-06-251-1/+7
| | | | | | | Fixes DATA_INVALID_FAULT raised when wallpapering while rendering to a mipmap. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost/midgard: Fixup NIR texture opAlyssa Rosenzweig2019-06-251-0/+8
| | | | | | | In a vertex shader, a tex op should map to txl, as there *must* be a LOD given to the hardware (implicitly or explicitly). Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Support (non-)seamless cube mapsAlyssa Rosenzweig2019-06-253-4/+5
| | | | | | | Identify the seamless cubemap bit and passthrough the Gallium state rather than setting unconditionally. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Merge checksum buffer with main BOAlyssa Rosenzweig2019-06-255-47/+64
| | | | | | | | This is similar to the AFBC merge; now all (non-imported) buffers use a common backing buffer. Reenables checksumming, eliminating a performance regression. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost/decode: Limit MRT blend countAlyssa Rosenzweig2019-06-251-3/+8
| | | | | | | I thought I already fixed this. Maybe that was a dream...? Then again, I might be dreaming now. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Clamp tile coordinates before job submissionAlyssa Rosenzweig2019-06-251-0/+20
| | | | | | | Fixes TILE_RANGE_FAULT raised on some tests in dEQP-GLES3.functional.fbo.blit.* Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Use dedicated u_blitter context for wallpapersAlyssa Rosenzweig2019-06-253-19/+35
| | | | | | | | | | The main ctx->blitter instance should be reserved for blits originated from Gallium (like mipmap generation). Since wallpapering is conceptually different -- wallpaper blits can be triggered by Gallium blits -- the blitter pipes must be separate to avoid potential u_blitter recursion. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Sanity check layerAlyssa Rosenzweig2019-06-251-0/+1
| | | | | | | It doesn't make sense to try to render to multiple array elements at once. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Divide array_size by 6 for cubemapsAlyssa Rosenzweig2019-06-251-0/+1
| | | | | | | Addresses the disparity between Mali and Gallium definitions of array_size. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Use get_texture_address for framebuffer computationsAlyssa Rosenzweig2019-06-254-25/+28
| | | | | | | Allows for sharing some code as well as theoretically allowing cubemap rendering. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Merge AFBC slab with BO backingAlyssa Rosenzweig2019-06-255-91/+46
| | | | | | | | | | | | | | | Rather than tracking AFBC memory "specially", just use the same codepath as linear and tiled. Less things to mess up, I figure. This allows us to use the standard setup_slices() call with AFBC resources, allowing mipmapped AFBC resources. Unfortunately, we do have to disable AFBC (and checksumming) in the meantime to avoid functional regressions, as we don't know _a priori_ if we'll need to access a resource from software (which is not yet hooked up with AFBC) and we don't yet have routines to switch the layout of a BO at runtime. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Z/S can't be tiledAlyssa Rosenzweig2019-06-251-0/+3
| | | | | | | | As far as we know, Utgard-style tiling only works for color render targets, not depth/stencil, so ensure we don't try to tile it (rather than compress or plain old linear) and drive ourselves into a corner. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Enable mipmappingAlyssa Rosenzweig2019-06-251-1/+1
| | | | | | | Now the autogeneration of mipmaps is working (via u_blitter), we can finally enable mipmaps! Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Enable blittingAlyssa Rosenzweig2019-06-251-4/+0
| | | | | | | Now that all the prerequisites breaking u_blitter are fixed, we can finally hook up panfrost_blit. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Allow texelFetch for wallpaper blitsAlyssa Rosenzweig2019-06-251-3/+1
| | | | | | We just implemented the routine; we may as well use it. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost/midgard: Implement texelFetch (2D only)Alyssa Rosenzweig2019-06-251-6/+35
| | | | | | | | txf instructions can result from blits, so handle them rather than crash. Only works for 2D textures (not even 2D array texture) due to a register allocation constraint that may not be sorted for a while. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Skip flushes only for wallpapers, not any blitAlyssa Rosenzweig2019-06-251-1/+1
| | | | | | | We need the flush from u_blitter for a normal blit (e.g. for mipmaps); it's only wallpaper-related blits that are special-cased. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Handle generate_mipmap ourselvesAlyssa Rosenzweig2019-06-252-0/+55
| | | | | | | | | | | | | To avoid interference with the wallpaper code, we need to do some state tracking when generating mipmaps. In particular, we need to mark the generated layers as invalid before generating the mipmap, so we don't try to backblit them if they already had content. Likewise, we need to flush both before and after generating a mipmap since our usual set_framebuffer_state flushing isn't quite there yet. Ideally better optimizations would save the flush but I digress. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Disable mipmapping if necessaryAlyssa Rosenzweig2019-06-251-0/+16
| | | | | | | | If a mipfilter is not set, it's legal to have an incomplete mipmap; we should handle this accordingly. An "easy way out" is to rig the LOD clamps. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* intel/blorp: Disable sampler state prefetching on Gen11Kenneth Graunke2019-06-251-0/+4
| | | | | | | | | | | | | | | Sampler state prefetching is broken on Gen11, and WA_160668216 says to disable it. Apparently sampler state prefetching also has basically zero impact on performance, so we don't need to worry there. i965, anv, and iris already handle this correctly, but we missed BLORP. Ideally the kernel should globally disable this by writing SARCHKMD, at which point we wouldn't have to worry about it. But let's be defensive and handle it ourselves too. v2: separate out from BTP workaround in case we change that eventually Reviewed-by: Anuj Phogat <[email protected]> [v1]