summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* glapi: Encapsulate nop table knowledge in new _mesa_new_nop_table functionIan Romanick2015-05-263-9/+12
| | | | | | | | | | | | Encapsulate the knowledge about how to build the nop table in a new _mesa_new_nop_table function. This makes it easier for dispatch_sanity to keep working now and in the future. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Tested-by: Mark Janes <[email protected]> Cc: 10.6 <[email protected]>
* mesa: do not use _glapi_new_nop_table() for DRI buildsBrian Paul2015-05-261-2/+60
| | | | | | | | | | | | | | | | | | | Commit 4bdbb588a9d38 introduced new _glapi_new_nop_table() and _glapi_set_nop_handler() functions in the glapi dispatcher (which live in libGL.so). The calls to those functions from context.c would be undefined (i.e. an ABI break) if the libGL used at runtime was older. For the time being, use the old single generic_nop() function for non-Windows builds to avoid this problem. At some point in the future it should be safe to remove this work-around. See comments for more details. v2: Incorporate feedback from Emil. Use _WIN32 instead of GLX_DIRECT_RENDERING to control behavior, move comments. Cc: 10.6 <[email protected]> Reviewed-and-tested-by: Ian Romanick <[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]>
* mesa: add some comments in copyimage.cBrian Paul2015-05-261-0/+22
| | | | Reviewed-by: Topi Pohjolainen <[email protected]>
* mesa: move decls, add const qualifiers in copyimage.cBrian Paul2015-05-261-8/+9
| | | | Reviewed-by: Topi Pohjolainen <[email protected]>
* mesa: code clean-ups in textureview.[ch]Brian Paul2015-05-262-33/+55
| | | | Reviewed-by: Topi Pohjolainen <[email protected]>
* mesa: const qualify, return bool for _mesa_texture_view_compatible_format()Brian Paul2015-05-262-8/+8
| | | | Reviewed-by: Topi Pohjolainen <[email protected]>
* mesa: add const qualifer on _mesa_is_compressed_format()Brian Paul2015-05-262-2/+2
| | | | Reviewed-by: Topi Pohjolainen <[email protected]>
* glapi: Avoid argparse type argument for API XML input files.Jose Fonseca2015-05-263-12/+12
| | | | | | | | | | | | | | | | | | | | argparse type is a nice type saver for simple data types, but it doesn't look a good fit for the input XML file: - Certain implementations of argparse (particularly python 2.7.3's) invoke the type constructor for the default argument even when an option is passed in the command line. Causing `No such file or directory: 'gl_API.xml'` when the current dir is not src/mapi/glapi/gen. - The parser takes multiple arguments. This is currently worked around using lambdas, but that unnecessarily complex and hard to read. Furthermore it's odd to have a side-effect as heavy as parsing XML happening deep inside the argument parsing. https://bugs.freedesktop.org/show_bug.cgi?id=90600 Reviewed-by: Brian Paul <[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]>
* i965/skl: Add a message header for the TXF_MCS instruction in vec4vsNeil Roberts2015-05-261-2/+18
| | | | | | | | | | | | | | | When using SIMD4x2 on Skylake, the sampler instructions need a message header to select the correct mode. This was added for most sample instructions in 0ac4c2727 but the TXF_MCS instruction is emitted separately and it was missed. This fixes a bunch of Piglit tests which test texelFetch in a geometry shader, for example: spec/arb_texture_multisample/texelfetch/2-gs-sampler2dms Cc: [email protected] Reviewed-by: Kenneth Graunke <[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]>
* glsl: avoid leaking linked gl_shader when there's a late linker errorIlia Mirkin2015-05-251-2/+8
| | | | | | | | | | This makes piglit mixing-clip-distance-and-clip-vertex-disallowed have 0 definitely lost blocks with valgrind. (Same non-0 number of possibly lost blocks though.) Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Tobias Klausmann <[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]>
* st/mesa: don't leak glsl_to_tgsi object on link failureIlia Mirkin2015-05-251-0/+1
| | | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Cc: "10.5 10.6" <[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]>
* Fix an unused variable warningJason Ekstrand2015-05-251-2/+0
| | | | Trivial. Deleted the 2 unneeded lines.
* 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]>
* i965/fs: Fix implied_mrf_writes for scratch writesJason Ekstrand2015-05-231-1/+1
| | | | | | | | We build the entire message in the generator so all the MRF writes are implied. Cc: "10.5 10.6" <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* prog_to_nir: Use a variable for uniform dataJason Ekstrand2015-05-232-42/+38
| | | | | | | | | | | | | Previously, the prog_to_nir pass was directly generating uniform load/store intrinsics. This converts it to use a single giant "parameters" variable and we now depend on lowering to get the uniform load/store intrinsics. One advantage of this is that we now have one code-path after we do the initial conversion into NIR. No shader-db changes. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Kenneth Graunke <[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]>