aboutsummaryrefslogtreecommitdiffstats
path: root/src/broadcom/cle
Commit message (Collapse)AuthorAgeFilesLines
* meson: use gnu_symbol_visibility argumentDylan Baker2020-06-011-1/+2
| | | | | | | | | | This uses a meson builtin to handle -fvisibility=hidden. This is nice because we don't need to track which languages are used, if C++ is suddenly added meson just does the right thing. Acked-by: Matt Turner <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4740>
* v3d/packet: fixing TMU_Config_Parameter_2 definitionAlejandro Piñeiro2020-04-221-3/+3
| | | | | | | | v41 interchanged the size and start values for the Padding, and it seems that v42 inherited it when adding the LOD Query bit. Reviewed-by: Eric Anholt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4677>
* meson: inline `inc_common`Eric Engestrom2020-03-281-1/+1
| | | | | | | | | Let's make it clear what includes are being added everywhere, so that they can be cleaned up. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4360>
* v3d: add 1-way SIMD packing definitionIago Toral Quiroga2019-12-161-0/+1
| | | | | | | According to the documentation, the 1-way dispatch width is only supported with geometry shaders. Reviewed-by: Alejandro Piñeiro <[email protected]>
* v3d: fix packet descriptions for geometry and tessellation shadersIago Toral Quiroga2019-12-161-10/+30
| | | | | | | | | | | | | | | | | | | | Every code address starts at bit 3 (addresses must be 64-bit aligned), with the first 3 bits used to specify threading and NaN propagation parameters for the shader program. We generally skip "reserved" bits, however, doing this when the reserved field is the last in a struct and it is large enough can make us compute incorrect (smaller) struct sizes which can lead to corrupt CLs. In particular, the "Tess/Geom Common Params" struct has a reserved field at the end that is 8-bit, so if we don't include this we compute a packet size that is 1 byte smaller than it shold, making the next packet we emit start 1 byte earlier and therefore leading to incorrect CL data from that point forward. The name of one of the fields was not correct. Reviewed-by: Alejandro Piñeiro <[email protected]>
* meson/broadcom: libbroadcom_cle also needs zlibDylan Baker2019-12-111-1/+1
| | | | | | Fixes: 1ae8018a6af81eec4832a57d9d0346aa3dd98d28 ("meson: Add support for the vc4 driver.") Reviewed-by: Eric Anholt <[email protected]>
* meson/broadcom: libbroadcom_cle needs expat headersDylan Baker2019-12-101-1/+1
| | | | | | Fixes: 1ae8018a6af81eec4832a57d9d0346aa3dd98d28 ("meson: Add support for the vc4 driver.") Reviewed-by: Eric Anholt <[email protected]>
* v3d: fix empty-body instructionEric Engestrom2019-10-271-1/+1
| | | | | | | Fixes: 8d43e2b2ded0fe3c82d4 ("meson: add -Werror=empty-body to disallow `if(x);`") Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* broadcom: document known hardware issues for L2T flush commandIago Toral Quiroga2019-10-181-0/+35
| | | | | Suggested-by: Eric Anholt <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* broadcom/genxml: Stop manually scrubbing 'α' -> "alpha"Kenneth Graunke2019-09-231-1/+0
| | | | | | | 'α' has never appeared in any genxml files, so there's no need to replace it with the word "alpha". Reviewed-by: Eric Anholt <[email protected]>
* v3d: use the GPU to record primitives written to transform feedbackIago Toral Quiroga2019-08-081-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can use the PRIMITIVE_COUNTS_FEEDBACK packet to write various primitive counts to a buffer, including the number of primives written to transform feedback buffers, which will handle buffer overflow correctly. There are a couple of caveats with this: Primitive counters are reset when we emit a 'Tile Binning Mode Configuration' packet, which can happen in the middle of a primitives query, so we need to read the buffer when we submit a job and accumulate the counts in the context so we don't lose them. We also need to do the same when we switch primitive type during transform feedback so we can compute the correct number of recorded vertices from the number of primitives. This is necessary so we can provide an accurate vertex count for draw from transform feedback. v2: - When computing the number of vertices for a primitive, pass in the base primitive, since that is what the hardware will count. - No need to update primitive counts when switching primitive types if the base primitives are the same. - Log perf warning when mapping the primitive counts BO for readback (Eric). - Only emit the primitive counts packet once at job end (Eric). - Use u_upload mechanism for the primitive counts buffer (Eric). - Use the XML to generate indices into the primitive counters buffer (Eric). Fixes piglit tests: spec/ext_transform_feedback/overflow-edge-cases spec/ext_transform_feedback/query-primitives_written-bufferrange spec/ext_transform_feedback/query-primitives_written-bufferrange-discard spec/ext_transform_feedback/change-size base-shrink spec/ext_transform_feedback/change-size base-grow spec/ext_transform_feedback/change-size offset-shrink spec/ext_transform_feedback/change-size offset-grow spec/ext_transform_feedback/change-size range-shrink spec/ext_transform_feedback/change-size range-grow spec/ext_transform_feedback/intervening-read prims-written Reviewed-by: Eric Anholt <[email protected]>
* v3d: add header guards in v3d_packet_helpers.hIago Toral Quiroga2019-08-081-0/+4
| | | | Reviewed-by: Eric Anholt <[email protected]>
* tree-wide: replace MAYBE_UNUSED with ASSERTEDEric Engestrom2019-07-311-1/+1
| | | | | | Suggested-by: Jason Ekstrand <[email protected]> Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* v3d: tweak initial comment on pack generator scriptAlejandro Piñeiro2019-07-121-1/+1
| | | | | | | As the files it mentions to use as reference has slightly different names. Reviewed-by: Eric Anholt <[email protected]>
* v3d: Add some more new packets for V3D 4.x.Eric Anholt2019-04-041-0/+131
| | | | The T/G shader references and common state will be needed for GLES 3.2.
* v3d: Bump the maximum texture size to 4k for V3D 4.x.Eric Anholt2019-04-041-2/+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]
* v3d: Fix a release build set-but-unused compiler warning.Eric Anholt2019-01-291-1/+2
|
* v3d: Create separate sampler states for the various blend formats.Eric Anholt2019-01-271-4/+4
| | | | | | | | | | | | The sampler border color is encoded in the TMU's blending format (half floats, 32-bit floats, or integers) and must be clamped to the format's range unorm/snorm/int ranges by the driver. Additionally, the TMU doesn't know about how we're abusing the swizzle to support BGRA, A, and LA, so we have to pre-swizzle the border color for those. We don't really want to spend half a kb on sampler states in most cases, so skip generating the variants when the border color is unused or is 0,0,0,0.
* v3d: Use the symbolic names for wrap modes from the XML.Eric Anholt2019-01-271-5/+5
|
* v3d: Add support for flushing dirty TMU data at job end.Eric Anholt2019-01-141-0/+23
| | | | This will be needed for SSBOs and image_load_store.
* v3d: Add support for draw indirect for GLES3.1.Eric Anholt2018-12-141-0/+39
| | | | | | In trying to enable compute shaders, I found that a bunch of deqp-gles31's compute stuff wanted to interact with indirect dispatch. This was easy to do on its own.
* v3d: Re-use the wrap mode uniform on V3D 3.3.Eric Anholt2018-12-071-24/+4
|
* move u_math to src/utilDylan Baker2018-09-071-1/+1
| | | | | | | | | | | | | | | Currently we have two sets of functions for bit counts, one in gallium and one in core mesa. The ones in core mesa are header only in many cases, since they reduce to "#define _mesa_bitcount popcount", but they provide a fallback implementation. This is important because 32bit msvc doesn't have popcountll, just popcount; so when nir (for example) includes the core mesa header it doesn't (and shouldn't) link with core mesa. To fix this we'll promote the version out of gallium util, then replace the core mesa uses with the util version, since nir (and other non-core mesa users) can and do link with mesautils. Acked-by: Eric Engestrom <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* meson: Build with Python 3Mathieu Bridon2018-08-101-2/+2
| | | | | | | | | | | | Now that all the build scripts are compatible with both Python 2 and 3, we can flip the switch and tell Meson to use the latter. Since Meson already depends on Python 3 anyway, this means we don't need two different Python stacks to build Mesa. Signed-off-by: Mathieu Bridon <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* v3d: Emit the VCM_CACHE_SIZE packet.Eric Anholt2018-08-061-0/+10
| | | | | | | 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: Actually put the "%s" in the snprintf.Eric Anholt2018-08-011-1/+1
| | | | | | | | I missed an important part when porting the change over, fixing my compiler warning but breaking -Werror=format-security. Fixes: e6ff5ac4468e ("v3d: use snprintf(..., "%s", ...) instead of strncpy") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107443
* v3d: use snprintf(..., "%s", ...) instead of strncpyEric Anholt2018-07-311-1/+1
| | | | | Fixes a compiler warning about terminator NUL, based on f836d799f906 ("intel/decoder: use snprintf(..., "%s", ...) instead of strncpy")
* v3d: Use a short, underscored name for packets in CLIF/CL dumping.Eric Anholt2018-07-302-44/+46
| | | | | | | These will match the names that the CLIF parser expects to see. I may in the future decide to change more of the other names so that I match the names the HW/closed SW team uses for their packets, rather than the names in the spec (which only they and I can read anyway).
* v3d: Rename "configuration" and "config" in the XML to "cfg"Eric Anholt2018-07-301-21/+21
| | | | | | This matches what CLIF parsing expects, and makes TILE_BINNING_MODE_CONFIGURATION_COMMON_CONFIGURATION into a much more legible TILE_BINNING_MODE_CFG_COMMON.
* v3d: s/colour/color in the XML.Eric Anholt2018-07-301-19/+19
| | | | | | The CLIF format expects american english spelling, and the rest of Mesa is too. I was previously adhering to the spec's spelling, which is counterproductive.
* v3d: Rename primitives to prims in the XML to match CLIF names.Eric Anholt2018-07-301-7/+7
| | | | This makes us match up with the V3D HW team's names a bit more.
* v3d: Print CLIF fixed-point values as just their decimal value.Eric Anholt2018-07-301-6/+16
| | | | The parser doesn't handle float input, so we have to dump the raw value.
* v3d: When not doing terminal pretty-printing, comment struct field names.Eric Anholt2018-07-301-1/+7
| | | | | The struct field names aren't part of the CLIF ABI, just the order of fields within the struct. The comments are there for human readability.
* v3d: Add pack header support for f187 values.Eric Anholt2018-07-305-7/+29
| | | | | | V3D only has one of these (the top 16 bits of a float32) left in its CLs, but VC4 had many more. This gets us proper pretty-printing of the values instead of a large uint.
* v3d: Skip printing sub-id or pad fields in CLIF dumping.Eric Anholt2018-07-271-0/+8
| | | | | The parser doesn't expect them, so our fields would end up mismatched. They're not really useful in console output, either.
* v3d: Dump fields in CLIF output in increasing offset order.Eric Anholt2018-07-271-0/+14
| | | | | | Previously, we emitted in XML order, which I happen to type in the decreasing offset order of the specifications. However, the CLIF parser wants increasing offsets.
* v3d: Print addresses in CLIFs as references to buffers.Eric Anholt2018-07-272-4/+24
| | | | | | | With CLIFs, the parser will choose an address for the buffer being created, so we need to use effectively relocations to buffers instead of the addresses that the driver uses. This is also a whole lot more intelligible for console output than raw addresses!
* v3d: Stop doing pretty-printed colorful booleans in CLIF output.Eric Anholt2018-07-272-16/+8
| | | | | The parser wants to see a 1 or 0. We can put "true" and "false" in a comment to clarify that it's a boolean and the parser will skip it.
* v3d: Pass the whole clif_dump structure to v3d_print_group().Eric Anholt2018-07-272-4/+6
| | | | | | To generate CLIF files that the v3dv3 simulator can parse, we're going to need to decode addresses, and for that we'll need the vaddr lookup function from the clif structure from within v3d_decoder.
* v3d: Drop the VG support from the XML.Eric Anholt2018-07-271-13/+2
| | | | | | This reflects a change on the HW/closed SW side to drop this unused HW. With it dropped on their side, the CLIF parser no longer expects to find VG fields.
* v3d: Use /* */ instead of () for enum names in CLIF output.Eric Anholt2018-07-271-1/+1
| | | | This lets the comments be ignored by the CLIF parser.
* v3d: CLIF-dump the "Vec size" field as 0 == maximum value.Eric Anholt2018-07-271-0/+2
| | | | | That's what a user should want to see, and what the CLIF parser wants. This should maybe be generalized.
* python: Use range() instead of xrange()Mathieu Bridon2018-07-241-1/+1
| | | | | | | | | | | | | | | | Python 2 has a range() function which returns a list, and an xrange() one which returns an iterator. Python 3 lost the function returning a list, and renamed the function returning an iterator as range(). As a result, using range() makes the scripts compatible with both Python versions 2 and 3. Signed-off-by: Mathieu Bridon <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* v3d: Implement noperspective varyings on V3D 4.x.Eric Anholt2018-07-091-1/+1
| | | | | Fixes a bunch of piglit interpolation tests, and reduces my concern about some MSAA blit shaders with noperspective varyings.
* v3d: Fix typo in dither mode offset.Eric Anholt2018-07-091-1/+1
| | | | | | We weren't using the field yet, so it didn't affect anything. Fixes: c0476d964abb ("v3d: Express dithering mode in the same way that the CLIF parser does.")
* v3d: Emit a TF flush after each draw using TF.Eric Anholt2018-07-021-0/+2
| | | | | This fixes GPU hangs on 7278 in transform feedback tests such as GTF-GLES3.gtf.GL3Tests.transform_feedback2.transform_feedback2_basic
* v3d: Add missing Stream field to transform feedback specs on V3D 4.1.Eric Anholt2018-06-291-1/+8
| | | | | Noticed when trying to CLIF parse a transform feedback job that hangs on HW.
* v3d: Add missing "tri trip or fan" flag in Primitive List Format.Eric Anholt2018-06-291-0/+1
|
* v3d: Fix the shader code address field widths on V3D 4.1+Eric Anholt2018-06-291-3/+3
| | | | | | We were overlapping it with the threadable/nan flags, resulting in incorrect relocations (threadable/nan included in the offset) and wrong ordering in the CLIF files.
* v3d: Add missing "no prim pack" field to the V3D4.1+ GL shader state.Eric Anholt2018-06-291-0/+2
| | | | | It looks like we don't need this flag for anything (not that I'm clear on what it does), but it makes our struct dumping line up with CLIF parsing.