src/compiler/translator/tree_ops/RewriteAtomicFunctionExpressions.cpp


Log

Author Commit Date CI Message
Qin Jiajia 4622905b 2018-12-10T13:31:00 ES31: Add atomic memory functions for SSBO Due to SSBO is translated to RWByteAddressBuffer in HLSL, the corresponding atomic memory functions atomic* will be translated to RWByteAddressBuffer.Interlocked*. The translation is like below: atomicAdd(instanceName.data[0], 5u); // becomes uint _ssbo_atomicAdd_uint(RWByteAddressBuffer buffer, uint loc, uint value) { uint original_value; buffer.InterlockedAdd(loc, value, original_value); return original_value; } _ssbo_atomicAdd_uint(_instanceName, 0 + 16 * 0, 5); Bug: angleproject:1951 Change-Id: If2af8bedb67a4135b443d2512d43c6058a78888d Reviewed-on: https://chromium-review.googlesource.com/c/1370676 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jiajia Qin <jiajia.qin@intel.com>
Jamie Madill b980c563 2018-11-27T11:34:27 Reformat all cpp and h files. This applies git cl format --full to all ANGLE sources. Bug: angleproject:2986 Change-Id: Ib504e618c1589332a37e97696cdc3515d739308f Reviewed-on: https://chromium-review.googlesource.com/c/1351367 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Bryan Bernhart c55aefe3 2018-08-28T19:59:00 ES31: Support atomic functions on D3D11 - Part III This patch is the third one to support atomic functions on D3D11. In this patch we enable support for atomic function returns outside of assignments (e.g. part of arithmetic operations or to index into arrays) and when used directly initialize a variable. Note that we are still missing the functionality to be tag loops with [allow_uav_condition] as required by InterlockedCompareExchange. BUG=angleproject:2682 TEST=angle_end2end_tests Change-Id: Ia409ebb10621fd5c514cf6c76f366a320a9d9fc1 Reviewed-on: https://chromium-review.googlesource.com/1208317 Reviewed-by: Bryan Bernhart <bryan.bernhart@intel.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Jiawei Shao 35bc74d6 2018-08-03T14:07:59 ES31: Support atomic functions on D3D11 - Part II This patch adds the support of translating atomicExchange and atomicCompSwap without return value on D3D11 back-ends. As the last parameter of the HLSL intrinsic functions InterlockedExchange and InterlockedCompareExchange is not optional, when there is a call of either atomicExchange or atomicCompSwap without return value, we add a temporary variable for it, so that we can directly translate all of such calls in outputHLSL.cpp. BUG=angleproject:2682 TEST=angle_end2end_tests Change-Id: I7e9c6d3c7d1846c865909b2f5a26592846c82582 Reviewed-on: https://chromium-review.googlesource.com/1161744 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>