if (val == value[0].u[0])
val = value2[0].u[0];
break;
+ case TGSI_OPCODE_ATOMFADD:
+ val = fui(r[0].f[0] + value[0].f[0]);
+ break;
default:
break;
}
case TGSI_OPCODE_ATOMUMAX:
case TGSI_OPCODE_ATOMIMIN:
case TGSI_OPCODE_ATOMIMAX:
+ case TGSI_OPCODE_ATOMFADD:
exec_atomop(mach, inst);
break;
OPCODE(0, 0, NONE, BGNSUB, .post_indent = 1)
OPCODE(0, 0, NONE, ENDLOOP, .is_branch = 1, .pre_dedent = 1)
OPCODE(0, 0, NONE, ENDSUB, .pre_dedent = 1)
-OPCODE_GAP(103) /* removed */
+OPCODE(1, 3, OTHR, ATOMFADD, .is_store = 1)
OPCODE(1, 1, OTHR, TXQS, .is_tex = 1)
OPCODE(1, 1, OTHR, RESQ)
OPCODE(1, 1, COMP, READ_FIRST)
case TGSI_OPCODE_ATOMUMAX:
case TGSI_OPCODE_ATOMIMIN:
case TGSI_OPCODE_ATOMIMAX:
+ case TGSI_OPCODE_ATOMFADD:
if (tgsi_is_bindless_image_file(fullinst->Src[0].Register.File)) {
info->uses_bindless_images = true;
case TGSI_OPCODE_ATOMUMAX:
case TGSI_OPCODE_ATOMIMIN:
case TGSI_OPCODE_ATOMIMAX:
+ case TGSI_OPCODE_ATOMFADD:
if (src_idx == 0) {
read_mask = TGSI_WRITEMASK_XY; /* bindless handle possible */
} else if (src_idx == 1) {
resource[offset] = dst_x + src_x
+.. opcode:: ATOMFADD - Atomic floating point addition
+
+ Syntax: ``ATOMFADD dst, resource, offset, src``
+
+ Example: ``ATOMFADD TEMP[0], BUFFER[0], TEMP[1], TEMP[2]``
+
+ The following operation is performed atomically:
+
+.. math::
+
+ dst_x = resource[offset]
+
+ resource[offset] = dst_x + src_x
+
+
.. opcode:: ATOMXCHG - Atomic exchange
Syntax: ``ATOMXCHG dst, resource, offset, src``
TGSI_OPCODE_BGNSUB = 100,
TGSI_OPCODE_ENDLOOP = 101,
TGSI_OPCODE_ENDSUB = 102,
- /* gap */
+ TGSI_OPCODE_ATOMFADD = 103,
TGSI_OPCODE_TXQS = 104,
TGSI_OPCODE_RESQ = 105,
TGSI_OPCODE_READ_FIRST = 106,