summaryrefslogtreecommitdiffstats
path: root/src/gallium
Commit message (Collapse)AuthorAgeFilesLines
* clover: Log build options when dumping clc source.EdB2015-05-271-1/+1
| | | | Reviewed-by: Francisco Jerez <[email protected]>
* xlib: fix X_GLXCreateContextAtrribs/Attribs typoBrian Paul2015-05-261-10/+17
| | | | | | | | | In case the glproto.h file isn't up to date, we provide the #define for X_GLXCreateContextAttribsARB. v2: fix other occurances, improve #ifndef test, per Jose. Reviewed-by: Jose Fonseca <[email protected]>
* radeonsi: use a switch statement in si_delete_shader_selectorMarek Olšák2015-05-261-6/+13
| | | | Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: use a switch statement in si_shader_selector_keyMarek Olšák2015-05-261-9/+16
| | | | Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: fix scratch buffer setup for geometry shadersMarek Olšák2015-05-261-2/+9
| | | | | Cc: 10.6 <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: remove unused cases from si_shader_io_get_unique_indexMarek Olšák2015-05-261-14/+3
| | | | | | | These can't occur between VS and GS, because GS is only supported in the core profile. Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: don't count special outputs for the VS export countMarek Olšák2015-05-261-0/+5
| | | | Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: add support for PIPE_CAP_TGSI_TEXCOORDMarek Olšák2015-05-264-15/+13
| | | | | | | | | | | | | Without it, texcoords are mapped to GENERIC[0..7], PointCoord is mapped to GENERIC[8], and user-defined varyings start from GENERIC[9]. Since texcoords can only be used between VS and PS, and PointCoord is PS-only, it's silly to always start from GENERIC[9] in all other shaders (such as LS, HS, ES, GS). This adds support for TEXCOORD and PCOORD semantics. As a result, st/mesa will use GENERIC[0] as a base for user-defined varyings, which should make linking ES and GS as well as tessellation shaders at runtime easier. Reviewed-by: Michel Dänzer <[email protected]>
* tgsi/ureg: enable creating tessellation shaders with ureg_create_shaderMarek Olšák2015-05-261-4/+14
| | | | Reviewed-by: Ilia Mirkin <[email protected]>
* tgsi/text: enable parsing tessellation shadersMarek Olšák2015-05-261-0/+4
| | | | Reviewed-by: Ilia Mirkin <[email protected]>
* gallium: rename TGSI tessellation processor types to match pipe shader namesMarek Olšák2015-05-265-17/+17
| | | | | | I forgot to do this when pushing the interface changes. Reviewed-by: Ilia Mirkin <[email protected]>
* gallium: use const in set_tess_stateMarek Olšák2015-05-262-4/+4
| | | | Reviewed-by: Ilia Mirkin <[email protected]>
* clover: Build fix for FreeBSD.Koop Mast2015-05-261-0/+1
| | | | Cc: 10.6 10.5 <[email protected]>
* nv30: falling back to draw path for edgeflag does no goodIlia Mirkin2015-05-251-3/+2
| | | | | | | | | The problem is that the EDGEFLAG has to be toggled at vertex submission time. This can be done from either the draw or the regular paths. Avoid falling back to draw just because there's an edgeflag. Signed-off-by: Ilia Mirkin <[email protected]> Cc: "10.5 10.6" <[email protected]>
* nv30/draw: switch varying hookup logic to know about texcoordsIlia Mirkin2015-05-251-9/+16
| | | | | | | | | | | | Commit 8acaf862dfe switched things over to use TEXCOORD instead of GENERIC, but did not update the nv30 swtnl draw paths. This teaches the draw logic about TEXCOORD. Among other things, this fixes a crash in demos/arbocclude when using swtnl. Curiously enough, the point-sprite piglit works without this. Signed-off-by: Ilia Mirkin <[email protected]> Cc: "10.5 10.6" <[email protected]>
* nv30/draw: allocate vertex buffers in gartIlia Mirkin2015-05-251-6/+10
| | | | | | | | | | These are only used once per draw, so it makes sense to keep them in GART. Also take this opportunity to modernize the buffer mapping API usage. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Ben Skeggs <[email protected]> Cc: "10.5 10.6" <[email protected]>
* nv30/draw: only use the DMA1 object (GART) if the bo is not in VRAMIlia Mirkin2015-05-251-3/+3
| | | | | | | | | Instead of always having it in the data, let the bo placement decide it. This fixes glxgears with swtnl forced on. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Ben Skeggs <[email protected]> Cc: "10.5 10.6" <[email protected]>
* nv30/draw: fix indexed draws with swtnl path and a resource index bufferIlia Mirkin2015-05-251-3/+3
| | | | | | | The map = assignment was missing. Signed-off-by: Ilia Mirkin <[email protected]> Cc: "10.5 10.6" <[email protected]>
* llvmpipe: (trivial) add parantheses in (!x == y) expressionRoland Scheidegger2015-05-251-1/+1
| | | | | | | Apparently some compilers think we probably wanted to do !(x == y) instead and issue a warning, so just shut it up... No functional change, obviously. Cc: <[email protected]>
* nv30/draw: draw expects constbuf size in bytes, not vec4 unitsIlia Mirkin2015-05-251-1/+1
| | | | | | | | This fixes glxgears with NV30_SWTNL=1 forced on. Probably fixes a bunch of other situations where we fall back to the swtnl path. Signed-off-by: Ilia Mirkin <[email protected]> Cc: "10.5 10.6" <[email protected]>
* nv30/draw: avoid leaving stale pointers in draw stateIlia Mirkin2015-05-251-4/+4
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Cc: "10.5 10.6" <[email protected]>
* nv30: fix clip plane uploads and enable changesIlia Mirkin2015-05-241-9/+7
| | | | | | | | | | | | nv30_validate_clip depends on the rasterizer state. Also we should upload all the new clip planes on change since next time the plane data won't have changed, but the enables might. This fixes fixed-clip-enables and vs-clip-vertex-enables shader tests. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Tobias Klausmann <[email protected]> Cc: "10.5 10.6" <[email protected]>
* nv30: avoid doing extra work on clear and hitting unexpected statesIlia Mirkin2015-05-245-9/+11
| | | | | | | | | | | | Clearing can happen at a time when various state objects are incoherent and not ready for a draw. Some of the validation functions don't handle this well, so only flush the framebuffer state. This has the advantage of also not doing extra work. This works around some crashes that can happen when clearing. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Tobias Klausmann <[email protected]>
* nv30: avoid leaking render state and draw shadersIlia Mirkin2015-05-243-0/+16
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Cc: "10.5 10.6" <[email protected]>
* nv30: don't leak fragprog constsIlia Mirkin2015-05-241-0/+1
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Cc: "10.5 10.6" <[email protected]>
* nv50/ir: avoid messing up arg1 of PFETCHIlia Mirkin2015-05-231-2/+18
| | | | | | | | | | | | | | There can be scenarios where the "indirect" arg of a PFETCH becomes known, and so the code will attempt to propagate it. Use this opportunity to just fold it into the first argument, and prevent the load propagation pass from touching PFETCH further. This fixes gs-input-array-vec4-index-rd.shader_test and vs-output-array-vec4-index-wr-before-gs.shader_test on nvc0 at least. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Tobias Klausmann <[email protected]> Cc: "10.5 10.6" <[email protected]>
* clover: try userptr for CL_MEM_USE_HOST_PTRGrigori Goronzy2015-05-242-4/+15
| | | | | | | | | | | | According to spec, CL_MEM_USE_HOST_PTR should directly use host memory, if possible. This is just what userptr is for, so use it. In case the memory cannot be mapped, a fallback similar to CL_MEM_COPY_HOST_PTR is used. v2: constify, drop unneeded cast Reviewed-by: Francisco Jerez <[email protected]>
* clover: implement CL_MEM_ALLOC_HOST_PTRGrigori Goronzy2015-05-241-0/+4
| | | | | | | | | | This flag is typically used to request pinned host memory, to avoid any copies between GPU and CPU. This improves throughput with an older OpenCL app which I unfortunately can't publish due to its licensing. Reviewed-by: Francisco Jerez <[email protected]>
* nv30: check nouveau_bo_map output of notify boIlia Mirkin2015-05-231-1/+1
| | | | Signed-off-by: Ilia Mirkin <[email protected]>
* nvc0: a geometry shader can have up to 1024 vertices outputIlia Mirkin2015-05-231-1/+1
| | | | | | | | The 1024 is already reported everywhere, not sure where this 0x1ff came from. Signed-off-by: Ilia Mirkin <[email protected]> Cc: "10.5 10.6" <[email protected]>
* nv50: fix PIPE_QUERY_TIMESTAMP_DISJOINT, based on nvc0Samuel Pitoiset2015-05-231-17/+22
| | | | | | | | | PIPE_QUERY_TIMESTAMP_DISJOINT could not work because q->ready was always set to FALSE. To fix this issue, add more different states for queries according to nvc0. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* nvc0/ir: LOAD's can't be used for shader inputsIlia Mirkin2015-05-222-0/+2
| | | | | | | | | | We forgot to convert to VFETCH in case of indirect access. Fix that. This avoids crashes on the new gs-input-array-vec4-index-rd and vs-output-array-vec4-index-wr-before-gs but they still fail. Signed-off-by: Ilia Mirkin <[email protected]> Cc: "10.5 10.6" <[email protected]>
* nv50/ir: guess that the constant offset is the starting slot of arrayIlia Mirkin2015-05-221-2/+4
| | | | | | | | When we get something like IN[ADDR[0].x+5], we will now guess that we should look at IN[5] for the "base" information. Signed-off-by: Ilia Mirkin <[email protected]> Cc: "10.5 10.6" <[email protected]>
* nvc0/ir: set ftz when sources are floats, not just destinationsIlia Mirkin2015-05-221-3/+2
| | | | | | | | In the case of a compare, the destination might be a predicate, but we still want to flush denorms. Signed-off-by: Ilia Mirkin <[email protected]> Cc: "10.5 10.6" <[email protected]>
* nv50/ir: allow OP_SET to merge with OP_SET_AND/etc as well as a negIlia Mirkin2015-05-221-26/+55
| | | | | | | | | | | | | | | | | | | | This covers the pattern where a KILL_IF is used, which triggers a comparison of -x to 0. This can usually be folded into the comparison whose result is being compared to 0, however it may, itself, have already been combined with another comparison. That shouldn't impact the logic of this pass however. With this and the & 1.0 change, code like 00000020: 001c0001 80081df4 set b32 $r0 lt f32 $r0 0x3e800000 00000028: 001c0000 201fc000 and b32 $r0 $r0 0x3f800000 00000030: 7f9c001e dd885c00 set $p0 0x1 lt f32 neg $r0 0x0 00000038: 0000003c 19800000 $p0 discard becomes 00000020: 001c001d b5881df4 set $p0 0x1 lt f32 $r0 0x3e800000 00000028: 0000003c 19800000 $p0 discard Signed-off-by: Ilia Mirkin <[email protected]>
* nvc0/ir: optimize set & 1.0 to produce boolean-float setsIlia Mirkin2015-05-222-0/+29
| | | | | | | | This has started to happen more now that the backend is producing KILL_IF more often. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Tobias Klausmann <[email protected]>
* nvc0/ir: allow iset to produce a boolean floatIlia Mirkin2015-05-223-5/+16
| | | | Signed-off-by: Ilia Mirkin <[email protected]>
* nvc0/ir: avoid jumping to a sched instructionIlia Mirkin2015-05-223-2/+9
| | | | Signed-off-by: Ilia Mirkin <[email protected]>
* nv50: fix PIPELINE_STATISTICS with HUD, based on nvc0Samuel Pitoiset2015-05-221-1/+2
| | | | | | | Tested on NVA8. No regression for ARB_pipeline_statistics piglit tests. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* nv50: fix 64-bit queries with HUD, based on nvc0Samuel Pitoiset2015-05-221-1/+13
| | | | | | | | | A sequence number is written for 32-bits queries to make sure they are ready, but not for 64-bits queries. Instead, we have to use a fence in order to fix the HUD because it doesn't wait until the result is ready. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* radeon/vce: adapt new firmware interface changesChristian König2015-05-224-2/+252
| | | | | | | | | v2: make this also compatible with original released firmware v3 (chk): switch to original idea of separate files for fw versions Signed-off-by: Leo Liu <[email protected]> Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> (v2)
* radeon/vce: move CPB handling function into common codeChristian König2015-05-223-29/+48
| | | | | | They are not firmware version dependent. Signed-off-by: Christian König <[email protected]>
* u_math: uses assert, include assert.hDave Airlie2015-05-221-0/+1
| | | | | | | | | | | this fixes a build problem found on RHEL s390. not sure what configure options caused it, I couldn't get it on x86 here. Reviewed-by: Brian Paul <[email protected]> Cc: "10.6" [email protected] Signed-off-by: Dave Airlie <[email protected]>
* freedreno/a3xx: set .zw of sprite coords to .01Ilia Mirkin2015-05-201-3/+6
| | | | | | | | Fixes non-determinism in bin/point-sprite rendering, and the stars on the intro screen to neverball. Cc: "10.6" <[email protected]> Signed-off-by: Ilia Mirkin <[email protected]>
* freedreno/ir3: fix immediate usage in tgsi tex feIlia Mirkin2015-05-201-5/+9
| | | | | | | | get_immediate will return a const reference, the requested immediate isn't necessarily in the x slot. Make sure to use the swizzle. Signed-off-by: Ilia Mirkin <[email protected]> Cc: [email protected]
* targets/osmesa: drop the -module tag from LDFLAGSEmil Velikov2015-05-201-1/+0
| | | | | | | | Gallium equivalent of commit 06ff751f97f(darwin: Fix install name of libOSMesa) Cc: "10.5 10.6" <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* nir: Get rid of the array elements parameter on load/store intrinsicsJason Ekstrand2015-05-203-13/+0
| | | | | | | | | | | | | Previously, we used intrinsic->const_index[1] to represent "the number of array elements to load" for load/store intrinsics. However, this set to 1 by every pass that ever creates a load/store intrinsic. Also, while it might make some sense for registers, it makes no sense whatsoever in SSA. On top of that, the i965 backend was the only backend to ever support it; freedreno and vc4 just assert that it's always 1. Let's just delete it. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Connor Abbott <[email protected]> Reviewed-by: Rob Clark <[email protected]>
* gallium: remove TGSI_SAT_MINUS_PLUS_ONEMarek Olšák2015-05-2020-188/+47
| | | | | | | | It's a remnant of some old NV extension. Unused. I also have a patch that removes predicates if anyone is interested. Reviewed-by: Roland Scheidegger <[email protected]>
* cso: add context cleanup code from st/mesaMarek Olšák2015-05-201-0/+7
| | | | | | | | | | This fixes a crash in nouveau which can't handle set_constant_buffer(PIPE_SHADER_TESS_*). Cc: 10.6 <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]> Reviewed-by: Tobias Klausmann <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* softpipe: start adding gather support (v2)Dave Airlie2015-05-203-83/+210
| | | | | | | | | | | | | | This adds both ARB_texture_gather and the enhanced gather for ARB_gpu_shader5. This passes all the piglit tests, it relies on the GLSL lowering pass to make textureGatherOffsets work. v2: use inline to get gather component (Brian) fix function name, add asserts (Brian) Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Dave Airlie <[email protected]>