summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc4
Commit message (Collapse)AuthorAgeFilesLines
* vc4: Switch from errx() to fprintf() and abort().Eric Anholt2014-09-252-8/+15
| | | | | | | | These are pretty catastrophic, "should never happen" failure paths (though 4 tests in piglit hit them currently, due to a single bug). An abort() that you can gdb on easily is probably more useful than a clean exit, particularly since a bug in piglit framework right now is causing early exit(1)s to simply not be recorded in the results at all.
* vc4: Fix miplevel validation for raster textures.Eric Anholt2014-09-251-1/+1
| | | | | We were using the un-minified value, meaning we'd reject correctly laid out textures.
* vc4: Compute max_index instead of trusting the rest of userspace.Eric Anholt2014-09-241-5/+13
| | | | | | | | | | | | | | max_index was coming from either the user telling us as part of glDrawRangeElements, or from an incidental calculation as part of some sort of primitive conversion fallback. Sometimes, it was just set to the default "I don't know" ~0 value. If it wasn't set to the actual max index, then the kernel would reject the draw call for allowing out-of-bounds VBO reads. So, compute the max index from the sizes of the VBOs, which isn't too expensive (unlike mapping and reading the index buffer) and is reliable. Fixes piglit vao-element-array-buffer.
* vc4: Move shader record setup before the draw call.Eric Anholt2014-09-241-38/+38
| | | | | The flush only happens after both are written, so we can do them in either order. This will let me compute max_index during the shader record setup.
* vc4: Add support for gl_PointCoord.Eric Anholt2014-09-241-0/+34
| | | | Fixes piglit glsl-fs-pointcoord, point-sprite, and fbo-gl_pointcoord.
* vc4: Add support for point size setting.Eric Anholt2014-09-246-6/+47
| | | | This is the support for both the global and per-vertex modes.
* vc4: Add support for line width setting.Eric Anholt2014-09-242-0/+5
| | | | | I don't see piglit tests for it, but this should be better than not emitting it at all.
* vc4: Actually add support for polygon offset.Eric Anholt2014-09-243-1/+28
| | | | | Setting the bit without setting the offset values is kind of useless. Fixes piglit polygon-offset (but not polygon-mode-offset).
* vc4: Fix swapped 565 dithering versus no-dithering render configs.Eric Anholt2014-09-241-2/+2
| | | | | Fixes many 565 piglit tests (like fbo-generatemipmap-formats) that weren't expecting dithering.
* vc4: Add support for alpha test.Eric Anholt2014-09-242-0/+70
| | | | Fixes most of piglit fbo-alphatest-formats (but not RGB565/332).
* gallium/vc4: add automake target 'templates'Emil Velikov2014-09-241-0/+13
| | | | | | | | Rather than duplicating the libdeps, extra define... all over the targets, define them only once and use when applicable. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Matt Turner <[email protected]>
* vc4: Drop maximum number of varyings down to 8.Eric Anholt2014-09-241-1/+4
| | | | | | | | | | | There are only 32 bits in the flatshade flags (which are 1 bit per component), the simulator crashes when you use more than about this many varyings, and the original Broadcom code drop only exposed 8 as well. Fixes 26 piglit tests in the varying-packing group, and makes many others go from crash to fail (due to not checking their varying counts and treating link failures as failures). Regresses ARB_fp/minmax (due to 8 varyings instead of 10).
* vc4: Add support for flat shading.Eric Anholt2014-09-235-2/+33
| | | | | | | This is just the GL 1.1 flat shading of colors -- we don't need to support TGSI constant interpolation bits, because we don't do GLSL 1.30. Fixes 7 piglit tests.
* vc4: Drop stale comment.Eric Anholt2014-09-231-1/+0
| | | | This should have been in 001247d230f022fffac68f4578348087a53d3940.
* vc4: Put dead writes into the NOP register when generating code.Eric Anholt2014-09-231-1/+8
| | | | | | | | They still provide register pressure since I haven't made a special class for them, but since they're only live for one instruction it probably doesn't matter. This improves the readability of QPU assembly.
* vc4: When possible, resolve raddr conflicts by swapping files on specials.Eric Anholt2014-09-231-5/+29
| | | | Cleans up a bunch of ugliness in perspective interpolation.
* vc4: Fix overzealous raddr conflict resolution.Eric Anholt2014-09-231-5/+7
| | | | | We only need to do the fixup when both args are in the same file, not just when both are in physical registers.
* vc4: Add support for 8-bit unorm/snorm vertex inputs.Eric Anholt2014-09-236-16/+101
|
* vc4: Add disasm for A-file unpack operations.Eric Anholt2014-09-233-22/+26
| | | | | | The A-file unpack is just like R4 unpack, except that if you don't do a floating-point operation it won't do float conversion (so int16 gets scaled up to int32).
* vc4: Switch to using Mesa's register allocator.Eric Anholt2014-09-235-114/+121
| | | | | | | | | This will let me more reliably allocate a-file registers, which are going to be even more in demand when I start using a-file unpacks. Also fixes a bug where the reservation of payload registers (FRAG_Z/W) was off by one but just caused failure to register allocate at all if the off-by-one was fixed.
* vc4: Make a static list of all the registers.Eric Anholt2014-09-231-12/+82
|
* vc4: Switch the context struct to use ralloc.Eric Anholt2014-09-231-2/+3
| | | | | I wanted to hang the ra_regs off it so I didn't have to free, but it turned out it wasn't ralloced yet.
* vc4: Fix perspective interpolation.Eric Anholt2014-09-191-1/+1
| | | | Fixes the mesa reflect demo and 6 tests under interpolation/
* vc4: Use the same method as for FRAG_Z to handle fragcoord W.Eric Anholt2014-09-195-13/+15
| | | | I need to get the non-reciprocal version of W for interpolation, anyway.
* vc4: Add support for stencil operations.Eric Anholt2014-09-188-2/+118
| | | | | | | While depth test state is passed through the fragment shader as sideband, data, the stencil test state has to be set by the fragment shader itself. Many tests are still failing, but this gets most of hiz/ passing.
* vc4: Actually implement VC4_DEBUG=cl.Eric Anholt2014-09-184-0/+141
|
* vc4: Allow copy propagation of uniforms.Eric Anholt2014-09-171-1/+15
| | | | | Fixes 12 piglit tests (and 8 more crash -> fail) from reducing register pressure.
* vc4: Make sure thread end doesn't have a uniform read.Eric Anholt2014-09-171-0/+8
| | | | Prevents regression when I start doing copy propagation on uniforms.
* vc4: Allow dead code elimination of instructions that read uniforms.Eric Anholt2014-09-171-2/+1
|
* vc4: Add support for reordering the uniform stream after optimization.Eric Anholt2014-09-174-0/+87
| | | | | | This allows for introducing dead code eliminating of uniforms, copy propagation of uniforms, and instruction rescheduling between instructions that both read uniforms.
* vc4: Initialize the various qreg arrays when allocating them.Eric Anholt2014-09-171-0/+4
| | | | | | | This is particularly important for outputs, where we try to MOV the whole vec4 to the VPM, even if only 1-3 components had been set up. It might also be important for temporaries, if the shader reads components before writing them.
* vc4: Fix stray disable of the CSE pass.Eric Anholt2014-09-171-1/+0
| | | | Somehow I slipped this in with the original commit of CSE.
* vc4: Claim ARB_fbo.Eric Anholt2014-09-161-1/+3
| | | | | | | | This gets a ton of piglit working that crashes in waffle context management stuff otherwise. Actually supporting mismatched FB sizes is at best going to require some more load/store generals for color buffers, but if I can't manage to do that I'll want to just have state_tracker reject those FBOs as unsupported, rather than deny GL 2.1.
* vc4: Fix memory leaks in register allocation.Eric Anholt2014-09-161-0/+3
|
* vc4: Move register allocation to a separate file.Eric Anholt2014-09-164-100/+165
| | | | | I'm going to be rewriting it all, and having it mixed up with the QIR-to-QPU opcode translation was messy.
* vc4: Add support for computed depth writes.Eric Anholt2014-09-163-2/+26
| | | | Fixes piglit glsl-1.10-fragdepth and early-z.
* vc4: Restructure depth input/output in fragment shaders.Eric Anholt2014-09-164-12/+17
| | | | | | The goal here is to have an argument for the depth write opcode so that I can do computed depth. In the process, this makes the calculations that will be emitted more obvious in the QIR.
* vc4: Bump maximum ARB program temporaries to match Intel/AMD.Eric Anholt2014-09-151-1/+1
| | | | | This query has always been useless, but we could potentially reject well-formed, runnable programs if we expose a value that's too low.
* vc4: Bump maximum uniforms count to match other drivers.Eric Anholt2014-09-151-1/+1
| | | | | | We don't have any specific limits in the hardware, just like the other GPUs, so match their behavior. Fixes minmax_gles2 and several other piglit tests relying on the specced uniform minmax values.
* vc4: Dynamically allocate the TGSI-to-qreg arrays.Eric Anholt2014-09-152-12/+44
| | | | | Fixes buffer overflows in some piglit tests (which are still failing to register allocate anyway).
* vc4: Fix memory leaks of struct qinst.Eric Anholt2014-09-154-3/+17
|
* vc4: Fix memory leaks of some vc4_compile contents.Eric Anholt2014-09-152-10/+11
|
* vc4: Reuse the util header instead of defining our own ARRAY_SIZE.Eric Anholt2014-09-151-2/+1
| | | | | Fixes redefinition warnings if you end up including this header before util stuff.
* gallium: add a texture target to sampler view and a CAP to use itIlia Mirkin2014-09-121-0/+1
| | | | | | | | | | This allows a sampler view to have a different texture target than the underlying resource. This will be used to implement the type casting between 2d arrays and cube maps as specified in ARB_texture_view. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* vc4: Add support for shadow samplers.Eric Anholt2014-09-091-3/+58
| | | | | | | This doesn't quite make depth-tex-compare work, presumably because we're not hitting equality with itof(sample) * 1.0/0xffffff in the 0xffffff case. arb_fragment_program_shadow tests pass, though, as well as a bunch of other shadow-related stuff.
* vc4: Add support for texture swizzles.Eric Anholt2014-09-091-1/+8
| | | | Fixes depth-tex-modes.
* vc4: Move the texture format into a struct.Eric Anholt2014-09-091-3/+5
| | | | I'm going to be putting some bitfields into the struct as well.
* vc4: Add support for depth texturing.Eric Anholt2014-09-091-3/+13
|
* vc4: Expose r4 to register allocation.Eric Anholt2014-09-094-23/+49
| | | | | | | | We potentially need to be careful that use of a value stored in r4 isn't copy-propagated (or something) across another r4 write. That doesn't appear to happen currently, and this makes the dataflow more obvious. It also opens up not unpacking the r4 value, which will be useful for depth textures.
* vc4: Drop pointless raddr conflict handling on SF.Eric Anholt2014-09-091-1/+0
| | | | SF doesn't have a src[1].