summaryrefslogtreecommitdiffstats
path: root/src/gallium/include
Commit message (Collapse)AuthorAgeFilesLines
* gallium: remove user_buffer_create from the interfaceMarek Olšák2012-05-121-26/+0
| | | | Nothing uses it now.
* clover, gallium: add PIPE_COMPUTE_CAP_MAX_THREADS_PER_BLOCKChristoph Bumiller2012-05-121-0/+1
| | | | | | | This is not necessarily the product of MAX_BLOCK_SIZE[i]. Reviewed-by: Tom Stellard <[email protected]> Reviewed-by: Francisco Jerez <[email protected]>
* Merge branch 'gallium-userbuf'Marek Olšák2012-05-113-14/+20
|\ | | | | | | | | | | | | | | 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
| * gallium: remove pipe_resource::user_ptrMarek Olšák2012-04-301-3/+0
| | | | | | | | It's unused now.
| * gallium: add void *user_buffer to pipe_constant_bufferMarek Olšák2012-04-301-0/+1
| | | | | | | | This reduces CPU overhead when updating constants.
| * gallium: add void *user_buffer in pipe_index_bufferMarek Olšák2012-04-301-0/+1
| | | | | | | | | | | | | | Adapted drivers: i915, llvmpipe, r300, r600, radeonsi, softpipe. User index buffers have been disabled in nv30, nv50, nvc0 and svga to keep things working.
| * gallium: remove pipe_context::redefine_user_bufferMarek Olšák2012-04-301-9/+0
| |
| * gallium: add void *user_buffer in pipe_vertex_bufferMarek Olšák2012-04-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | This reduces CPU overhead in st_draw_vbo and removes a lot of unnecessary code in that function which was required only to comply with the gallium interface, but wasn't any useful really. Adapted drivers: i915, llvmpipe, r300, softpipe. No changes required in: r600, radeonsi. User vertex buffers have been disabled in nv30, nv50, nvc0 and svga to keep things working.
| * gallium: change set_constant_buffer to be UBO-friendlyMarek Olšák2012-04-302-1/+13
| |
| * gallium: add PIPE_CAP_CONSTANT_BUFFER_OFFSET_ALIGNMENTMarek Olšák2012-04-301-1/+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.
| * gallium: add PIPE_CAP_USER_INDEX_BUFFERS and PIPE_CAP_USER_CONSTANT_BUFFERSMarek Olšák2012-04-301-0/+2
| |
* | gallium/tgsi: s/TGSI_BUFFER/TGSI_TEXTURE_BUFFER/José Fonseca2012-05-111-1/+1
| | | | | | | | | | | | For consistency. Reviewed-by: Brian Paul <[email protected]>
* | gallium/tgsi: Redefine the TGSI_TEXTURE_UNKNOWN texture target.José Fonseca2012-05-111-1/+2
| | | | | | | | | | | | | | | | | | Some code relies on the existing of an invalid texture target. It seems safer to bring it back than to deal with unintended consequences. This partially reverts commit a4ebb04214bab1cd9bd41967232ec89441e31744. Reviewed-by: Brian Paul <[email protected]>
* | gallium/compute: Drop TGSI dependency.Francisco Jerez2012-05-112-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | 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 <[email protected]>
* | gallium/tgsi: Introduce the "LOCAL" register declaration modifier.Francisco Jerez2012-05-111-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | gallium/tgsi: Add support for atomic opcodes.Francisco Jerez2012-05-111-1/+12
| |
* | gallium/tgsi: Add support for barriers.Francisco Jerez2012-05-111-1/+6
| |
* | gallium/tgsi: Define system values used to query the compute grid parameters.Francisco Jerez2012-05-111-1/+5
| |
* | gallium/tgsi: Add resource write-back support.Francisco Jerez2012-05-112-2/+5
| | | | | | | | | | 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.
* | gallium/tgsi: Add support for raw resources.Francisco Jerez2012-05-111-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | gallium/tgsi: Define the TGSI_BUFFER texture target.Francisco Jerez2012-05-111-1/+1
| | | | | | | | | | | | This texture type was already referred to by the documentation but it was never defined. Define it as 0 to match the pipe_texture_target enumeration values.
* | gallium/tgsi: Introduce the compute processor.Francisco Jerez2012-05-111-0/+1
| |
* | gallium/tgsi: Move interpolation info from tgsi_declaration to a separate token.Francisco Jerez2012-05-111-3/+10
| | | | | | | | | | | | 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.
* | gallium: Add context hooks for binding shader resources.Francisco Jerez2012-05-113-0/+35
| |
* | gallium/tgsi: Split sampler views from shader resources.Francisco Jerez2012-05-111-5/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | gallium: Basic compute interface.Francisco Jerez2012-05-115-1/+119
|/ | | | | | | | | | 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 <[email protected]>
* gallium: add CAPs for vertex fetcherMarek Olšák2012-04-241-1/+5
| | | | | Supported vertex formats will be queried using is_format_supported(.., PIPE_BIND_VERTEX_BUFFER, ..).
* gallium: add user_ptr in pipe_resourceMarek Olšák2012-04-241-0/+3
| | | | I need to access the pointer in st/mesa when I only have pipe_resource.
* gallium: remove PIPE_TRANSFER_NOOVERWRITE, use equivalent UNSYNCHRONIZEDMarek Olšák2012-04-181-1/+0
|
* gallium: rename DUAL_SOURCE_BLEND cap to MAX_DUAL_SOURCE_RENDER_TARGETSDave Airlie2012-04-131-1/+1
| | | | | | Though I don't think we'll ever expose > 1. Signed-off-by: Dave Airlie <[email protected]>
* gallium: make get_query_result return union* and not void*Marek Olšák2012-03-302-1/+55
| | | | | | | | | | | | | | | This replaces the cryptic void* parameter with a union. (based on union r600_query_result) Users of this can still pass uint64* in it, but that cannot work for every query type, obviously. Most importantly, the code now documents what should be expected from get_query_result. This also adds pipe_query_data_pipeline_statistics as per the D3D11 docs. v2: fix indentation, add comments and use the doxygen style Reviewed-by: Brian Paul <[email protected]>
* gallium: add R8G8_R8B8 and G8R8_B8R8 formatsChristian König2012-03-091-0/+3
| | | | | | | v2: simplify implementation by using correct swizzle v3: fix mix with successor patch Signed-off-by: Christian König <[email protected]>
* gallium: remove format aliasesChristian König2012-03-081-4/+0
| | | | | | They are incomplete and don't make to much sense. Signed-off-by: Christian König <[email protected]>
* Revert "gallium: add flag PIPE_TRANSFER_MAP_PERMANENTLY"Marek Olšák2012-03-051-16/+0
| | | | | | | This reverts commit 0950086376b1c8b7fb89eda81ed7f2f06dee58bc. It was decided to refactor the transfer API instead of adding workarounds to address the performance issues.
* vl/compositor: replace pipe_video_rect with u_rectChristian König2012-03-021-5/+0
| | | | | | So we support things like flipping also. Signed-off-by: Christian König <[email protected]>
* gallium: remove trailing comma to silence warningBrian Paul2012-02-281-1/+1
|
* gallium: remove PIPE_SHADER_CAP_OUTPUT_READMarek Olšák2012-02-271-1/+0
| | | | | | | | | | | | r600g is the only driver which has made use of it. The reason the CAP was added was to fix some piglit tests when the GLSL pass lower_output_reads didn't exist. However, not removing output reads breaks the fallback for glClampColorARB, which assumes outputs are not readable. The fix would be non-trivial and my personal preference is to remove the CAP, considering that reading outputs is uncommon and that we can now use lower_output_reads to fix the issue that the CAP was supposed to workaround in the first place.
* gallium: remove unused winsys pointers in pipe_screen and pipe_contextMarek Olšák2012-02-213-5/+0
| | | | A winsys is already a private object of a driver.
* gallium: fix some comments in p_state.hBrian Paul2012-02-151-3/+3
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* gallium: add PIPE_CAP_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTIONChristoph Bumiller2012-02-091-1/+2
| | | | | | | 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
* vl: add interlacing capabilitiesChristian König2012-02-061-1/+4
| | | | | | | Let the driver control interlaced or progressive format of video buffers. Signed-off-by: Christian König <[email protected]>
* st-api: fix typos, whitespace, line wrappingBrian Paul2012-02-011-6/+6
|
* gallium: remove trailing comma to silence warningBrian Paul2012-01-291-1/+1
|
* st/mesa: add PIPE_CAP_GLSL_FEATURE_LEVEL, cleanup st_extensions.cMarek Olšák2012-01-291-1/+2
| | | | | | | | 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.
* st/mesa: do vertex and fragment color clamping in shadersMarek Olšák2012-01-251-2/+4
| | | | | | | | | | | | | | For ARB_color_buffer_float. Most hardware can't do it and st/mesa is the perfect place for a fallback. The exceptions are: - r500 (vertex clamp only) - nv50 (both) - nvc0 (both) - softpipe (both) We also have to take into account that r300 can do CLAMPED vertex colors only, while r600 can do UNCLAMPED vertex colors only. The difference can be expressed with the two new CAPs.
* vl: reintroduce PIPE_VIDEO_CAP_PREFERED_FORMATChristian König2012-01-151-1/+2
| | | | | | | Create the video buffers in the format the driver preffers. This temporary creates problems with decoder less VDPAU video playback. Signed-off-by: Christian König <[email protected]>
* vl: add h264 infrastructureChristian König2012-01-151-0/+43
| | | | | | | No implementation so far, just the defines for VDPAUs picture info structure. Signed-off-by: Christian König <[email protected]>
* vl: move away from state like parametersChristian König2012-01-152-38/+18
| | | | | | | Again based on Maartens work, but keep begin_frame and end_frame functions for now. Signed-off-by: Christian König <[email protected]>
* vl/video_buffer: add support for interlaced buffersChristian König2012-01-151-0/+1
| | | | | | Add the infrastructure, but not the decode implementation. Signed-off-by: Christian König <[email protected]>
* vl/video_buffer: use template style create paramsChristian König2012-01-151-3/+1
| | | | | | | Just like in the rest of gallium, this reduces the number of parameters significantly. Signed-off-by: Christian König <[email protected]>