summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc5
Commit message (Collapse)AuthorAgeFilesLines
* broadcom/vc5: Add partial transform feedback query support.Eric Anholt2017-11-073-17/+64
| | | | | | We have to compute the queries in software, so we're counting the primitives by hand. We still need to make sure to not increment the PRIMITIVES_EMITTED if we overflowed, but leave that for later.
* broadcom/vc5: Add occlusion query support.Eric Anholt2017-11-076-20/+121
| | | | Fixes all of piglit's OQ tests.
* broadcom/vc5: Skip emitting textures that aren't used.Eric Anholt2017-11-071-2/+4
| | | | | Fixes crashes when ARB_fp uses texture[1] but not 0, as in piglit's fp-fragment-position.
* broadcom/vc5: Add missing SRGBA8 ETC2 support.Eric Anholt2017-11-071-0/+1
| | | | Fixes piglit oes_compressed_etc2_texture-miptree srgb8-alpha8.
* broadcom/vc5: Disable early Z test when the FS writes Z.Eric Anholt2017-11-071-1/+2
| | | | Fixes piglit early-z.
* broadcom/vc5: Shift the min/max lod fields by the BASE_LEVEL.Eric Anholt2017-11-072-4/+15
| | | | | | | | The lod clamping is what limits you between base and last level, and the base level field is just there to help decide where the min/mag change happens. Fixes tex-miplevel-selection GL2:texture()
* broadcom/vc5: Add support for anisotropic filtering.Eric Anholt2017-11-071-0/+9
|
* broadcom/vc5: Fix mipmap filtering enums.Eric Anholt2017-11-071-6/+8
| | | | | | | | The ordering of the values was even less obvious than I thought, with both the mip filter and the min filter being in different bits depending on whether the mip filter is none. Fixes piglit fs-textureLod-miplevels.shader_test
* broadcom/vc5: Fix height padding of small UIF slices.Eric Anholt2017-11-071-1/+5
| | | | | | | | The HW doesn't pad the slice's height to make a full 4x4 group of UIF blocks. We just need to pad to columns, and the start of the next column appears in the bottom of the previous column's last block. Fixes piglit fs-textureOffset-2D.
* broadcom/vc5: Print the actual offsets in HW for our resource layout debug.Eric Anholt2017-11-071-34/+55
| | | | | The alignment of level 0 is non-obvious, so it's hard to turn a faulting address into a slice without this.
* broadcom/vc5: Set the available VS outputs to match the FS inputs.Eric Anholt2017-11-071-1/+4
| | | | Fixes piglit glsl-es-3.00/minimum-maximums.txt.
* broadcom/vc5: Set the max texture LOD bias.Eric Anholt2017-11-071-1/+1
| | | | | The field is signed 8.8, so the usual 16.0f fits. Fixes piglit gl-2.1-minmax.
* broadcom/vc5: Fix translation of stencil ops.Eric Anholt2017-11-072-8/+30
| | | | | They aren't quite in the same order as the gallium defines. Fixes piglit gl-2.0-two-sided-stencil.
* broadcom/vc5: Move stencil state packing to the CSO.Eric Anholt2017-11-073-27/+47
| | | | Only the stencil ref comes in as dynamic state at emit time.
* broadcom/vc5: Introduce a helper for pre-packing our V3DXX structs.Eric Anholt2017-11-072-165/+155
| | | | | | This is so much more pleasant to write than the manual V3D33_whatever_pack() calls, and will be useful for when we start doing actual per-V3D compiles.
* broadcom/vc5: Add a cl_emit() variant for merging with a pre-packed struct.Eric Anholt2017-11-072-19/+29
| | | | Cleans up the hand-written code, at the cost of another ugly macro.
* broadcom/vc5: Skip emitting depth offset while disabled.Eric Anholt2017-11-071-1/+4
| | | | | The enable flag is also in the rasterizer state, so it will be emitted once it's needed.
* broadcom/vc5: Don't emit stencil config if not doing stencil test.Eric Anholt2017-11-071-1/+2
| | | | | | As with blending, we'll have the bit flagged again when it gets reenabled in CONFIGURATION_BITS, so there's no need to emit test state if we're not testing.
* broadcom/vc5: Don't emit updated blend factors/funcs while disabled.Eric Anholt2017-11-071-1/+5
| | | | | The dirty bit will be flagged again when re-enbaled. Keeps us from emitting blend state in CLs that never do blending.
* broadcom/vc5: Make sure the TMU indirect struct is appropriately aligned.Eric Anholt2017-11-071-0/+2
| | | | | I was hoping that this would help with fbo-generatemipmap hangs, but no luck.
* broadcom/vc5: Use DEPTH24_STENCIL8 for rendering to depth-only textures.Eric Anholt2017-11-071-1/+1
| | | | | | | | | The HW puts the pad bits at the top for DEPTH_COMPONENT24, but we need it at the bottom for texturing. Using the format with stencil probably means we won't be able to do Z24 and separate S8, but I wasn't planning on supporting that anyway. Fixes hiz-depth-read-fbo-d24-s0
* gallium: add PIPE_CAP_SIGNED_VERTEX_BUFFER_OFFSETMarek Olšák2017-11-061-0/+1
|
* gallium: add cap for driver specified max combined shader resources.Dave Airlie2017-11-011-0/+1
| | | | | | | | Some hw (evergreen) has a limit on how many combined (images/buffers/mrts) a fragment shader can access. Reviewed-by: Ilia Mirkin <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* broadcom/vc5: Force blending to treat alpha as 1 for formats without alpha.Eric Anholt2017-10-303-7/+27
| | | | | | | Fixes fbo-blending-formats on RGB8 and 565. We will still need to demote blending to shader code in the MRT case to fix it in general, but that can be added when we start doing 32F blending (which also needs to be done in the shader).
* broadcom/vc5: Do BGRA vs RGBA swapping for the BLEND_CONSTANT_COLOR.Eric Anholt2017-10-304-11/+30
| | | | Fixes many of the fbo-blending-formats tests.
* broadcom/vc5: Pack clear colors according to the TLB internal format/type.Eric Anholt2017-10-302-10/+49
| | | | | | | | | | The previous packing I did got us all the R*16F and R*32F formats, where the pipe format basically matched the TLB's format, but since the clear color will just be memcpyed to the TLB, we should be looking at its format for deciding how to pack. Fixes RGB565, RGB5_A1 and RGBA10 fbo-clear-formats tests and improves 4444.
* broadcom/vc5: Don't do r/b channel swapping on 565.Eric Anholt2017-10-301-1/+7
| | | | The HW's format actually matches the gallium format.
* broadcom/vc5: Use the proper gallium format for our RGB10_A2.Eric Anholt2017-10-301-1/+1
| | | | This keeps us from needing our own reswizzling of the B vs R fields.
* broadcom/vc5: Drop duplicated setup of clip_window_height_in_pixels.Eric Anholt2017-10-301-1/+0
|
* broadcom/vc5: Don't forget to actually turn on stencil testing.Eric Anholt2017-10-301-0/+3
| | | | | I had the rest of stencil state set up, but forgot to actually enable it in the higher level configuration bits packet.
* broadcom/vc5: Set up MSAA texture type according to the internal format.Eric Anholt2017-10-302-2/+39
| | | | | It gets most of EXT_framebuffer_multisample-formats passing, but doesn't really work for texture views.
* broadcom/vc5: Use the sampler view's format, not the resource's.Eric Anholt2017-10-303-8/+1
| | | | | This should help with texture views, though I just noticed this while reading the code.
* broadcom/vc5: Emit raw loads for MSAA buffers.Eric Anholt2017-10-301-0/+58
| | | | | Similar to stores, but we also need to emit dummy stores in between each load, to flush out the previous queued load.
* broadcom/vc5: Use raw stores for MSAA buffers.Eric Anholt2017-10-301-15/+97
| | | | | | | | | | | We were storing the resolved pixels in all cases, but nr_samples > 0 means we should be keeping the per-sample values. We will probably want to change the job structure at some point, as we'll want to recognize full-buffer resolves and do the resolved store in the same job as the original rendering, meaning we'll need to track both the MSAA and single-sample resources in the job. However, this will be enough to build the rest of the MSAA support.
* broadcom/vc5: Add lowering for txf_ms to a txf on a 2x2-scaled texture.Eric Anholt2017-10-301-2/+0
| | | | | | | | | The HW has no native sampler support for multisample textures, but since we only need to support txf_ms and the layout is UIF, we just need to scale up the texcoords and then add in the sample. This drops the old TEXTURE_MSAA_ADDR special uniform, since we're treating MSAA textures as textures, rather than basically texbos like VC4 had to.
* broadcom/vc5: Lay out MSAA textures/renderbuffers as UIF scaled by 4.Eric Anholt2017-10-302-14/+37
| | | | | | We just need to multiply width/height by 2 each, and always set them up as UIF tiling, since that's how the TLB will store them in raw (per-sample) mode.
* broadcom/vc5: Add PIPE_TEX_WRAP_CLAMP support for linear-filtered textures.Eric Anholt2017-10-301-2/+6
| | | | | | I already had the texture's wrapping set up to use different behavior for nearest or linear, so we just needed to saturate the coordinates in linear mode to get the "proper" blend between the edge and border values.
* broadcom/vc5: Disable GL_ARB_transform_feedback3.Eric Anholt2017-10-301-1/+1
| | | | We don't seem to have a way to generally handle gl_SkipComponents.
* broadcom/vc5: Fix gl_FragCoord pixel center setup.Eric Anholt2017-10-301-3/+4
| | | | Fixes glsl-arb-fragment-coord-conventions.
* broadcom/vc5: Always set up 1D textures as raster order.Eric Anholt2017-10-301-0/+5
| | | | | | 1D is the exception to "all V3D textures are tiled", since tiling 1D textures would just waste memory and cache space. This ended up being a problem once we started actually marking 1D textures as 1D instead of 2D.
* broadcom/vc5: Fix GPU hang with no vertex elements used by the VS.Eric Anholt2017-10-301-4/+24
| | | | | | Like VC4, we need to at least have one element set up, but unlike VC4 it seems we don't need to read it to keep the HW happy. Fixes GPU hangs with glsl-no-vertex-attribs.shader_test.
* broadcom/vc5: Fix pasteo that broke vertex texturing.Eric Anholt2017-10-201-1/+1
| | | | | We weren't ever filling in the texture state record, so we'd dereference NULL from the shader.
* broadcom/vc5: Move default attribute value setup to the CSO and fix them.Eric Anholt2017-10-203-29/+23
| | | | | | | | | I was generating some stub values to bring the driver up, but fill them in properly now. We now set 1.0 or 1u as appropriate, and thanks to being in their own BO it fixes piglit failures on the 7268 (where our 4-byte alignment was insufficient). Fixes const-packHalf2x16.shader_test
* broadcom/vc5: Move most of the shader state attribute record to the CSO.Eric Anholt2017-10-204-65/+90
| | | | | This should reduce our draw-time overhead, and puts the code where it should go long term.
* broadcom/vc5: Fix build failure frm nir_shader::stage removal.Eric Anholt2017-10-201-4/+4
| | | | Fixes: 59fb59ad54d3 ("nir: Get rid of nir_shader::stage")
* meson: Add support for the vc5 driver.Eric Anholt2017-10-171-0/+65
| | | | | | | v2: Default vc5 to off, since it requires the simulator currently. Add missing dep on the XML generation from libbroadcom_vc5. Reviewed-by: Dylan Baker <[email protected]> (v1)
* broadcom/vc5: Don't forget to set the RT format for 1555 textures.Eric Anholt2017-10-171-2/+2
| | | | Fixes dEQP-GLES3.functional.fbo.completeness.renderable.texture.color0.rgb5_a1
* broadcom/vc5: Remove the u_resource_vtbl usage.Eric Anholt2017-10-123-25/+18
| | | | Like for vc4, this was just a wasted indirection.
* broadcom/vc5: Fix handling of 5551 textures using the new gallium format.Eric Anholt2017-10-101-2/+2
| | | | | Like vc4, we have the alpha in the low bit. Fixes a bunch of piglit texwrap failures.
* broadcom/vc5: Set the RCL's MSAA mode to match the BCL's MSAA state.Eric Anholt2017-10-101-0/+2
|