summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno
Commit message (Collapse)AuthorAgeFilesLines
* freedreno: query fixesRob Clark2014-10-033-8/+13
| | | | | | | Fixes a few issues, including a potential empty-IB (which triggers gpu hangs in piglit occlusion_query_meta_no_fragments) Signed-off-by: Rob Clark <[email protected]>
* freedreno/a3xx: handle VS only outputting BCOLORRob Clark2014-10-031-2/+10
| | | | | | | Possibly we should map the front color to black (zeroes). But not sure there is a way to do that without generating a shader variant. Signed-off-by: Rob Clark <[email protected]>
* freedreno/ir3: fix lockups with lame FRAG shadersRob Clark2014-10-034-6/+17
| | | | | | | | | | | | | | | | | | | | | | | | Shaders like: FRAG PROPERTY FS_COLOR0_WRITES_ALL_CBUFS 1 DCL IN[0], GENERIC[0], PERSPECTIVE DCL OUT[0], COLOR DCL SAMP[0] DCL TEMP[0], LOCAL IMM[0] FLT32 { 0.0000, 1.0000, 0.0000, 0.0000} 0: TEX TEMP[0], IN[0].xyyy, SAMP[0], 2D 1: MOV OUT[0], IMM[0].xyxx 2: END cause unhappyness. They have an IN[], but once this is compiled the useless TEX instruction goes away. Leaving a varying that is never fetched, which makes the hw unhappy. In the process fix a signed vs unsigned compare. If the vertex shader has max_reg=-1, MAX2() vs an unsigned would not give the desired result. Signed-off-by: Rob Clark <[email protected]>
* freedreno/ir3: add TXF supportIlia Mirkin2014-10-021-1/+39
| | | | | | | Still failing a bunch of the fairly picky texelFetch tests, but the 1D(Array) ones are full passes. Signed-off-by: Ilia Mirkin <[email protected]>
* freedreno/ir3: add TXD support and expose ARB_shader_texture_lodIlia Mirkin2014-10-023-9/+56
| | | | Signed-off-by: Ilia Mirkin <[email protected]>
* freedreno/ir3: add texture offset supportIlia Mirkin2014-10-021-4/+45
| | | | Signed-off-by: Ilia Mirkin <[email protected]>
* freedreno/ir3: shadow comes before arrayIlia Mirkin2014-10-021-2/+2
| | | | | | | Experimentally, this makes *ArrayShadow tex-miplevel-selection tests pass. Signed-off-by: Ilia Mirkin <[email protected]>
* freedreno/ir3: make TXQ return integers, not floatsIlia Mirkin2014-10-021-1/+1
| | | | | | We're still doing something wrong for array textures. Signed-off-by: Ilia Mirkin <[email protected]>
* freedreno/ir3: add UMAD supportIlia Mirkin2014-10-021-4/+15
| | | | Signed-off-by: Ilia Mirkin <[email protected]>
* freedreno/ir3: add ISSG supportIlia Mirkin2014-10-021-0/+39
| | | | Signed-off-by: Ilia Mirkin <[email protected]>
* freedreno/ir3: add MOD supportIlia Mirkin2014-10-021-8/+12
| | | | Signed-off-by: Ilia Mirkin <[email protected]>
* freedreno/ir3: add UMOD support, based on UDIVIlia Mirkin2014-10-021-6/+31
| | | | Signed-off-by: Ilia Mirkin <[email protected]>
* freedreno/ir3: add IDIV/UDIV supportIlia Mirkin2014-10-021-3/+197
| | | | | | Logic shamelessly copied from nv50 lowering pass. Signed-off-by: Ilia Mirkin <[email protected]>
* freedreno/ir3: avoid fan-in sources referring to same instructionIlia Mirkin2014-10-021-2/+10
| | | | | | | | | | Since the RA has to be done s.t. each one gets its own (adjacent) register, it would complicate matters if instructions were allowed to be repeated. This enables copy-propagation use in situations where previously that might have happened. Signed-off-by: Ilia Mirkin <[email protected]> Signed-off-by: Rob Clark <[email protected]>
* freedreno/a3xx: emit all immediates in one shotRob Clark2014-10-021-8/+16
| | | | | | | Makes the command stream a bit tighter when there are lots of immediates. Signed-off-by: Rob Clark <[email protected]>
* freedreno: instanced drawing/compute not yet supportedIlia Mirkin2014-10-021-3/+3
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Signed-off-by: Rob Clark <[email protected]>
* freedreno/a3xx: handle large shader program sizesRob Clark2014-10-021-11/+63
| | | | | | | Above a certain limit use CACHE mode instead of BUFFER mode. This should solve gpu hangs with large shader programs. Signed-off-by: Rob Clark <[email protected]>
* freedreno: update generated headersRob Clark2014-10-024-8/+9
| | | | Signed-off-by: Rob Clark <[email protected]>
* freedreno: dual-source render targets are not supportedIlia Mirkin2014-10-021-1/+1
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Signed-off-by: Rob Clark <[email protected]>
* freedreno: max-texture-lod-bias should be 15.0fRob Clark2014-10-011-1/+1
| | | | | | Fixes piglit lodbias test. Signed-off-by: Rob Clark <[email protected]>
* freedreno: destroy transfer pool after blitterRob Clark2014-09-301-2/+2
| | | | | | | | Blitter can still have transfers hanging around which it frees in util_blitter_destroy(). So let it clean up before we yank the transfer_pool from under it. Signed-off-by: Rob Clark <[email protected]>
* freedreno/lowering: fix token calculation for loweringRob Clark2014-09-301-16/+39
| | | | | | | Indirect registers consume an additional token. Try to clean up the token calculation math a bit, and fix it at the same time. Signed-off-by: Rob Clark <[email protected]>
* freedreno/a3xx: re-emit shaders on variant changeRob Clark2014-09-292-1/+50
| | | | | | | | | We need to keep track if a state change other than frag/vert shader state will trigger us to need a different shader variant, and if necessary mark the appropriate shader state as dirty. Otherwise we will forget to re-emit the shader state. Signed-off-by: Rob Clark <[email protected]>
* freedreno/ir3: add some cmdline argsRob Clark2014-09-291-8/+87
| | | | Signed-off-by: Rob Clark <[email protected]>
* freedreno/a3xx: add support to emulate GL_CLAMPRob Clark2014-09-298-16/+129
| | | | Signed-off-by: Rob Clark <[email protected]>
* freedreno: add texcoord clamp support to loweringRob Clark2014-09-292-5/+173
| | | | | | | This is for hw that needs to emulate some texture wrap modes (like CLAMP) with some help from the shader. Signed-off-by: Rob Clark <[email protected]>
* freedreno: move bind_sampler_states to per-generationRob Clark2014-09-294-23/+48
| | | | | | | | | Keep the existing function as a common helper. But this lets us move an a2xx specific hack out of common code. And the PIPE_TEX_WRAP_CLAMP emulation will require an a3xx specific hack. So rather than piling on hacks, split this out. Signed-off-by: Rob Clark <[email protected]>
* freedreno/a3xx: fix border color orderRob Clark2014-09-291-5/+4
| | | | Signed-off-by: Rob Clark <[email protected]>
* freedreno/a3xx: add 32bit integer vtx formatsRob Clark2014-09-292-17/+37
| | | | Signed-off-by: Rob Clark <[email protected]>
* freedreno/a3xx: add flat interpolation modeRob Clark2014-09-277-19/+60
| | | | Signed-off-by: Rob Clark <[email protected]>
* freedreno/a3xx: add LOD_BIASRob Clark2014-09-271-0/+1
| | | | Signed-off-by: Rob Clark <[email protected]>
* freedreno: turn missing caps into compile warningsRob Clark2014-09-271-10/+10
| | | | | | | | Get rid of the 'default' case (as suggestied by imirkin) so compiler warns us about missing caps. Also add some caps that were missing until now. Signed-off-by: Rob Clark <[email protected]>
* freedreno: we have more than 0 viewports!Rob Clark2014-09-271-0/+3
| | | | | | | | | 4155d1c7 'st/mesa: drop dependence on API profile in st_init_extensions' broke freedreno because somehow 'PIPE_CAP_MAX_VIEWPORTS' fell through the cracks. Resulting that we reported zero viewports. So the state tracker never bothered to give us any valid viewport! Signed-off-by: Rob Clark <[email protected]>
* freedreno: update generated headersRob Clark2014-09-274-17/+133
| | | | | | Among other things, fixes a bug for fixed point registers/bitfields. Signed-off-by: Rob Clark <[email protected]>
* freedreno: don't advertise mirror-clamp supportRob Clark2014-09-271-1/+1
| | | | | | At least on a3xx, we cannot do it without some emulation in shader. Signed-off-by: Rob Clark <[email protected]>
* freedreno: fix compiler warningRob Clark2014-09-271-0/+1
| | | | Signed-off-by: Rob Clark <[email protected]>
* freedreno/a3xx: initial texture border-colorRob Clark2014-09-246-15/+65
| | | | | | | | | | | | Still some open questions.. and at any rate, no additional piglit passes due to various wrap modes that we need to emulate in at least some cases :-( But it does fix some mystery page-faults.. So add some comments in the code where there are things that we need to emulate or do more r/e, and push as-is. Signed-off-by: Rob Clark <[email protected]>
* gallium/freedreno: add automake target 'template'Emil Velikov2014-09-241-0/+11
| | | | | | | | 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]>
* gallium/freedreno: remove unused draw headerEmil Velikov2014-09-241-1/+0
| | | | | Signed-off-by: Emil Velikov <[email protected]> Acked-by: Matt Turner <[email protected]>
* freedreno/ir3: add TXB2 supportIlia Mirkin2014-09-221-4/+14
| | | | | | | Handles texture(samplerCubeShadow, bias), part of GLES3 and GL3 Signed-off-by: Ilia Mirkin <[email protected]> Signed-off-by: Rob Clark <[email protected]>
* freedreno/ir3: add TXQ supportIlia Mirkin2014-09-221-0/+27
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Signed-off-by: Rob Clark <[email protected]>
* freedreno/ir3: fix TXB/TXL to actually pull the bias/lod argumentIlia Mirkin2014-09-221-1/+4
| | | | | | | | | | | | Previously we would get a potentially computed post-swizzle coord based on the texture target info, which would not include the bias/lod in the last argument. The second argument does not have to be adjacent, so adjusting the order array did not make sense. Signed-off-by: Ilia Mirkin <[email protected]> Signed-off-by: Rob Clark <[email protected]>
* freedreno/ir3: make texture instruction construction more dynamicIlia Mirkin2014-09-221-145/+80
| | | | | | | | | | This will make life a lot easier as we add support for additional instructions. v2: shadow reference value is always .z or .w Signed-off-by: Ilia Mirkin <[email protected]> Signed-off-by: Rob Clark <[email protected]>
* freedreno/a3xx: more texture array fixesRob Clark2014-09-213-19/+22
| | | | Signed-off-by: Rob Clark <[email protected]>
* freedreno: add DRM_CONF_SHARE_FDRob Clark2014-09-211-2/+9
| | | | | | | | And config query and DRM_CONF_SHARE_FD to both mega-driver and traditional build configs, so that EGL_EXT_image_dma_buf_import works. Signed-off-by: Rob Clark <[email protected]>
* freedreno: add a standalone ir3_compiler binary for building TGSIIlia Mirkin2014-09-162-0/+191
| | | | | | Compiler taken from the combo old/new compiler comparer + simulator. Signed-off-by: Ilia Mirkin <[email protected]>
* freedreno: add default .dir-locals.el for emacs settingsIlia Mirkin2014-09-161-0/+8
| | | | Signed-off-by: Ilia Mirkin <[email protected]>
* freedreno/a3xx: 3d/array texturesRob Clark2014-09-134-7/+102
| | | | Signed-off-by: Rob Clark <[email protected]>
* freedreno: update generated headersRob Clark2014-09-134-4/+22
| | | | Signed-off-by: Rob Clark <[email protected]>
* freedreno: "fix" problems with excessive flushesRob Clark2014-09-125-27/+14
| | | | | | | | | | | | | | | | | | | | | | | 4f338c9b introduced logic to trigger a flush rather than overflowing cmdstream buffer. But the threshold was too low, triggering flushes where they were not needed. This caused problems with games like xonotic. Part of the problem is that we need to mark all state dirty between cmdstream submit ioctls, because we cannot rely on state being preserved across ioctls. But even with that, there are still some problems that are still being debugged. For now: 1) correctly mark all state dirty 2) introduce FD_MESA_DEBUG flush flag to force rendering to be flushed between each draw, to trigger problems (so that I can debug) 3) use a more reasonable threshold so for normal usecases we don't trigger the problems This at least corrects the regression, but there is still more debugging to do. Signed-off-by: Rob Clark <[email protected]>