- 06 Dec, 2018 4 commits
-
-
Alexis Hetu authored
MacOS' linker dislikes local static variables that are used in two separate libraries. Removing them from the header files fixes all the warnings. Bug b/chromium:907088 Change-Id: I7b8ed44bf9a3180489a7407980740fd3f3863046 Reviewed-on: https://swiftshader-review.googlesource.com/c/22889Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Alexis Hetu authored
This cl adds the code needed to record and submit the minimal subset of commands required to run a simple triangle example. The commands themselves are still unimplemented. Bug b/116336664 Change-Id: Id0109980225a64a2bb3599a89a5495091926c635 Reviewed-on: https://swiftshader-review.googlesource.com/c/22168Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Corentin Wallez <cwallez@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Alexis Hetu authored
Added a few class members and adjusted the VkPipeline constructor to extract basic parameters which will be used for rendering, like: - Basic sw::Context parameters - Scissor - Viewport - BlendConstants Note: sw::Context should eventually be replaced by VkPipeline and be used directly by sw::Renderer once all existing OpenGL ES 3.0 has been converted from VkPipeline. (Chris: rebase + build system fixes for CMake path) Change-Id: I7e7a9ff3c768da8e8c1e9461e140af4986429602 Reviewed-on: https://swiftshader-review.googlesource.com/c/22613Tested-by:Alexis Hétu <sugoi@google.com> Reviewed-by:
Corentin Wallez <cwallez@google.com>
-
Chris Forbes authored
Change-Id: I45349cd6530814efa0c466beb0df7d53b4e17948 Reviewed-on: https://swiftshader-review.googlesource.com/c/23008Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Chris Forbes <chrisforbes@google.com>
-
- 30 Nov, 2018 3 commits
-
-
Kevin Schoedel authored
Bug b/114402930 Change-Id: I228222003e5f015e4966eacc32094a48a7054d0f Reviewed-on: https://swiftshader-review.googlesource.com/c/22988Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Kevin Schoedel <kpschoedel@google.com>
-
Alexis Hetu authored
Added functionality so that the CommandPool can allocate and free command buffer objects. Bug b/119827933 Change-Id: I190ba3cd7738f2b5e37b196a0abba6d07cfae173 Reviewed-on: https://swiftshader-review.googlesource.com/c/22748Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Erwin Jansen authored
We basically replace all references to CMAKE_SOURCE_DIR and CMAKE_BINARY_DIR with CMAKE_CURRENT_SOURCE_DIR and CMAKE_CURRENT_BINARY_DIR. This enables other cmake projects to take a direct dependency on this project. Test: cmake . still shows error for in source builds. Test: mkdir build && cd build && cmake .. -G Ninja && ninja succeeds Change-Id: Ibb8366f8e7fd3b3152634c71324a5182d269e647 Reviewed-on: https://swiftshader-review.googlesource.com/c/22692Reviewed-by:
Lingfeng Yang <lfy@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Erwin Jansen <jansene@google.com> Tested-by:
Erwin Jansen <jansene@google.com>
-
- 29 Nov, 2018 1 commit
-
-
Nicolas Capens authored
The Subzero JIT only supports constants in the second operand of arithmetic operations, not the first. It assumes constant folding already took place (true for NaCl which takes LLVM IR as input). Reactor has constant folding as part of the static C++ compilation, but the Optimizer may substitute the first operand for a constant (i.e. constant propagation). Addressing it in the Optimizer by not performing the substitution is not trivial because we'd have to check each use. And it would cost run-time performance. Ideally we'd have a pass for legalization/optimization which performs constant folding. For now, avoid hitting 'unreachable' code in Subzero by multiplying constants at the Reactor level. Fixes regression caused by https://swiftshader-review.googlesource.com/22910 Bug chromium:904265 Bug swiftshader:14 Change-Id: Ifdc72ac997ad5d71c1f7006259f54f3d715cb613 Reviewed-on: https://swiftshader-review.googlesource.com/c/22930Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
- 28 Nov, 2018 2 commits
-
-
Nicolas Capens authored
GLSL textureSize() calls that use a sampler that is not a uniform, should not use the index of the register as the texture unit index. Instead the index is the value stored in the register itself. Bug chromium:904265 Change-Id: Iee1058e789daae15248ae5ffa940a0155dca61b5 Reviewed-on: https://swiftshader-review.googlesource.com/c/22910Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Alexis Hetu authored
- Replaced sw::Viewport with VkViewport Bug b/118386749 Change-Id: I2446883ba9e5623753322fc417386394a3fe370c Reviewed-on: https://swiftshader-review.googlesource.com/c/22909Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
- 27 Nov, 2018 1 commit
-
-
Alexis Hetu authored
This cl exposes the bare minimum in terms of format requirements in order to support Vulkan 1.1. Fixes all failures in: dEQP-VK.api.info.format_properties.* Bug b/117974925 Change-Id: Ia84b1b13430faffeb840e118b09b9f3e352c8cc9 Reviewed-on: https://swiftshader-review.googlesource.com/c/22888Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
- 26 Nov, 2018 6 commits
-
-
Alexis Hetu authored
- Replaced BlendFactor with VkBlendFactor - Replaced BlendOperation with VkBlendOp Bug b/118386749 Change-Id: I25031c044af05b1922d031db9e82c52bb785def5 Reviewed-on: https://swiftshader-review.googlesource.com/c/22850Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
Implements support for VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2 and other structure types used during Vulkan 1.1 device creation. Bug b/117974925 Change-Id: Ic23067f145322a814ccda7dd44a087d7a4020e3d Reviewed-on: https://swiftshader-review.googlesource.com/c/22689Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Nicolas Capens authored
vkGetInstanceProcAddr must return NULL when the instance parameter is NULL, except for a few global functions. vkGetDeviceProcAddr must return NULL for any non-device-level functions. Fixes dEQP-VK.api.version_check.entry_points Bug b/116336664 Change-Id: I446edb0b8c4b94938e0ab77913c8ad391d490f4f Reviewed-on: https://swiftshader-review.googlesource.com/c/22688Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Nicolas Capens authored
<memory.h> isn't actually an official standard C header. memcpy() is defined in <string.h> / <cstring>. Change-Id: I578e3a8ea741934e594049e359b906665de80134 Reviewed-on: https://swiftshader-review.googlesource.com/c/22649Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Nicolas Capens authored
This adds the Pastel driver ID. https://github.com/KhronosGroup/Vulkan-Docs revision 256a1ef66182b2d458148f2fdea183557ea3f507 Bug b/116336664 Change-Id: I3d227eaff99b6bd8402b0808cfad7501438e9e65 Reviewed-on: https://swiftshader-review.googlesource.com/c/22648Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Nicolas Capens authored
SwiftShader can now be tested directly with dEQP, without using the system's Vulkan loader or layers. Bug b/116336664 Change-Id: I08816b5fb893d048c3dfe325ff54f44c646b250f Reviewed-on: https://swiftshader-review.googlesource.com/c/22868Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
- 23 Nov, 2018 2 commits
-
-
Nicolas Capens authored
Unaligned accesses are undefined behavior, but they're common in our ELF binary patching code for variable length instruction sets (namely x86). We can use memcpy() and rely on target-specific compiler optimizations to make it efficient. Utility functions and classes were added to aid readability. Bug b/119823623 Change-Id: I8a82672a0d18d1e1783f580eb629f8cc09a009cd Reviewed-on: https://swiftshader-review.googlesource.com/c/22828Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Nicolas Capens authored
Accessing members of a null pointer is undefined behavior, even when only used to obtain the address again. So use a non-zero value as the base pointer address instead. 32 was chosen to provide sufficient alignment guarantees. Bug b/119823623 Change-Id: Ia6d24dd6c2740261948860c45eb35cc489a3a827 Reviewed-on: https://swiftshader-review.googlesource.com/c/22788Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
- 22 Nov, 2018 1 commit
-
-
Alexis Hetu authored
Replaced LogicalOperation with VkLogicOp. Bug b/118386749 Change-Id: I9776dd112e2a742cd73fba241e0659813cc974e7 Reviewed-on: https://swiftshader-review.googlesource.com/c/22849Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
- 21 Nov, 2018 6 commits
-
-
Alexis Hetu authored
While implementing Pipeline Cache is optional, we still need a placeholder object in order to return have a valid handle for this object. b/118386749 Change-Id: I18abb4196fbc99d3f639c1ba14ceb570ac11b365 Reviewed-on: https://swiftshader-review.googlesource.com/c/22729Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Alexis Hétu <sugoi@google.com>
-
Alexis Hetu authored
Basic shell class for CommandPool Bug b/119827933 Change-Id: Ibbc8ac641b168a15974fd4ff1803b5aff51f48a3 Reviewed-on: https://swiftshader-review.googlesource.com/c/22730Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Alexis Hetu authored
The Vulkan sampler is simply a state, similar to the existing sw::Sampler::State(), which will eventually be used by the texture sampling code. Bug b/119823006 Change-Id: Ib2f09683f82dbf5b5aacde1555ee850c76cda9e2 Reviewed-on: https://swiftshader-review.googlesource.com/c/22728Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Alexis Hetu authored
- Replaced DepthCompareMode, StencilCompareMode and AlphaCompareMode by VkCompareOp. - Replaced StencilOperation by VkStencilOp. Bug b/118386749 Change-Id: I7dec0cff119012345865eb164599f086edf2c88a Reviewed-on: https://swiftshader-review.googlesource.com/c/22768Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Alexis Hetu authored
Surface::bytes() now supports all non-extension vulkan image formats. Compressed formats are partially supported, the same way they were for the OpenGL ES 3.0 implementation. Bug b/118429780 Change-Id: Ica7f7d7184e9e00eeedfc76bc6b5c19e07aa3caf Reviewed-on: https://swiftshader-review.googlesource.com/c/22568Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Alexis Hétu <sugoi@google.com>
-
Alexis Hetu authored
To avoid format conversion issues and simplify the code, sw::Format was replaced with VkFormat. sw::Format only contained formats with exact 1:1 correspondence with an equivalent VkFormat, with the exception of YUV formats, which will require a minor adjustment in SamplerCore::sampleTexel(). Bug b/119620767 Change-Id: I8124cbc40e1031a5b233156a10e87c35f1334eef Reviewed-on: https://swiftshader-review.googlesource.com/c/22549Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
- 16 Nov, 2018 6 commits
-
-
Alexis Hetu authored
Basic shell class for RenderPass Bug b/119620965 Change-Id: Ice98943587f363f8cf03eddd3cc4c504b899d682 Reviewed-on: https://swiftshader-review.googlesource.com/c/22612Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Alexis Hetu authored
Basic shell class for Framebuffer Bug b/119621736 Change-Id: Iaf5466d311efe011ea7bbd4a6e3ab2802474f98e Reviewed-on: https://swiftshader-review.googlesource.com/c/22611Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Alexis Hetu authored
Basic shell class for Image Bug b/119620767 Change-Id: I75d37dd8c1a9b98264fe6dae68cd4753d6942103 Reviewed-on: https://swiftshader-review.googlesource.com/c/22610Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Alexis Hetu authored
Basic shell class for ShaderModule Bug b/118386749 Change-Id: Ia41957ba1ef3be179d20c37cea0227a9a4509c7b Reviewed-on: https://swiftshader-review.googlesource.com/c/22609Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Alexis Hetu authored
Basic shell classes for Pipeline, PipelineLayout b/118386749 Change-Id: I1ec82d1bf2334d5e2cd338d96eff63f3714db198 Reviewed-on: https://swiftshader-review.googlesource.com/c/21888Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Stephen Hines authored
This library depends on a snapshot of LLVM that only works with C++11. Bug: http://b/111067277 Test: Build with default cpp_std as C++17. Change-Id: I40de7e2357afa3c16ceac7f50241a6d0437aba09 Reviewed-on: https://swiftshader-review.googlesource.com/c/22628Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Stephen Hines <srhines@google.com>
-
- 15 Nov, 2018 1 commit
-
-
Alexis Hetu authored
Moved MacOS specific frameworks from swiftshader_libGLESv2 to swiftshader_libGLESv2_static to make sure the static version also links properly. Bug chromium:905648 Change-Id: I7736009abc378d634313028eb51aa0bb221c6419 Reviewed-on: https://swiftshader-review.googlesource.com/c/22608Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
- 14 Nov, 2018 7 commits
-
-
Alexis Hetu authored
glDeleteQueries() instantly deletes all the es2::Query objects passed as arguments to this function. If some of these queries are still being used by the renderer, this will result in a use after free error. To solve this issue, sw::Query is now a also ref counted object. Bug chromium:904714 Change-Id: Ic1d5781bbf1724d8d07936fd49c8a172dc3d9fd4 Reviewed-on: https://swiftshader-review.googlesource.com/c/22548Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
VkPhysicalDeviceFeatures only contains VkBool32 members, and is also described by the spec as a "structure that contains boolean indicators of all the features to be enabled", as well as "For each feature, a value of VK_TRUE specifies that the feature is supported on this physical device, and VK_FALSE specifies that the feature is not supported". Hence we can safely process it as an array of VkBool32. This is also more likely to return false early when a requested feature is not supported. Bug b/117974925 Change-Id: I106ba6abf5f29874cde91fdaafd1dd9560aabfa9 Reviewed-on: https://swiftshader-review.googlesource.com/c/22512Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Corentin Wallez <cwallez@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Nicolas Capens authored
When an unsupported structure type was encountered this would lead to an infinite loop. Bug b/117974925 Change-Id: I0ba68e80a162ee631ae122b765cf8ea1149b3a3b Reviewed-on: https://swiftshader-review.googlesource.com/c/22510Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Corentin Wallez <cwallez@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Nicolas Capens authored
Bug b/117974925 Change-Id: I9c4553a1586e4f9e4a193b24f6c1b07749a7702a Reviewed-on: https://swiftshader-review.googlesource.com/c/22509Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Corentin Wallez <cwallez@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Nicolas Capens authored
Generic system memory is cached on all known ARMv8 and x86 CPUs, so advertise it as such. Bug b/118383648 Change-Id: Ic757206a497fc299e1e76a939220092f7c0a124d Reviewed-on: https://swiftshader-review.googlesource.com/c/22448Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Corentin Wallez <cwallez@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Nicolas Capens authored
Also always clear the UUIDs first so that shorter strings don't leave data undefined. Bug b/116336664 Change-Id: I77d5ae1514db5d68d540614b7c57c4872695ecca Reviewed-on: https://swiftshader-review.googlesource.com/c/22490Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Corentin Wallez <cwallez@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Nicolas Capens authored
This enables running the unit tests without manually querying each entry function. The compiler generates a .lib file for us which load the .dll file and retrieves the entry functions. Also fix project dependencies and DLL path. Bug b/116336664 Change-Id: I4cbd80bd071a20058b034db8fb12e31f9af2e081 Reviewed-on: https://swiftshader-review.googlesource.com/c/22489Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Corentin Wallez <cwallez@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-