- 03 May, 2019 13 commits
-
-
Ben Clayton authored
Provides a number of template trait types for Reactor primitive types: CToReactorT<T> transforms the C-type (T) into a suitable Reactor equivalent. Pointer types are now generalized, allowing for translations of T** types. IsRValue<T>::value and IsLValue<T>::value are true iff T is of the respective Reactor type. ReactorType<T> resolves to the corresponding LValue Reactor type for T, where T can be a C-type, RValue or LValue. ValueOf<T> returns a rr::Value* for a C-value, RValue or LValue. This is now used by a single definition of Return(), fixing bad type coercion which in turn produced illegal LLVM IR. CanBeUsedAsReturn<T>::value is true iff T can be used as a function return type. CanBeUsedAsParameter<T>::value is true iff T can be used as a function parameter type. Function signatures are now statically checked that all parameter types and the return type are valid, providing a human readable error message if an invalid type is used (verified on gcc, clang and msvc). Added a whole bunch of static asserts in ReactorUnitTests.cpp to sanity check the templates. Bug: b/131914569 Change-Id: I3267354d6a3f68545079365a657757969ec0047d Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/30455 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Tested-by:
Ben Clayton <bclayton@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Ben Clayton authored
Subzero does not support Bools as return types. We were getting away with this as Return() was silently converting this to an Int. Just use an Int as the return type. Bug: b/131914569 Change-Id: I3bff7304b219f66cee7605ddd3cf6a1a75a8612a Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/30457Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Ben Clayton <bclayton@google.com>
-
Ben Clayton authored
The LLVM Unreachable instruction is a terminator instruction. It is illegal to place any instructions after this in the same block. Bug: b/131914569 Change-Id: I6dd4ca4f8ca911dc94ba5674db598078060ef795 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/30453Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Tested-by:
Ben Clayton <bclayton@google.com>
-
Ben Clayton authored
Before finalization, the IR is not verifiable. This should also be finalized before optimization passes. Bug: b/131914569 Change-Id: Ibc5b2bf85369412148565daaf81779dac30d6e8a Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/30452Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Tested-by:
Ben Clayton <bclayton@google.com>
-
Ben Clayton authored
The 2nd boolean parameter is not part of the name (for example llvm.ctlz.i8). Caught by the IR verifier which gets automatically run with coroutines. Bug: b/131914569 Bug: b/126873455 Change-Id: I1ce325c9bf64587f5c9c0a1a0129b80ef19e07f1 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/30449Tested-by:
Ben Clayton <bclayton@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
-
Ben Clayton authored
CoroFrame was not considering array allocas, and was only ever reserving a single element. This meant that stores to the non-zero'th element would corrupt later allocas. Upstreamed here: https://reviews.llvm.org/D61372 Bug: b/131671798 Bug: b/131672705 Change-Id: I15bc750d8332298b696290083fb6a82a2773c768 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/30211 Presubmit-Ready: Ben Clayton <bclayton@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Tested-by:
Ben Clayton <bclayton@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Chris Forbes authored
Bug: b/131171141 Test: dEQP-VK.*r5g6b5* Change-Id: I92058fb4ecc327dd1db67b47c327aa0e5d149135 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/30532Tested-by:
Chris Forbes <chrisforbes@google.com> Presubmit-Ready: Chris Forbes <chrisforbes@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
-
Chris Forbes authored
Test: dEQP-VK.*d16_unorm* Bug: b/131246807 Change-Id: Ifaec74c1a2273af4585dd2423e87db4992cbf14e Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/30531Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Chris Forbes <chrisforbes@google.com> Presubmit-Ready: Chris Forbes <chrisforbes@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
-
Chris Forbes authored
Bug: b/131171141 Test: dEQP-VK.*a2b10g10r10* Change-Id: Ibda1017aefad8d2c045b1c6f87aa2fe2a853e313 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/30530Tested-by:
Chris Forbes <chrisforbes@google.com> Presubmit-Ready: Chris Forbes <chrisforbes@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
-
Chris Forbes authored
Bug: b/131896622 Test: dEQP-VK.*a2b10g10r10* Change-Id: I0c50b14b007bd86dfaff39cf04938860408157f8 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/30529Tested-by:
Chris Forbes <chrisforbes@google.com> Presubmit-Ready: Chris Forbes <chrisforbes@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
-
Chris Forbes authored
This was stomping all over memory beyond the image. Bug: b/nnn Test: dEQP-VK.pipeline.render_to_image.core.* Change-Id: Ie8738da787ea98c0d6431970cf6301bd6b5b5323 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/30528Tested-by:
Chris Forbes <chrisforbes@google.com> Presubmit-Ready: Chris Forbes <chrisforbes@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
SwiftShader Regression Bot authored
Change-Id: I89bf29a4dcbf978d498bbb26d5b735cb13f2ac4e Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/30456Reviewed-by:
Chris Forbes <chrisforbes@google.com> Tested-by:
Chris Forbes <chrisforbes@google.com>
-
Nicolas Capens authored
The third coordinate of the 2D sampling code is only used for 2D array textures, so we don't compute a filter factor. This used to be taken advantage of by passing the filter factor of the second coordinate to the addressing method for the third coordinate, and ensuring that the addressing mode of this component was ADDRESSING_LAYER even for non- array textures. Instead of relying on this brittle hack, just specify a third filter factor. Now that we elide materialization of single-block variables, this doesn't take any stack space and is zero overhead to the backend. Bug: b/129523279 Change-Id: Iee6b0f90bf1cc4ccc41672d3bdb706ff5af0a555 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/30548 Presubmit-Ready: Nicolas Capens <nicolascapens@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Chris Forbes <chrisforbes@google.com>
-
- 02 May, 2019 21 commits
-
-
Chris Forbes authored
Test: dEQP-VK.*b10g11r11* Bug: b/131246807 Change-Id: I3357cb5d6fccd37c1bf612fbc51380b490ded7d0 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/30508Tested-by:
Chris Forbes <chrisforbes@google.com> Presubmit-Ready: Chris Forbes <chrisforbes@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Chris Forbes authored
Bug: b/131246807 Test: dEQP-VK.*d32_sfloat* Change-Id: I1ec0d8eefa7d46422e9b6dd85766f55ae3f21179 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/30488Tested-by:
Chris Forbes <chrisforbes@google.com> Presubmit-Ready: Chris Forbes <chrisforbes@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
Bug: b/129523279 Test: dEQP-VK.texture.* Test: dEQP-VK.glsl.texture_functions.* Change-Id: I12991a2538edec596eedc60d5a94cc3cabfc901b Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/30432 Presubmit-Ready: Nicolas Capens <nicolascapens@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Chris Forbes authored
Bug: b/131246807 Test: dEQP-VK.*e5b9g9r9* Change-Id: Ieb62847c5d86b57a81e718aa325e92e10c961c71 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/30434Tested-by:
Chris Forbes <chrisforbes@google.com> Presubmit-Ready: Chris Forbes <chrisforbes@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Chris Forbes authored
Change-Id: I8e68ecda72c9ac077c81e7a03eb53ec3c43e7812 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/30433Tested-by:
Chris Forbes <chrisforbes@google.com> Presubmit-Ready: Chris Forbes <chrisforbes@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
-
Hernan Liatis authored
Bug: b/122837237 Change-Id: Ic2643d288dd8d217d68cda44ec291c0ea810d4d8 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/30369Reviewed-by:
Chris Forbes <chrisforbes@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Tested-by:
Hernan Liatis <hliatis@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
-
Chris Forbes authored
These are no longer used. Change-Id: I0fde85e2b200663eac2bb32c34f90e78d76ad287 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/30469Tested-by:
Chris Forbes <chrisforbes@google.com> Presubmit-Ready: Chris Forbes <chrisforbes@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
-
Chris Forbes authored
Bug: b/131246807 Test: dEQP-VK.*a1r5g5b5* Change-Id: Iea73786b10dca6f4116a0093218e182a089c5bcf Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/30468Tested-by:
Chris Forbes <chrisforbes@google.com> Presubmit-Ready: Chris Forbes <chrisforbes@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
-
Antonio Maiorano authored
CMakeLists: add DEBUGGER_WAIT_DIALOG compiler definition to Debug builds of libEGL and libvk_swiftshader This matches what's in the manually managed vcxproj for the two modules. We add these for non-MSVC as well so we might eventually add support to those platforms. Note that these are guarded with #ifdef _WIN32 already, so there's no danger of this breaking non-MSVC builds. Change-Id: Ie855eb4aa1006607fdf8799ccde72305c53f3508 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/30028 Presubmit-Ready: Antonio Maiorano <amaiorano@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Ben Clayton <bclayton@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Antonio Maiorano <amaiorano@google.com>
-
Nicolas Capens authored
Factor the duplicate code out of 2D/3D/Cube LOD calculation and add the mipLodBias field from the sampler descriptor. Bug: b/129523279 Test: dEQP-VK.pipeline.sampler.* Change-Id: I7e25fad13fbe3307dddb2dcb853ed638344ee4aa Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/30429 Presubmit-Ready: Nicolas Capens <nicolascapens@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Chris Forbes <chrisforbes@google.com>
-
Nicolas Capens authored
Bug: b/129523279 Change-Id: If4dfa5900ac73643cc8a8052867434d62fa1aa1e Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/30430 Presubmit-Ready: Nicolas Capens <nicolascapens@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Chris Forbes <chrisforbes@google.com>
-
Nicolas Capens authored
Bug: b/129523279 Change-Id: Ifdb1409cf7339ac16b6fe890bc014a2e43801c76 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/30431 Presubmit-Ready: Nicolas Capens <nicolascapens@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Chris Forbes <chrisforbes@google.com>
-
SwiftShader Regression Bot authored
Change-Id: I3b75909a56442b2f7da626c40251ed175dd15936 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/30448Reviewed-by:
Chris Forbes <chrisforbes@google.com> Tested-by:
Chris Forbes <chrisforbes@google.com>
-
Nicolas Capens authored
Bug: b/129523279 Test: dEQP-VK.glsl.texture_functions.* Test: dEQP-VK.spirv_assembly.instruction.graphics.image_sampler.* Change-Id: I26959eb7665af9f35dba81f83b0e0f13a4798865 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/30408 Presubmit-Ready: Nicolas Capens <nicolascapens@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Chris Forbes <chrisforbes@google.com>
-
Nicolas Capens authored
Bug: b/129523279 Test: dEQP-VK.glsl.texture_functions.* Test: dEQP-VK.spirv_assembly.instruction.graphics.image_sampler.* Change-Id: I4c02a36b35a25772e233346266ff6177a9186b9e Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/30249 Presubmit-Ready: Nicolas Capens <nicolascapens@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Chris Forbes <chrisforbes@google.com>
-
Nicolas Capens authored
Previously only the texture pointer was passed to the sampling routine, containing some sampler data which is (still) wrongly assumed to come from a combined image-view and sampler descriptor. This change will allow splitting them up correctly. Also refactor getImageSampler to not start the Reactor function generation, moving it entirely into emitSamplerFunction so that the latter only has to be passed the pointers to the descriptor state that will affect the code that's generated. Name all the parameters according to their actual type. Clamp sampler LOD on construction so we don't have to deal with it any more later. Bug: b/129523279 Test: dEQP-VK.glsl.texture_functions.* Test: dEQP-VK.spirv_assembly.instruction.graphics.image_sampler.* Change-Id: Id3a9f12f379cf65741198b732fe387ec6e24dd86 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/30350 Presubmit-Ready: Nicolas Capens <nicolascapens@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Chris Forbes <chrisforbes@google.com>
-
Chris Forbes authored
Bug: b/131246807 Test: dEQP-VK.*b4g4r4a4_unorm* Change-Id: Ifb319c50cf0a9f9e83c0c8074f5631f4726cc380 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/30428Tested-by:
Chris Forbes <chrisforbes@google.com> Presubmit-Ready: Chris Forbes <chrisforbes@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Chris Forbes authored
Bug: b/131246807 Test: dEQP-VK.*a2b10g10r10_unorm* Change-Id: If51d38ddc8cbb334970e2719cb0fd96a9b240b09 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/30388Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Chris Forbes <chrisforbes@google.com> Presubmit-Ready: Chris Forbes <chrisforbes@google.com>
-
Hernan Liatis authored
Bug: b/122837060 Change-Id: I8524a46d79e1327d494acc5ee494bad87bc9676b Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/30190 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Chris Forbes <chrisforbes@google.com> Tested-by:
Hernan Liatis <hliatis@google.com>
-
Hernan Liatis authored
Bug: b/122837237 Change-Id: Ic9d306e11ff5dd64f6ba0f0f6cb3a1e9a882411a Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/30189 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Tested-by:
Hernan Liatis <hliatis@google.com> Reviewed-by:
Chris Forbes <chrisforbes@google.com>
-
Hernan Liatis authored
Bug: b/122837488 Change-Id: I1d4b33943ea68db3c068b604876745ba6fb5097c Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/30188 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Chris Forbes <chrisforbes@google.com> Tested-by:
Hernan Liatis <hliatis@google.com>
-
- 01 May, 2019 6 commits
-
-
Chris Forbes authored
sRGB decode is controlled by format, not extra state. There is also no 565 sRGB format in Vulkan. Also remove the 5 and 6bit sRGB LUTs since they are no longer used. Change-Id: Iea8770a50e4ef77004dc66d4a9867df62e7c2aaf Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/30368 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Chris Forbes <chrisforbes@google.com>
-
Chris Forbes authored
Test: dEQP-VK.*a2b10g10r10_u* Change-Id: I56498465c3cd43d23e691509c997e5c29f4fdaf9 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/30348Tested-by:
Chris Forbes <chrisforbes@google.com> Presubmit-Ready: Chris Forbes <chrisforbes@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Chris Forbes authored
- Fold together the shader -> oDepth handling. If these conditions were not the same, the shader is invalid. Change-Id: I9bec710886c9961f4141006d2d48f3eb76a3dfee Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/29988 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Tested-by:
Chris Forbes <chrisforbes@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Ben Clayton authored
The only elect function we'll need to implement for Pastel 1.0. Used by memory barrier tests, but not tested on its own. Bug: b/131667233 Change-Id: I5309fa6b49c49091226fbaaca4e46363f6dff534 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/30208 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Presubmit-Ready: Ben Clayton <bclayton@google.com> Reviewed-by:
Chris Forbes <chrisforbes@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Ben Clayton <bclayton@google.com>
-
Chris Forbes authored
The shader is run multiple times reusing the same routine state. We need to set the mask correctly before each execution. Test: dEQP-VK.glsl.discard.* Change-Id: Ic34385715cc4a16d931a3ff4fae4eeaf48d52223 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/30328Tested-by:
Chris Forbes <chrisforbes@google.com> Presubmit-Ready: Chris Forbes <chrisforbes@google.com> Reviewed-by:
Ben Clayton <bclayton@google.com>
-
Ben Clayton authored
Bug: b/126330097 Tests: dEQP-VK.glsl.discard.* Change-Id: I17632f68705aa8f0c8c607b5ec469272a58047db Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/29908Reviewed-by:
Chris Forbes <chrisforbes@google.com> Tested-by:
Ben Clayton <bclayton@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
-