mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 00:00:11 +01:00
gallium: add new SAMP2HND and IMG2HND opcodes
This commit does not add support for the opcodes in gallivm or tgsi_to_nir.c Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Signed-off-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
parent
1fb388cd20
commit
00589be6c4
5 changed files with 34 additions and 2 deletions
|
|
@ -153,6 +153,8 @@ tgsi_opcode_infer_type(enum tgsi_opcode opcode)
|
|||
case TGSI_OPCODE_POPC:
|
||||
case TGSI_OPCODE_LSB:
|
||||
case TGSI_OPCODE_UMSB:
|
||||
case TGSI_OPCODE_IMG2HND:
|
||||
case TGSI_OPCODE_SAMP2HND:
|
||||
return TGSI_TYPE_UNSIGNED;
|
||||
case TGSI_OPCODE_ARL:
|
||||
case TGSI_OPCODE_ARR:
|
||||
|
|
|
|||
|
|
@ -162,8 +162,8 @@ OPCODE(1, 1, COMP, IABS)
|
|||
OPCODE(1, 1, COMP, ISSG)
|
||||
OPCODE(1, 2, OTHR, LOAD)
|
||||
OPCODE(1, 2, OTHR, STORE, .is_store = 1)
|
||||
OPCODE_GAP(163) /* removed */
|
||||
OPCODE_GAP(164) /* removed */
|
||||
OPCODE(1, 1, OTHR, IMG2HND)
|
||||
OPCODE(1, 1, OTHR, SAMP2HND, .is_tex = 1)
|
||||
OPCODE_GAP(165) /* removed */
|
||||
OPCODE(0, 0, OTHR, BARRIER)
|
||||
|
||||
|
|
|
|||
|
|
@ -160,6 +160,9 @@ OP13(UCMP)
|
|||
OP11(IABS)
|
||||
OP11(ISSG)
|
||||
|
||||
OP11(IMG2HND)
|
||||
OP11(SAMP2HND)
|
||||
|
||||
OP12(IMUL_HI)
|
||||
OP12(UMUL_HI)
|
||||
|
||||
|
|
|
|||
|
|
@ -2592,6 +2592,31 @@ For these opcodes, the resource can be a BUFFER, IMAGE, or MEMORY.
|
|||
barrier in between.
|
||||
|
||||
|
||||
.. _bindlessopcodes:
|
||||
|
||||
Bindless Opcodes
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
These opcodes are for working with bindless sampler or image handles and
|
||||
require PIPE_CAP_BINDLESS_TEXTURE.
|
||||
|
||||
.. opcode:: IMG2HND - Get a bindless handle for a image
|
||||
|
||||
Syntax: ``IMG2HND dst, image``
|
||||
|
||||
Example: ``IMG2HND TEMP[0], IMAGE[0]``
|
||||
|
||||
Sets 'dst' to a bindless handle for 'image'.
|
||||
|
||||
.. opcode:: SAMP2HND - Get a bindless handle for a sampler
|
||||
|
||||
Syntax: ``SAMP2HND dst, sampler``
|
||||
|
||||
Example: ``SAMP2HND TEMP[0], SAMP[0]``
|
||||
|
||||
Sets 'dst' to a bindless handle for 'sampler'.
|
||||
|
||||
|
||||
.. _threadsyncopcodes:
|
||||
|
||||
Inter-thread synchronization opcodes
|
||||
|
|
|
|||
|
|
@ -506,6 +506,8 @@ enum tgsi_opcode {
|
|||
|
||||
TGSI_OPCODE_LOAD = 161,
|
||||
TGSI_OPCODE_STORE = 162,
|
||||
TGSI_OPCODE_IMG2HND = 163,
|
||||
TGSI_OPCODE_SAMP2HND = 164,
|
||||
/* gap */
|
||||
TGSI_OPCODE_BARRIER = 166,
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue