summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nouveau
Commit message (Collapse)AuthorAgeFilesLines
* gk110/ir: emit load constant subopIlia Mirkin2014-07-241-0/+1
| | | | Signed-off-by: Ilia Mirkin <[email protected]>
* nv50/ir: fix phi/union sources when their def has been mergedIlia Mirkin2014-07-241-0/+8
| | | | | | | | | | | | | In a situation where double-register values are used, the phi nodes can still end up being u32 values. They all get merged into one RA node though. When fixing up the merge (which comes after the phi node), the phi node's def would get fixed, but not its sources which would remain at the low register value. This maintains the invariant that a phi node's defs and sources are allocated the same register. Signed-off-by: Ilia Mirkin <[email protected]>
* nv50/ir: fix hard-coded TYPE_U32 sized registerIlia Mirkin2014-07-241-3/+4
| | | | Signed-off-by: Ilia Mirkin <[email protected]>
* nvc0: mark shader header if fp64 is usedIlia Mirkin2014-07-241-0/+2
| | | | Signed-off-by: Ilia Mirkin <[email protected]>
* nv50/ir: keep track of whether the program uses fp64Ilia Mirkin2014-07-242-2/+7
| | | | Signed-off-by: Ilia Mirkin <[email protected]>
* nvc0: make sure that the local memory allocation is aligned to 0x10Ilia Mirkin2014-07-241-1/+1
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Cc: <[email protected]>
* nv50: fix build failure on m68k due to invalid struct alignment assumptionsThorsten Glaser2014-07-171-0/+5
| | | | | | | | Make alignment assumptions explicit by inserting correct padding with unknown struct members. Reviewed-by: Ilia Mirkin <[email protected]> Cc: <[email protected]>
* nvc0: fix translate path for PRIM_RESTART_WITH_DRAW_ARRAYSChristoph Bumiller2014-07-151-13/+28
| | | | Reviewed-by: Ilia Mirkin <[email protected]>
* nvc0: add support for indirect drawingChristoph Bumiller2014-07-158-30/+220
| | | | Reviewed-by: Ilia Mirkin <[email protected]>
* nouveau: check if a fence has already been signalledIlia Mirkin2014-07-151-0/+3
| | | | | | | nouveau_fence_update does real work unconditionally. Avoid doing that if the fence we're checking on has already been signalled. Signed-off-by: Ilia Mirkin <[email protected]>
* nvc0/ir: add support for interpolating with non-default settingsIlia Mirkin2014-07-093-1/+94
| | | | Signed-off-by: Ilia Mirkin <[email protected]>
* nvc0/ir: fix encoding of offset register into interpolation instructionIlia Mirkin2014-07-091-1/+1
| | | | Signed-off-by: Ilia Mirkin <[email protected]>
* nvc0/ir: account for indirect textures on fermi for txdIlia Mirkin2014-07-091-0/+3
| | | | Signed-off-by: Ilia Mirkin <[email protected]>
* nvc0/ir: unset s/r indirect sources before moving everythingIlia Mirkin2014-07-091-9/+10
| | | | | | | | | With the current logic, it's very likely that s/r indirect sources are right after the "regular" ones. Unset them before moving the texture arguments over rather than after, as one of those arguments would likely have assumed one of the s/r positions. Signed-off-by: Ilia Mirkin <[email protected]>
* gallium: switch dedicated centroid field to interpolation locationIlia Mirkin2014-07-091-1/+1
| | | | | | | | The new location field can be either center, centroid, or sample, which indicates the location that the shader should interpolate at. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* nvc0: allocate more space before a counter is configuredSamuel Pitoiset2014-07-081-2/+3
| | | | | | | | | On nvc0, a counter can have up to 6 sources instead of only one for nve4+. This fixes a crash when a counter uses more than one source. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* nv50/ir: use unordered_set instead of list to keep track of var usesTobias Klausmann2014-07-084-9/+10
| | | | | | | | | | | The set of variable uses does not need to be ordered in any way, and removing/adding elements is a fairly common operation in various optimization passes. This shortens runtime of piglit test fp-long-alu to ~22s from ~4h Signed-off-by: Tobias Klausmann <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* nvc0/ir: fill offset in properly for TXDIlia Mirkin2014-07-081-13/+43
| | | | | | | | Apparently TXD wants its offset differently than TEX, accepting it in the upper bits of the layer index. Unclear what happens when this is combined with indirect sampler indexing. Signed-off-by: Ilia Mirkin <[email protected]>
* nvc0/ir: use manual TXD when offsets are involvedIlia Mirkin2014-07-081-1/+2
| | | | | | | | | | Something about how we're implementing offsets for TXD is wrong, just flip to the generic quadop-based implementation in that case. This is the minimal fix appropriate for backporting. Signed-off-by: Ilia Mirkin <[email protected]> Cc: <[email protected]>
* nvc0/ir: do quadops on the right texture coordinates for TXDIlia Mirkin2014-07-081-2/+3
| | | | | | | | handleTEX moves the layer as the first argument. This makes sure that the quadops deal with the texture coordinates. Signed-off-by: Ilia Mirkin <[email protected]> Cc: <[email protected]>
* nv50/ir: ignore bias for samplerCubeShadow on nv50Ilia Mirkin2014-07-081-0/+10
| | | | | | | | Unfortunately there's no good way to do this on the nv50 shader isa. Dropping the bias seems preferable to doing the compare post-filtering. Signed-off-by: Ilia Mirkin <[email protected]> Cc: <[email protected]>
* nv50/ir: retrieve shadow compare from first argIlia Mirkin2014-07-081-1/+1
| | | | | | | | This can only happen with texture(samplerCubeShadow, bias), where the compare will be in the first argument. Signed-off-by: Ilia Mirkin <[email protected]> Cc: <[email protected]>
* nvc0: add a memory barrier when there are persistent UBOsIlia Mirkin2014-07-035-4/+57
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Cc: "10.2" <[email protected]>
* nv50: do an explicit flush on draw when there are persistent buffersIlia Mirkin2014-07-033-2/+50
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Cc: "10.2" <[email protected]>
* nv50: disable dedicated ubo upload methodIlia Mirkin2014-07-031-0/+7
| | | | | | | | | | The hardware allows multiple simultaneous renders with the same memory-backed constbufs but with each invocation having different values. However in order for that to work, the data has to be streamed in via the right constbuf slot. We weren't doing that for UBOs. Signed-off-by: Ilia Mirkin <[email protected]> Cc: "10.2 10.1" <[email protected]>
* gallium: rename PIPE_CAP_TGSI_VS_LAYER to also have _VIEWPORTIlia Mirkin2014-07-033-3/+3
| | | | | | | | | Now that this cap is used to determine the availability of both, adjust its name to reflect the new reality. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* nvc0: add missed PIPE_CAP_DRAW_INDIRECTIlia Mirkin2014-07-011-0/+1
| | | | | | | Real support will be forthcoming. For now, avoid the unknown cap error and compiler warning. Signed-off-by: Ilia Mirkin <[email protected]>
* gallium: add facilities for indirect drawingChristoph Bumiller2014-07-022-0/+2
| | | | | | v2: Added comments to util_draw_indirect, clarified and fixed map size. Removed unlikely().
* nvc0: expose 4 vertex streams, use stream ids in xfbIlia Mirkin2014-07-015-2/+5
| | | | Signed-off-by: Ilia Mirkin <[email protected]>
* nvc0/ir: only merge emit/restart for identical streamsIlia Mirkin2014-07-011-3/+10
| | | | Signed-off-by: Ilia Mirkin <[email protected]>
* nvc0/ir: avoid creating restarts with non-0 streamIlia Mirkin2014-07-011-3/+7
| | | | Signed-off-by: Ilia Mirkin <[email protected]>
* nvc0/ir: fix emitting vertex streamIlia Mirkin2014-07-011-7/+8
| | | | Signed-off-by: Ilia Mirkin <[email protected]>
* gallium: add a cap for max vertex streamsIlia Mirkin2014-07-013-0/+5
| | | | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* gallium: add an index argument to create_queryIlia Mirkin2014-07-015-5/+5
| | | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* nv50: fix dri3 prime buffer creationAxel Davy2014-06-271-2/+6
| | | | | | | | | This is the same fix than "nvc0: fix dri3 prime buffer creation" Signed-off-by: Axel Davy <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* nvc0: fix dri3 prime buffer creationDave Airlie2014-06-271-1/+1
| | | | | | | | We need to place shared buffers into GART. Reviewed-by: Axel Davy <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* nvc0: allow VIEWPORT_INDEX and LAYER to be used as input semanticsIlia Mirkin2014-06-231-0/+2
| | | | Signed-off-by: Ilia Mirkin <[email protected]>
* nv50/ir: allow gl_ViewportIndex to work on non-provoking verticesTobias Klausmann2014-06-232-2/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, if we had something like: gl_ViewportIndex = idx; for(int i = 0; i < gl_in.length(); i++) { gl_Position = gl_in[i].gl_Position; EmitVertex(); } EndPrimitive(); The right viewport index would not be set on the primitive because the last vertex is the provoking one. However blob drivers appear to move the gl_ViewportIndex write into the for loop, allowing the application to be ignorant of this detail. While the application is technically wrong here, because the blob does it and other drivers appear to implicitly work this way as well, we add a buffer register that viewport index writes go into, which is then exported before every EmitVertex() call. This fixes the remaining piglit tests in ARB_viewport_array for nv50/nvc0. Signed-off-by: Tobias Klausmann <[email protected]> Cc: "10.2" <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* nv30: hack to avoid errors on unexpected color/zeta combinationsIlia Mirkin2014-06-191-0/+17
| | | | | | | | | | This is just a hack, it should be possible to create a temporary zeta surface and render to that instead. However that's more complicated and this avoids the render being entirely broken and errors being reported by the card. Signed-off-by: Ilia Mirkin <[email protected]> Cc: "10.2" <[email protected]>
* nv30: tidy screen caps, add missing onesIlia Mirkin2014-06-191-16/+17
| | | | Signed-off-by: Ilia Mirkin <[email protected]>
* nv30: avoid dangling references to deleted contextsIlia Mirkin2014-06-191-0/+3
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Cc: "10.2" <[email protected]>
* nv30: plug some memory leaks on screen destroy and shader compileIlia Mirkin2014-06-192-0/+7
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Cc: "10.2" <[email protected]>
* nv50: organize screen capsIlia Mirkin2014-06-191-67/+57
| | | | Signed-off-by: Ilia Mirkin <[email protected]>
* nvc0: organize screen capsIlia Mirkin2014-06-191-61/+51
| | | | Signed-off-by: Ilia Mirkin <[email protected]>
* nvc0: remove vport_int hack and instead use the usual state validationIlia Mirkin2014-06-193-11/+3
| | | | | | | | Commit ad4dc772 fixed an issue with the viewport not being restored correctly. However it's rather hackish and confusing. Instead just mark the viewport dirty and let the viewport validation take care of it. Signed-off-by: Ilia Mirkin <[email protected]>
* nv50/ir: Remove NV50_SEMANTIC_VIEWPORTINDEXTobias Klausmann2014-06-162-2/+1
| | | | | | | Use TGSI_SEMANTIC_VIEWPORT_INDEX for the last consumer. Signed-off-by: Tobias Klausmann <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* nvc0: implement multiple viewports/scissors, enable ARB_viewport_arrayTobias Klausmann2014-06-167-63/+113
| | | | | | Signed-off-by: Tobias Klausmann <[email protected]> [imirkin: mark things dirty on ctx switch, 3d blit] Reviewed-by: Ilia Mirkin <[email protected]>
* nv50: make sure to mark first scissor dirty after blitIlia Mirkin2014-06-161-0/+1
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Cc: "10.2" <[email protected]>
* gk110/ir: fix bfind emissionIlia Mirkin2014-06-071-1/+1
| | | | | | | | There is a short-immediate version as well, but it should never end up getting used since it would have gotten folded earlier. Signed-off-by: Ilia Mirkin <[email protected]> Cc: "10.2" <[email protected]>
* gk110/ir: fix emitting constbuf file indexIlia Mirkin2014-06-071-2/+3
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Cc: "10.2" <[email protected]>