summaryrefslogtreecommitdiff
path: root/src/gallium/docs
AgeCommit message (Collapse)AuthorFilesLines
2013-02-04gallium: add SQRT shader opcodeBrian Paul1-0/+9
The glsl-to-tgsi translater will emit SQRT to implement GLSL's sqrt() and distance() functions if the PIPE_SHADER_CAP_TGSI_SQRT_SUPPORTED query says it's supported by the driver. Otherwise, sqrt(x) is implemented with x*rsq(x). The problem with this is sqrt(0) must be handled specially because rsq(0) might be Inf/NaN/undefined (and then 0*rsq(0) is Inf/Nan/undefined). In the glsl-to-tgsi code we use an extra CMP to check if x is zero and then replace the result of x*rsq(x) with zero. In the end, this makes sqrt() generate much more reasonable code for drivers that can do square roots. Note that many of piglit's generated shader tests use the GLSL distance() function.
2013-01-30gallium: add PIPE_CAP_TEXTURE_BUFFER_OFFSET_ALIGNMENTChristoph Bumiller1-0/+3
Reviewed-by: Brian Paul <brianp@vmware.com>
2013-01-15gallium: remove PIPE_CAP_DEPTHSTENCIL_CLEAR_SEPARATEMarek Olšák2-4/+1
Reviewed-by: Brian Paul <brianp@vmware.com>
2012-12-20gallium: s/PIPE_CAP_TIMER_QUERY/PIPE_CAP_QUERY_TIME_ELAPSED/José Fonseca1-1/+1
To better reflect what it is being advertised. Reviewed-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Marek Olšák <maraeo@gmail.com> Reviewed-by: Brian Paul <brianp@vmware.com>
2012-10-31gallium: expose ARB_map_buffer_alignment on RadeonMarek Olšák1-0/+6
Reviewed-by: Brian Paul <brianp@vmware.com> v2: update relnotes-9.1 v3: use align_malloc and align_free for malloced buffers in r300g v4: document the new CAP in the docs
2012-10-24gallium/docs: fix sphinx warningAndreas Boll1-1/+1
src/gallium/docs/source/context.rst:495: WARNING: malformed hyperlink target. Reviewed-by: Brian Paul <brianp@vmware.com>
2012-10-15gallium/docs: update some distro informationAndreas Boll2-8/+37
Reviewed-by: Brian Paul <brianp@vmware.com>
2012-10-11gallium: unify transfer functionsMarek Olšák1-13/+11
"get_transfer + transfer_map" becomes "transfer_map". "transfer_unmap + transfer_destroy" becomes "transfer_unmap". transfer_map must create and return the transfer object and transfer_unmap must destroy it. transfer_map is successful if the returned buffer pointer is not NULL. If transfer_map fails, the pointer to the transfer object remains unchanged (i.e. doesn't have to be NULL). Acked-by: Brian Paul <brianp@vmware.com>
2012-09-30gallium: remove resource_resolveMarek Olšák2-15/+1
The functionality is provided by the new blit function. Tested-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Brian Paul <brianp@vmware.com>
2012-09-30gallium: add blit into the interfaceMarek Olšák1-0/+9
Tested-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Brian Paul <brianp@vmware.com>
2012-09-25gallium: Add PIPE_COMPUTE_CAP_MAX_MEM_ALLOC_SIZE v2Tom Stellard1-0/+2
v2: - Add comment in screen.rst - Report OpenCL required minimum for r600g
2012-09-17gallium: add new pipe_screen::can_create_resource() functionBrian Paul1-0/+10
Used to implement proxy textures. If a gallium driver doesn't implement this function we'll just continue to use the core Mesa fallback code. Without this hook we really have no good way to implement OpenGL proxy textures with gallium drivers. Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2012-07-10gallium/docs: document interface changes for timestamp queryMarek Olšák1-0/+10
the query type is already documented
2012-06-19gallium: Add PIPE_CAP_START_INSTANCEFredrik Höglund1-1/+2
Reviewed-by: Brian Paul <brianp@vmware.com>
2012-06-01gallium/compute: Add PIPE_COMPUTE_CAP_IR_TARGET v4Francisco Jerez1-0/+5
v2: Tom Stellard - Update CAP description v3: Tom Stellard - TGSI targets should pass an empty string for this CAP. v4: Tom Stellard - TGSI targets can ignore this CAP. Reviewed-by: Francisco Jerez <currojerez@riseup.net>
2012-05-25gallium/docs: beef up the docs related to color clampingBrian Paul2-3/+18
Reviewed-by: Marek Olšák <maraeo@gmail.com>
2012-05-12clover, gallium: add PIPE_COMPUTE_CAP_MAX_THREADS_PER_BLOCKChristoph Bumiller1-0/+5
This is not necessarily the product of MAX_BLOCK_SIZE[i]. Reviewed-by: Tom Stellard <thomas.stellard@amd.com> Reviewed-by: Francisco Jerez <currojerez@riseup.net>
2012-05-12gallium/docs: remove documentation of redefine_user_bufferMarek Olšák1-14/+0
2012-05-11Merge branch 'gallium-userbuf'Marek Olšák1-0/+9
Conflicts: src/gallium/docs/source/screen.rst src/gallium/drivers/nv50/nv50_state.c src/gallium/include/pipe/p_defines.h src/mesa/state_tracker/st_draw.c
2012-05-11gallium/compute: Drop TGSI dependency.Francisco Jerez1-0/+2
Add a shader cap for specifying the preferred shader representation. Right now the only supported value is TGSI, other enum values will be added as they are needed. This is mainly to accommodate AMD's LLVM compiler back-end by letting it bypass the TGSI representation for compute programs. Other drivers will keep using the common TGSI instruction set. Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
2012-05-11gallium/tgsi: Introduce the "LOCAL" register declaration modifier.Francisco Jerez1-0/+6
This change will be useful to implement function parameter passing on top of TGSI. As we don't have a proper stack, a register-based calling convention will be used instead, which isn't necessarily a bad thing given that GPUs often have plenty of registers to spare. Using the same register space for local temporaries and inter-procedural communication caused some inefficiencies, because in some cases the register allocator would lose the freedom to merge temporary values together into the same physical register, leading to suboptimal register (and sometimes, as a side effect, instruction) usage. The LOCAL declaration modifier specifies that the value isn't intended for parameter passing and as a result the compiler doesn't have to give any guarantees of it being preserved across function boundaries. Ignoring the LOCAL flag doesn't change the semantics of a valid program in any way, because local variables are just supposed to get a more relaxed treatment. IOW, this should be a backwards-compatible change.
2012-05-11gallium/tgsi: Add support for atomic opcodes.Francisco Jerez1-0/+164
2012-05-11gallium/tgsi: Add support for barriers.Francisco Jerez1-0/+49
2012-05-11gallium/tgsi: Add resource write-back support.Francisco Jerez2-2/+29
Define a new STORE opcode with a role dual to the LOAD opcode, and add flags to specify that a shader resource is intended for writing.
2012-05-11gallium/tgsi: Add support for raw resources.Francisco Jerez1-1/+14
Normal resource access (e.g. the LOAD TGSI opcode) is supposed to perform a series of conversions to turn the texture data as it's found in memory into the target data type. In compute programs it's often the case that we only want to access the raw bits as they're stored in some buffer object, and any kind of channel conversion and scaling is harmful or inefficient, especially in implementations that lack proper hardware support to take care of it -- in those cases the conversion has to be implemented in software and it's likely to result in a performance hit even if the pipe_buffer and declaration data types are set up in a way that would just pass the data through. Add a declaration flag that marks a resource as typeless. No channel conversion will be performed in that case, and the X coordinate of the address vector will be interpreted in byte units instead of elements for obvious reasons. This is similar to D3D11's ByteAddressBuffer, and will be used to implement OpenCL's constant arguments. The remaining four compute memory spaces can also be understood as raw resources.
2012-05-11gallium/tgsi: Move interpolation info from tgsi_declaration to a separate token.Francisco Jerez1-9/+15
Move Interpolate, Centroid and CylindricalWrap from tgsi_declaration to a separate token -- they only make sense for FS inputs and we need room for other flags in the top-level declaration token.
2012-05-11gallium: Add context hooks for binding shader resources.Francisco Jerez2-1/+23
2012-05-11gallium/tgsi: Split sampler views from shader resources.Francisco Jerez1-40/+81
This commit splits the current concept of resource into "sampler views" and "shader resources": "Sampler views" are textures or buffers that are bound to a given shader stage and can be read from in conjunction with a sampler object. They are analogous to OpenGL texture objects or Direct3D SRVs. "Shader resources" are textures or buffers that can be read and written from a shader. There's no support for floating point coordinates, address wrap modes or filtering, and, unlike sampler views, shader resources are global for the whole graphics pipeline. They are analogous to OpenGL image objects (as in ARB_shader_image_load_store) or Direct3D UAVs. Most hardware is likely to implement shader resources and sampler views as separate objects, so, having the distinction at the API level simplifies things slightly for the driver. This patch introduces the SVIEW register file with a declaration token and syntax analogous to the already existing RES register file. After this change, the SAMPLE_* opcodes no longer accept a resource as input, but rather a SVIEW object. To preserve the functionality of reading from a sampler view with integer coordinates, the SAMPLE_I(_MS) opcodes are introduced which are similar to LOAD(_MS) but take a SVIEW register instead of a RES register as argument.
2012-05-11gallium: Basic compute interface.Francisco Jerez2-1/+66
Define an interface that exposes the minimal functionality required to implement some of the popular compute APIs. This commit adds entry points to set the grid layout and other state required to keep track of the usual address spaces employed in compute APIs, to bind a compute program, and execute it on the device. Reviewed-by: Marek Olšák <maraeo@gmail.com>
2012-04-30gallium: add PIPE_CAP_CONSTANT_BUFFER_OFFSET_ALIGNMENTMarek Olšák1-0/+2
This is required for any serious constant buffer support. Constant buffer offsets on ATI and NVIDIA DX10 and DX11 GPUs must be a multiple of 256. In OpenGL, this can be queried via GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT.
2012-04-30gallium: add PIPE_CAP_USER_INDEX_BUFFERS and PIPE_CAP_USER_CONSTANT_BUFFERSMarek Olšák1-0/+6
2012-04-24gallium/docs: document the new vertex fetch CAPsMarek Olšák1-0/+12
2012-04-13gallium: document dual source blending restrictions on galliumDave Airlie1-1/+5
As per Brian's suggestion, document the restrictions on dual src blending. Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-04-13gallium: rename DUAL_SOURCE_BLEND cap to MAX_DUAL_SOURCE_RENDER_TARGETSDave Airlie1-1/+1
Though I don't think we'll ever expose > 1. Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-04-06gallium/docs: fix typosBrian Paul1-2/+2
2012-03-06gallium: add llvm-related TODOs. (v2)Dave Airlie1-0/+21
This is just a simple text file containing a list of goals for gallivm/llvmpipe and some info on what is required to get there along with some info on who is looking at things. v2: add EXT_texture_array. Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Brian Paul <brianp@vmware.com>
2012-02-09gallium: add PIPE_CAP_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTIONChristoph Bumiller2-3/+6
Just let the hardware do it if it can and avoid drivers having to check for the special case on each draw call. v2: update the draw module
2012-01-29st/mesa: add PIPE_CAP_GLSL_FEATURE_LEVEL, cleanup st_extensions.cMarek Olšák1-0/+3
v2: handle the cap in r300 and r600 as well Additional info for r600g: The env var R600_GLSL130=1 enables GLSL 1.3. Along with R600_STREAMOUT=1, it enables full GL 3.
2012-01-25gallium/docs: document more CAPsMarek Olšák1-0/+20
2012-01-10Squash-merge branch 'gallium-clip-state'Marek Olšák2-0/+25
Conflicts: src/gallium/auxiliary/tgsi/tgsi_strings.c src/mesa/state_tracker/st_atom_clip.c commit d919791f2742e913173d6b335128e7d4c63c0840 Author: Christoph Bumiller <e0425955@student.tuwien.ac.at> Date: Fri Jan 6 17:59:22 2012 +0100 d3d1x: adapt to new clip state commit cfec82bca3fefcdefafca3f4555285ec1d1ae421 Author: Christoph Bumiller <e0425955@student.tuwien.ac.at> Date: Fri Jan 6 14:16:51 2012 +0100 gallium/docs: update for clip state changes commit c02bfeb81ad9f62041a2285ea6373bbbd602912a Author: Christoph Bumiller <e0425955@student.tuwien.ac.at> Date: Fri Jan 6 14:21:43 2012 +0100 tgsi: add TGSI_PROPERTY_PROHIBIT_UCPS commit d4e0a785a6a23ad2f6819fd72e236acb9750028d Author: Brian Paul <brianp@vmware.com> Date: Thu Jan 5 08:30:00 2012 -0700 tgsi: consolidate TGSI string arrays in new tgsi_strings.h There was some duplication between the tgsi_dump.c and tgsi_text.c files. Also use some static assertions to help catch errors when adding new TGSI values. v2: put strings in tgsi_strings.c file instead of the .h file. Reviewed-by: Dave Airlie <airlied@redhat.com> commit c28584ce0d8c62bd92c8f140729d344f88a0b3cd Author: Christoph Bumiller <e0425955@student.tuwien.ac.at> Date: Fri Jan 6 12:48:09 2012 +0100 gallium: extend user_clip_plane_enable to apply to clip distances commit f1d5016c07f786229ed057effbe55fbfd160b019 Author: Marek Olšák <maraeo@gmail.com> Date: Fri Jan 6 02:39:09 2012 +0100 nvfx: adapt to new clip state commit 6f6fa1c26bd19f797c1996731708e3569c9bfe24 Author: Marek Olšák <maraeo@gmail.com> Date: Fri Jan 6 01:41:39 2012 +0100 st/mesa: fix DrawPixels with GL_DEPTH_CLAMP commit c86ad730aa1c017788ae88a55f54071bf222be12 Author: Christoph Bumiller <e0425955@student.tuwien.ac.at> Date: Tue Jan 3 23:51:30 2012 +0100 nv50: adapt to new clip state commit 3a8ae6ac243bae5970729dc4057fe02d992543dc Author: Christoph Bumiller <e0425955@student.tuwien.ac.at> Date: Tue Jan 3 23:32:36 2012 +0100 nvc0: adapt to new clip state commit 6243a8246997f8d2fcc69ab741a2c2dea080ff11 Author: Marek Olšák <maraeo@gmail.com> Date: Thu Dec 29 01:32:51 2011 +0100 draw: initalize pt.user.planes in draw_init This fixes a crash in glean/fpexceptions. commit e3056524b19b56d473f4faff84ffa0eb41497408 Author: Marek Olšák <maraeo@gmail.com> Date: Mon Dec 26 06:26:55 2011 +0100 svga: adapt to new clip state commit c5bfa8b37d6d489271df457229081d6bbb51b4b7 Author: Marek Olšák <maraeo@gmail.com> Date: Sun Dec 25 14:11:51 2011 +0100 r600g: adapt to new clip state commit f11890905362f62627c4a28a8255b76eb7de7df2 Author: Marek Olšák <maraeo@gmail.com> Date: Sun Dec 25 14:10:26 2011 +0100 r300g: adapt to new clip state commit e37465327c79a01112f15f6278d9accc5bf3103f Author: Marek Olšák <maraeo@gmail.com> Date: Sun Dec 25 12:39:16 2011 +0100 draw: adapt to new clip state This adds a regression in the LLVM clipping path. Can anybody see anything wrong with the code? It works for every other case, just glean/fpexceptions crashes when doing the "Infinite clip plane test". commit b474d2b18c72d965eefae4e427c269cba5ce6ba2 Author: Marek Olšák <maraeo@gmail.com> Date: Sun Dec 25 13:14:59 2011 +0100 u_blitter: don't save/set/restore clip state commit 9dd240ea91f523a677af45e8d0adb9e661e28602 Author: Marek Olšák <maraeo@gmail.com> Date: Sun Dec 25 13:11:56 2011 +0100 gallium: don't cso_save/set/restore clip state The enable bits are in the rasterizer state. commit a4f7031179f5f4ad524b34b394214b984ac950f6 Author: Marek Olšák <maraeo@gmail.com> Date: Sun Dec 25 12:58:55 2011 +0100 gallium: default depth_clip to 1 depth_clip = !depth_clamp commit fe21147a00ab90e549d63fe12ee4625c9c2ffcc3 Author: Marek Olšák <maraeo@gmail.com> Date: Mon Dec 26 06:14:19 2011 +0100 trace,util: update state logging to new clip state Also dump the other missing flags. commit 2a3b96e84ac872dcc5bc1de049fe76bb58d64b23 Author: Marek Olšák <maraeo@gmail.com> Date: Sun Dec 25 10:43:43 2011 +0100 st/mesa: adapt to new clip state commit b7b656a42fca19d7c85267f42649a206a85a2c72 Author: Marek Olšák <maraeo@gmail.com> Date: Sat Dec 17 15:45:19 2011 +0100 gallium: move state enable bits from clip_state to rasterizer_state
2012-01-07gallium: add an IABS opcode to TGSIBryan Cain1-0/+13
This is a necessary operation that is missing from TGSI. Reviewed-by: Brian Paul <brianp@vmware.com>
2011-12-19tgsi: update documents with some info on texture lookupDave Airlie1-0/+11
this mentions which channels are used for slice and depth comparison values. Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Brian Paul <brianp@vmware.com>
2011-12-15gallium: interface changes necessary to implement transform feedback (v5)Marek Olšák2-20/+44
Namely: - EXT_transform_feedback - ARB_transform_feedback2 - ARB_transform_feedback_instanced The old interface was not useful for OpenGL and had to be reworked. This interface was originally designed for OpenGL, but additional changes have been made in order to make st/d3d1x support easier. The most notable change is the stream-out info must be linked with a vertex or geometry shader and cannot be set independently. This is due to limitations of existing hardware (special shader instructions must be used to write into stream-out buffers), and it's also how OpenGL works (stream outputs must be specified prior to linking shaders). Other than that, each stream output buffer has a "view" into it that internally maintains the number of bytes which have been written into it. (one buffer can be bound in several different transform feedback objects in OpenGL, so we must be able to have several views around) The set_stream_output_targets function contains a parameter saying whether new data should be appended or not. Also, the view can optionally be used to provide the vertex count for draw_vbo. Note that the count is supposed to be stored in device memory and the CPU never gets to know its value. OpenGL way | Gallium way ------------------------------------ BeginTF = set_so_targets(append_bitmask = 0) PauseTF = set_so_targets(num_targets = 0) ResumeTF = set_so_targets(append_bitmask = ~0) EndTF = set_so_targets(num_targets = 0) DrawTF = use pipe_draw_info::count_from_stream_output v2: * removed the reset_stream_output_targets function * added a parameter append_bitmask to set_stream_output_targets, each bit specifies whether new data should be appended to each buffer or not. v3: * added PIPE_CAP_STREAM_OUTPUT_PAUSE_RESUME for ARB_tfb2, note that the draw-auto subset is always required (for d3d10), only the pause/resume functionality is limited if the CAP is not advertised v4: * update gallium/docs v5: * compactified struct pipe_stream_output_info, updated dump/trace
2011-11-30gallium/failover: Remove the deprecated module.Kai Wasserbäch1-11/+0
Signed-off-by: Kai Wasserbäch <kai@dev.carbon-project.org> Signed-off-by: José Fonseca <jfonseca@vmware.com>
2011-11-29i965g: Delete this driver.Kai Wasserbäch1-5/+0
Never completed, and no plans to do so. Signed-off-by: Kai Wasserbäch <kai@dev.carbon-project.org> Signed-off-by: José Fonseca <jfonseca@vmware.com>
2011-11-22gallium: separate out floating-point CAPs into its own enumMarek Olšák1-11/+17
The motivation behind this is to add some self-documentation in the code about how each CAP can be used. The idea is: - enum pipe_cap is only valid in get_param - enum pipe_capf is only valid in get_paramf Which CAPs are floating-point have been determined based on how everybody except svga implemented the functions. svga have been modified to match all the other drivers. Besides that, the floating-point CAPs are now prefixed with PIPE_CAPF_.
2011-11-22gallium: remove PIPE_CAP_GLSL and enable GLSL unconditionallyMarek Olšák1-1/+0
Only i965g does not enable GLSL, but that driver has been unmaintained and bitrotting for quite a while anyway.
2011-11-19gallium/docs: remove obsolete documentationMarek Olšák1-14/+0
2011-10-20gallium: add new query types and missing documentationChristoph Bumiller1-6/+57
2011-10-15gallium: add PIPE_BIND_BLENDABLE flagChristoph Bumiller1-0/+5
This is required for an accurate implementation of d3d1x's CheckFormatSupport query. It also seems generally useful for state trackers, which could choose alternative rendering paths or formats if blending would come at a significant performance loss.