mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-01 14:00:16 +01:00
gallium/compute: Drop TGSI dependency.
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>
This commit is contained in:
parent
2644952bd4
commit
57c048f291
3 changed files with 13 additions and 2 deletions
|
|
@ -185,6 +185,8 @@ to be 0.
|
|||
If unsupported, only float opcodes are supported.
|
||||
* ``PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS``: THe maximum number of texture
|
||||
samplers.
|
||||
* ``PIPE_SHADER_CAP_PREFERRED_IR``: Preferred representation of the
|
||||
program. It should be one of the ``pipe_shader_ir`` enum values.
|
||||
|
||||
|
||||
.. _pipe_compute_cap:
|
||||
|
|
|
|||
|
|
@ -524,7 +524,16 @@ enum pipe_shader_cap
|
|||
PIPE_SHADER_CAP_INDIRECT_CONST_ADDR = 15,
|
||||
PIPE_SHADER_CAP_SUBROUTINES = 16, /* BGNSUB, ENDSUB, CAL, RET */
|
||||
PIPE_SHADER_CAP_INTEGERS = 17,
|
||||
PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS = 18
|
||||
PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS = 18,
|
||||
PIPE_SHADER_CAP_PREFERRED_IR = 19
|
||||
};
|
||||
|
||||
/**
|
||||
* Shader intermediate representation.
|
||||
*/
|
||||
enum pipe_shader_ir
|
||||
{
|
||||
PIPE_SHADER_IR_TGSI
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -584,7 +584,7 @@ struct pipe_resolve_info
|
|||
|
||||
struct pipe_compute_state
|
||||
{
|
||||
const struct tgsi_token *tokens; /**< Compute program to be executed. */
|
||||
const void *prog; /**< Compute program to be executed. */
|
||||
unsigned req_local_mem; /**< Required size of the LOCAL resource. */
|
||||
unsigned req_private_mem; /**< Required size of the PRIVATE resource. */
|
||||
unsigned req_input_mem; /**< Required size of the INPUT resource. */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue