summaryrefslogtreecommitdiffstats
path: root/src/gallium
Commit message (Collapse)AuthorAgeFilesLines
* gallium: Add "pipe-loader" target.Francisco Jerez2012-05-117-0/+315
| | | | | | | | | This target generates pipe driver modules intended to be consumed by auxiliary/pipe-loader. Most of it was taken from the "gbm" target -- the duplicated code will be replaced with references to this target in a future commit. Reviewed-by: Jakob Bornecrantz <[email protected]>
* gallium: Add pipe loader for device enumeration and driver multiplexing.Francisco Jerez2012-05-118-0/+666
| | | | | | | | | | | | | | | | | | | | | | | | | | | The goal is to have a uniform interface to create winsys and pipe_screen instances for any driver, exposing the device enumeration capabilities that might be supported by the operating system (for now there's a "drm" back-end using udev and a "sw" back-end that always returns the same built-in devices). The typical use case of this library will be: > > struct pipe_loader_device devs[n]; > struct pipe_screen *screen; > > pipe_loader_probe(&devs, n); >[pick some device from the array...] > > screen = pipe_loader_create_screen(dev, library_search_path); >[do something with screen...] > > screen->destroy(screen); > pipe_loader_release(&devs, N); > A part of the code was taken from targets/gbm/pipe_loader.c, which will be removed and replaced with calls into this library by a future commit.
* gallium/tgsi/text: Replace open-coded integer parsing with parse_int().Francisco Jerez2012-05-111-17/+3
|
* gallium/tgsi/text: Parse immediates of non-float data types.Francisco Jerez2012-05-111-18/+48
|
* gallium/tgsi: Fix tgsi_build_full_immediate() for non-float data types.Francisco Jerez2012-05-111-22/+8
|
* gallium/tgsi/text: Make label parsing optional for branch instructions.Francisco Jerez2012-05-111-10/+9
| | | | | Structured branch instructions like IF, ELSE, BGNLOOP, ENDLOOP no longer require a label argument, make it optional for them.
* gallium/tgsi/ureg: Support local temporary emission.Francisco Jerez2012-05-112-6/+60
|
* gallium/tgsi/ureg: Lift the restriction on releasing temporaries over ↵Francisco Jerez2012-05-111-27/+22
| | | | UREG_MAX_TEMP.
* gallium/util: Define util_strchrnul.Francisco Jerez2012-05-111-6/+18
| | | | Reviewed-by: Jakob Bornecrantz <[email protected]>
* gallium/compute: Drop TGSI dependency.Francisco Jerez2012-05-113-2/+13
| | | | | | | | | | | | 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-115-27/+54
| | | | | | | | | | | | | | | | | | | | | | | 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-113-2/+188
|
* gallium/tgsi: Add support for barriers.Francisco Jerez2012-05-113-1/+59
|
* gallium/tgsi: Define system values used to query the compute grid parameters.Francisco Jerez2012-05-112-2/+10
|
* gallium/tgsi: Add resource write-back support.Francisco Jerez2012-05-118-4/+45
| | | | | 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-115-4/+40
| | | | | | | | | | | | | | | | | | | | | | | | 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-115-6/+6
| | | | | | 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-115-4/+9
|
* gallium/tgsi: Move interpolation info from tgsi_declaration to a separate token.Francisco Jerez2012-05-1119-74/+141
| | | | | | 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-115-1/+58
|
* gallium/tgsi: Split sampler views from shader resources.Francisco Jerez2012-05-1117-183/+303
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-117-2/+185
| | | | | | | | | | 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]>
* radeonsi: Properly translate vertex format swizzle.Michel Dänzer2012-05-113-23/+23
| | | | egltri_screen works correctly!
* radeon/llvm: Remove AMDILMCCodeEmitter.cppTom Stellard2012-05-102-158/+0
|
* radeon/llvm: Remove SILowerShaderInstructions.cppTom Stellard2012-05-104-81/+0
|
* radeonsi/llvm: Move lowering of RETURN to ConvertToISA passTom Stellard2012-05-102-11/+2
|
* radeon/llvm: Add some commentsTom Stellard2012-05-1064-422/+393
|
* radeon/llvm: Move util functions into AMDGPU namespaceTom Stellard2012-05-103-39/+37
|
* radeon/llvm: Auto-encode RAT_WRITE_CACHELESS_egTom Stellard2012-05-102-17/+0
|
* radeon/llvm: Delete all instructions that have been custom loweredTom Stellard2012-05-101-4/+1
|
* radeonsi: Set NONE format for unused vertex shader position export slots.Michel Dänzer2012-05-101-3/+3
|
* radeonsi: Eliminate one more magic number for texture image resources.Michel Dänzer2012-05-101-3/+3
|
* radeonsi: Fix vertex buffer resource for stride 0.Michel Dänzer2012-05-101-1/+5
|
* radeon/llvm: Remove AMDGPUConstants.pmTom Stellard2012-05-092-45/+23
|
* radeon/llvm: Don't rely on tablegen for lowering int_AMDGPU_load_constTom Stellard2012-05-095-38/+20
|
* radeon/llvm: Make sure the LOAD_CONST def uses the isSI predicateTom Stellard2012-05-092-7/+7
|
* svga: implement CEIL opcode translationBrian Paul2012-05-091-0/+28
| | | | Reviewed-by: José Fonseca <[email protected]>
* gallium/drivers: handle TGSI_OPCODE_CEILChristoph Bumiller2012-05-094-0/+28
|
* r600g: Handle TGSI_OPCODE_CEIL (v2)Kai Wasserbäch2012-05-091-3/+3
| | | | | | | v2: Enabled CEIL on Cayman too. Signed-off-by: Kai Wasserbäch <[email protected]> Reviewed-by: Tom Stellard <[email protected]>
* gallivm: implement iabs/issg opcode.Dave Airlie2012-05-092-1/+26
| | | | | | Reimplemented by Olivier Galibert <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radeon/llvm: Remove AMDILUtilityFunctions.cppTom Stellard2012-05-0813-1041/+399
|
* radeon/llvm: Remove some unused functions from AMDILInstrInfoTom Stellard2012-05-082-164/+0
|
* radeon/llvm: Add some comments and fix coding styleTom Stellard2012-05-088-42/+41
|
* radeon/llvm: Remove the EXPORT_REG instructionTom Stellard2012-05-0810-117/+8
|
* radeon/llvm: Use a custom inserter to lower RESERVE_REGTom Stellard2012-05-0810-27/+83
|
* radeon/llvm: Use a custom inserter to lower STORE_OUTPUTTom Stellard2012-05-084-34/+23
|
* radeon/llvm: Remove AMDGPULowerShaderInstructions classTom Stellard2012-05-086-86/+4
| | | | It is no longer used.
* radeon/llvm: Use a custom inserter to lower LOAD_INPUTTom Stellard2012-05-084-39/+15
|
* radeon/llvm: Remove the ReorderPreloadInstructions passTom Stellard2012-05-089-100/+4
|
* radeon/llvm: Remove old comment from AMDIL.hTom Stellard2012-05-081-5/+0
|