aboutsummaryrefslogtreecommitdiffstats
path: root/src/broadcom/common
Commit message (Collapse)AuthorAgeFilesLines
* v3d: add initial compiler plumbing for geometry shadersIago Toral Quiroga2019-12-161-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Most of the relevant work happens in the v3d_nir_lower_io. Since geometry shaders can write any number of output vertices, this pass injects a few variables into the shader code to keep track of things like the number of vertices emitted or the offsets into the VPM of the current vertex output, etc. This is also where we handle EmitVertex() and EmitPrimitive() intrinsics. The geometry shader VPM output layout has a specific structure with a 32-bit general header, then another 32-bit header slot for each output vertex, and finally the actual vertex data. When vertex shaders are paired with geometry shaders we also need to consider the following: - Only geometry shaders emit fixed function outputs. - The coordinate shader used for the vertex stage during binning must not drop varyings other than those used by transform feedback, since these may be read by the binning GS. v2: - Use MAX3 instead of a chain of MAX2 (Alejandro). - Make all loop variables unsigned in ntq_setup_gs_inputs (Alejandro) - Update comment in IO owering so it includes the GS stage (Alejandro) Reviewed-by: Alejandro Piñeiro <[email protected]>
* v3d: enable debug options for geometry shader dumpsIago Toral Quiroga2019-12-162-10/+12
| | | | Reviewed-by: Alejandro Piñeiro <[email protected]>
* v3d: rename vertex shader key (num)_fs_inputs fieldsIago Toral Quiroga2019-10-311-0/+1
| | | | | | | | | | | | Until now this made sense because we always paired vertex shaders with fragment shaders, but as soon as we implement geometry and tessellation shaders that will no longer be the case, so rename this to (num_)used_outputs. v2: Use 'used_outputs' instead of ns_outputs, which is more explicit (Eric). Reviewed-by: Alejandro Piñeiro <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* broadcom: Move v3d_get_device_info to commonAndreas Bergmeier2019-07-172-0/+85
| | | | In common we can use implementation for Vulkan.
* v3d: Detect the correct number of QPUs and use it to fix the spill size.Eric Anholt2019-04-121-0/+3
| | | | | We were missing a * 4 even if the particular hardware matched our assumption.
* v3d: Add and use a define for the number of channels in a QPU invocation.Eric Anholt2019-04-121-0/+5
| | | | | A shader invocation always executes 16 channels together, so we often end up multiplying things by this magic 16 number. Give it a name.
* v3d: Bump the maximum texture size to 4k for V3D 4.x.Eric Anholt2019-04-041-1/+2
| | | | | | | 4.1 and 4.2 both have the same 16k limit, but it I'm seeing GPU hangs in the CTS at 8k and 16k. 4k at least lets us get one 4k display working. Cc: [email protected]
* vc4: Declare the last cpu pointer as being modified in NEON asm.Emil Velikov2019-01-291-2/+1
| | | | | | | | | | | Earlier commit addressed 7 of the 8 instances available. v2: Rebase patch back to master (by anholt) Cc: Carsten Haitzler (Rasterman) <[email protected]> Cc: Eric Anholt <[email protected]> Fixes: 300d3ae8b14 ("vc4: Declare the cpu pointers as being modified in NEON asm.") Signed-off-by: Emil Velikov <[email protected]>
* vc4: Declare the cpu pointers as being modified in NEON asm.Carsten Haitzler (Rasterman)2019-01-281-18/+15
| | | | | | | | | | | | | Otherwise, the compiler is free to reuse the register containing the input for another call and assume that the value hasn't been modified. Fixes crashes on texture upload/download with current gcc. We now have to have a temporary for the cpu2 value, since outputs must be lvalues. (commit message by anholt) Fixes: 4d30024238ef ("vc4: Use NEON to speed up utile loads on Pi2.")
* vc4: Use named parameters for the NEON inline asm.Carsten Haitzler (Rasterman)2019-01-281-80/+100
| | | | | | | This makes the asm code more intelligible and clarifies the functional change in the next commit. (commit message and commit squashing by anholt)
* v3d: Drop maximum number of texture units down to 16.Eric Anholt2019-01-271-1/+1
| | | | | | This is the GLES 3.2 minmax, and also what the closed source driver does. Avoids hitting OOMs in the CTS's dEQP-GLES3.functional.texture.units.all_units.only_cube.1.
* v3d: Avoid duplicating limits defines between gallium and v3d core.Eric Anholt2019-01-271-0/+41
| | | | | We don't want to pull the compiler into every include in the gallium driver, so just make a new little header to store the limits.
* v3d: Add a "precompile" debug flag for shader-db.Eric Anholt2018-12-292-0/+2
| | | | | | | | | I've been using my apitrace-based shader-db so far, but it's slow (apitrace decompression), intrusive (apitrace windows spamming the screen), and doesn't have much coverage. The original shader-db provides a lot more coverage and compiles faster, at the expense of not having the actual runtime variant key. As v3d has a lot less runtime variation than vc4 did, this tradeoff makes more sense.
* v3d: Add a fallthrough path for utile load/store of 32 byte lines.Eric Anholt2018-12-191-12/+16
| | | | | | Now that V3D has 8 byte per pixel formats exposed, we've got stride==32 utiles to load and store. Just handle them through the non-NEON paths for now.
* vc4: Move the utile load/store functions to a header for reuse by v3d.Eric Anholt2018-12-191-0/+222
| | | | | These implementations of whole-utile load/stores would be the same for v3d, though the layouts of blocks of utiles has changed.
* v3d: Emit the VCM_CACHE_SIZE packet.Eric Anholt2018-08-061-3/+4
| | | | | | | This is needed to ensure that we don't get blocked waiting for VPM space with bin/render overlapping. Cc: "18.2" <[email protected]>
* v3d: Add a separate flag for CLIF ABI output versus human-readable CLs.Eric Anholt2018-07-302-0/+2
| | | | | | A few of the upcoming changes would make the V3D_DEBUG=cl output less readable, so let's make proper CLIF file production be under a separate V3D_DEBUG=clif flag.
* v3d: Add missing always_flush debug flag.Eric Anholt2018-06-191-0/+1
| | | | The #define existed and was checked in the driver.
* android: change include "cutils/log.h" to "log/log.h" on Android API >=26jenny.q.cao2018-05-141-0/+4
| | | | | | | | | There is a compile warning from Android 8 (API version 26) from "include cutils/log.h" warning: "Deprecated: don't include cutils/log.h, use either android/log.h or log/log.h"-W#warnings, Change to include "log/log.h" on Android 8 or later major version to avoid this warning Signed-off-by: jenny.q.cao <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* broadcom/vc5: Add XML for V3D 4.2.Eric Anholt2018-01-271-0/+3
|
* broadcom/vc5: Introduce v3dx_macros.h and v3dx_pack.h headers.Eric Anholt2018-01-121-0/+45
| | | | | This will be used by vc5 for prefixing functions and including the pack header in v3d-version-dependent code, following the model of anv.
* broadcom: Introduce a v3d_debug.h header for vc5 and broadcom Vulkan.Eric Anholt2017-10-102-0/+171
| | | | | | | Unlike vc4, where the compiler and gallium driver live together, for vc5 the compiler will live up in the shared broadcom directory, and need access to the debug flags. Define a set of debug flags and helpers there, so it can be shared between compiler, vc5, and vulkan.
* broadcom: Introduce a header for talking about chip revisions.Eric Anholt2017-07-131-0/+39
This will be used by the VC5 driver and various shared VC4/VC5 tooling, like the XML decoder.