summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nouveau
Commit message (Collapse)AuthorAgeFilesLines
* gallium: add PIPE_SHADER_CAP_MAX_OUTPUTS and use it in st/mesaMarek Olšák2014-10-213-0/+7
| | | | | | | | With 5 shader stages and various combinations of enabled and disabled shaders, the maximum number of outputs in one shader doesn't have to be equal to the maximum number of inputs in the following shader. v2: return 32 for softpipe and llvmpipe
* tgsi: change tgsi_shader_info::properties to a one-dimensional arrayMarek Olšák2014-10-041-3/+3
| | | | | | Reviewed-by: Roland Scheidegger <[email protected]> v2: fix svga too
* tgsi: simplify shader properties in tgsi_shader_infoMarek Olšák2014-10-041-18/+6
| | | | Use an array of properties indexed by TGSI_PROPERTY_* definitions.
* gk110/ir: add dnz flag emission for fmul/fmadIlia Mirkin2014-10-031-0/+4
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Cc: "10.2 10.3" <[email protected]>
* gm107/ir: add dnz emission for fmulIlia Mirkin2014-10-031-1/+1
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Cc: "10.3" <[email protected]>
* gm107/ir: take relative pfetch offset into accountIlia Mirkin2014-09-261-1/+4
| | | | | | | | | There is no dedicated instruction for this, so just combine it with the constant offset. Acked-by: Ben Skeggs <[email protected]> Signed-off-by: Ilia Mirkin <[email protected]> Cc: "10.3" <[email protected]>
* gm107/ir: add support for indirect const buffer selectionIlia Mirkin2014-09-251-0/+14
| | | | | | | | This was missed in the commit that enabled it for fermi/kepler as part of ARB_gpu_shader5 Signed-off-by: Ilia Mirkin <[email protected]> Cc: "10.3" <[email protected]>
* gm107/ir: fix texture argument orderIlia Mirkin2014-09-252-5/+34
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Cc: "10.3" <[email protected]>
* gm107/ir: fix manual TXD for array targetsIlia Mirkin2014-09-251-2/+3
| | | | | | | This parallels the fixes in commit afea9bae. Signed-off-by: Ilia Mirkin <[email protected]> Cc: "10.3" <[email protected]>
* nv50/ir: avoid deleting pseudo instructions too earlyIlia Mirkin2014-09-251-1/+10
| | | | | | | | | | | What happens is that a SPLIT operation is part of the spill node, and as a pseudo op, the instruction gets erased after processing its first def. However the later defs still need to refer to it, so instead delay deleting until after that whole RA node is done processing. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79462 Signed-off-by: Ilia Mirkin <[email protected]> Cc: "10.2 10.3" <[email protected]>
* nv50/ir: add some comments on edge classificationIlia Mirkin2014-09-251-0/+10
| | | | Signed-off-by: Ilia Mirkin <[email protected]>
* nv50,nvc0: fix 3d blit logic for odd depth/stencil formatsIlia Mirkin2014-09-252-7/+18
| | | | | Reported-by: David Heidelberger <[email protected]> Signed-off-by: Ilia Mirkin <[email protected]>
* nv50,nvc0: add missing depth/stencil formats to tile flag selectionIlia Mirkin2014-09-252-0/+8
| | | | | Reported-by: David Heidelberger <[email protected]> Signed-off-by: Ilia Mirkin <[email protected]>
* gallium/nouveau: 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]>
* nv50,nvc0: enable ARB_texture_viewIlia Mirkin2014-09-124-6/+6
| | | | Signed-off-by: Ilia Mirkin <[email protected]>
* gallium: add a texture target to sampler view and a CAP to use itIlia Mirkin2014-09-123-0/+3
| | | | | | | | | | 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]>
* nouveau: remove unneeded assertMaarten Lankhorst2014-09-111-1/+0
| | | | | | | | No idea why it was added, but the code runs fine even on videos where it triggers. Signed-off-by: Maarten Lankhorst <[email protected]> Cc: "10.2 10.3" <[email protected]>
* nouveau: rework reference frame handlingMaarten Lankhorst2014-09-113-4/+37
| | | | | | | | | | | | Fixes a regression from "nouveau/vdec: small fixes to h264 handling" New picking order for frames: 1. Vidbuf pointer matches. 2. Take the first kicked ref. 3. If that fails, take a ref that has a different last_used. Signed-off-by: Maarten Lankhorst <[email protected]> Cc: "10.2 10.3" <[email protected]>
* nouveau: fix MPEG4 hw decodingMaarten Lankhorst2014-09-111-3/+3
| | | | | | | Reorder some fields to make I-frame decoding work correctly. Signed-off-by: Maarten Lankhorst <[email protected]> Cc: "10.2 10.3" <[email protected]>
* nouveau: re-allocate bo's on overflowMaarten Lankhorst2014-09-114-11/+87
| | | | | | | | | The BSP bo might be too small to contain all of the bsp data, bump its size on overflow. Also bump inter_bo when this happens, it might be too small otherwise. Signed-off-by: Maarten Lankhorst <[email protected]> Cc: "10.2 10.3" <[email protected]>
* nv50/ir: accomodate all file types, there are now more than 8Ilia Mirkin2014-09-081-2/+2
| | | | | | Reported by Coverity Signed-off-by: Ilia Mirkin <[email protected]>
* nvc0/ir: uses was always null at that point in the codeIlia Mirkin2014-09-081-7/+1
| | | | | | Reported by Coverity Signed-off-by: Ilia Mirkin <[email protected]>
* nv50/ir: avoid array overrun when checking for supported modsIlia Mirkin2014-09-082-2/+2
| | | | | | | Reported by Coverity Signed-off-by: Ilia Mirkin <[email protected]> Cc: "10.2 10.3" <[email protected]>
* nouveau: buffer can never be nullIlia Mirkin2014-09-081-2/+0
| | | | | | Reported by Coverity Signed-off-by: Ilia Mirkin <[email protected]>
* nvc0/ir: insn can never be nullIlia Mirkin2014-09-081-1/+1
| | | | | | Reported by Coverity. Signed-off-by: Ilia Mirkin <[email protected]>
* nvc0: size is a uint16_t, remove unnecessary assertionIlia Mirkin2014-09-081-1/+0
| | | | | | Reported by Coverity. Signed-off-by: Ilia Mirkin <[email protected]>
* nvc0: avoid null deref of screen when collecting statsIlia Mirkin2014-09-081-1/+1
| | | | | | Reported by Coverity Signed-off-by: Ilia Mirkin <[email protected]>
* nvc0: use 64-bit math when scaling the query resultsIlia Mirkin2014-09-081-4/+4
| | | | | | Reported by Coverity. Signed-off-by: Ilia Mirkin <[email protected]>
* nvc0/ir: clarify recursion fix to finding first tex usesChristoph Bumiller2014-09-051-9/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a simple shader for reproducing the case mentioned: FRAG DCL IN[0], GENERIC[0], PERSPECTIVE DCL OUT[0], COLOR DCL SAMP[0] DCL CONST[0] DCL TEMP[0..1], LOCAL IMM[0] FLT32 { 0.0000, -1.0000, 1.0000, 0.0000} 0: MOV TEMP[0].x, CONST[0].wwww 1: MOV TEMP[1].x, CONST[0].wwww 2: BGNLOOP 3: IF TEMP[0].xxxx 4: BRK 5: ENDIF 6: ADD TEMP[0].x, TEMP[0], IMM[0].zzzz 7: IF CONST[0].xxxx 8: TEX TEMP[1].x, CONST[0], SAMP[0], 2D 9: ENDIF 10: IF CONST[0].zzzz 11: MOV TEMP[1].x, CONST[0].zzzz 12: ENDIF 13: ENDLOOP 14: MOV OUT[0], TEMP[1].xxxx 15: END Cc: "10.2 10.3" <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* nv50/ir/util: fix BitSet issuesChristoph Bumiller2014-09-053-3/+10
| | | | | | | | | | | | | BitSet::allocate() is being used with the expectation that it would leave the bitfield untouched if its size hasn't changed, however, the function always zeroed the last word, which led to obscure bugs with live set computation. This also fixes BitSet::resize(), which was broken, but luckily not being used. Cc: "10.2 10.3" <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* nvc0: remove nvc0_push, replaced with nvc0_vbo_translateIlia Mirkin2014-09-052-410/+0
| | | | | | Fixes build. Signed-off-by: Ilia Mirkin <[email protected]>
* nv50,nvc0: get rid of draw module supportIlia Mirkin2014-09-057-224/+0
| | | | | | | This hasn't been enabled in a long time and is completely stale and unnecessary. Remove, esp since it doesn't build. Signed-off-by: Ilia Mirkin <[email protected]>
* gallium/nouveau: ship all files in the tarballEmil Velikov2014-09-052-36/+113
| | | | | | | | | | | - include all headers in Makefile.sources - sort the list(s) - bundle the android buildscript v2: Don't double-include the compiler sources. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Matt Turner <[email protected]>
* nouveau: don't leak dec struct on errorDave Airlie2014-09-021-1/+1
| | | | | | | This one path doesn't goto fail, so it seems to leak dec. Reviewed-by: Ilia Mirkin <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* nouveau/nv40: quiten coverity warning in unused vertex texture code.Dave Airlie2014-09-021-0/+1
| | | | | | This fixes the code, but we never run it anyways, so silence coverity. Signed-off-by: Dave Airlie <[email protected]>
* nv50: remove unused variablesIlia Mirkin2014-09-012-2/+0
| | | | | | Recent code changes have caused these to no longer be used. Remove them. Signed-off-by: Ilia Mirkin <[email protected]>
* nv50: attach the buffer bo to the miptree structuresIlia Mirkin2014-09-011-8/+5
| | | | | | | | | The current code... makes no sense. Use nouveau_bo_ref to attach the bo to the exposed resource so as to have the proper lifetime guarantees. Tested-by: Emil Velikov <[email protected]> Signed-off-by: Ilia Mirkin <[email protected]> Cc: "10.2 10.3" <[email protected]>
* nv50: mt address may not be the underlying bo's start addressIlia Mirkin2014-09-013-12/+14
| | | | | | | | | | | | | | With VP2, nv50_miptree is faked because the underlying bo's have to be laid out in a certain way. This is done by adjusting the address. Make sure that blits (and everything else for consistency) use the mt address rather than the bo address as a base. This fixes retrieving chroma plane with VDPAU. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82255 Tested-by: Emil Velikov <[email protected]> Signed-off-by: Ilia Mirkin <[email protected]> Cc: "10.2 10.3" <[email protected]>
* nv50: set the miptree address when clearing bo's in vp2 initIlia Mirkin2014-09-011-0/+2
| | | | | | | | | | The mt address is about to be used more, make sure it's set appropriately. Reported-by: Emil Velikov <[email protected]> Tested-by: Emil Velikov <[email protected]> Signed-off-by: Ilia Mirkin <[email protected]> Cc: "10.2 10.3" <[email protected]>
* nv50/ir: avoid creating instructions that can't be emittedIlia Mirkin2014-09-011-0/+4
| | | | | | | | | | | When constant folding a MAD operation, we first fold the multiply and generate an ADD. However we do so without making sure that the immediate can be handled in the saturate case. If it can't, load the immediate in a separate instruction. Reported-by: Tiziano Bacocco <[email protected]> Signed-off-by: Ilia Mirkin <[email protected]> Cc: "10.2 10.3" <[email protected]>
* nvc0: don't make 1d staging textures linearIlia Mirkin2014-09-011-1/+0
| | | | | | | | | | | Experimentally, the sampler doesn't appear to like these, neither as buffer nor as rect textures. So remove 1D from the list of texture types to make linear when used for staging. This fixes the OSD in mplayer for VDPAU. Signed-off-by: Ilia Mirkin <[email protected]> Cc: "10.2 10.3" <[email protected]>
* nv50: zero out unbound samplersIlia Mirkin2014-09-011-2/+5
| | | | | | | | | Samplers are only defined up to num_samplers, so set all samplers above nr to NULL so that we don't try to read them again later. Tested-by: Christian Ruppert <[email protected]> Signed-off-by: Ilia Mirkin <[email protected]> Cc: "10.2 10.3" <[email protected]>
* nvc0/ir: avoid infinite recursion when finding first uses of texIlia Mirkin2014-09-012-8/+29
| | | | | | | | | | | In certain circumstances, findFirstUses could end up doubling back on instructions it had already processed, resulting in an infinite recursion. Avoid this by keeping track of already-visited instructions. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83079 Tested-by: Tobias Klausmann <[email protected]> Signed-off-by: Ilia Mirkin <[email protected]> Cc: "10.2 10.3" <[email protected]>
* nouveau: allow more tokens by default to avoid parse failuresIlia Mirkin2014-08-281-2/+4
| | | | | | Also print a note saying that parsing failed to help isolate issues. Signed-off-by: Ilia Mirkin <[email protected]>
* gallium: add cap for MAX_VERTEX_ATTRIB_STRIDETimothy Arceri2014-08-273-0/+6
| | | | | Signed-off-by: Timothy Arceri <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* nvc0: Handle ARB_conditional_render_inverted and enable itTobias Klausmann2014-08-194-32/+37
| | | | | Reviewed-by: Ilia Mirkin <[email protected]> Signed-off-by: Tobias Klausmann <[email protected]>
* gallium: Add and handle PIPE_CAP_CONDITIONAL_RENDER_INVERTEDTobias Klausmann2014-08-193-0/+4
| | | | | | Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Signed-off-by: Tobias Klausmann <[email protected]>
* nv50/ir: (trivial) initialize pointer to silence warningTobias Klausmann2014-08-181-1/+1
| | | | | Reviewed-by: Ilia Mirkin <[email protected]> Signed-off-by: Tobias Klausmann <[email protected]>
* gallium/nouveau: handle query_renderer capsEmil Velikov2014-08-153-9/+61
| | | | Signed-off-by: Emil Velikov <[email protected]>
* nv50,nvc0: add support for fine derivativesIlia Mirkin2014-08-143-2/+6
| | | | | | | The quadop-based method we currently use on all chipsets already provides the fine version of the derivatives. Signed-off-by: Ilia Mirkin <[email protected]>