- 05 Sep, 2018 1 commit
-
-
Nicolas Capens authored
This enables binding any texture mipmap level as a framebuffer attachment. Bug swiftshader:104 Change-Id: I3d4ea637ddd38bb62ca1363fe2c69c569eea36e9 Reviewed-on: https://swiftshader-review.googlesource.com/18008Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Lingfeng Yang <lfy@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com>
-
- 31 Aug, 2018 2 commits
-
-
Nicolas Capens authored
Also automatically download git submodules with CMake. Change-Id: I3da095f49d0a9c577ea5dbb50d3db951417f4755 Reviewed-on: https://swiftshader-review.googlesource.com/20088Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Chris Forbes <chrisforbes@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Chris Forbes authored
We were comparing a pre-promotion version with the post-promotion version stored in the share context. This doesn't work. Affects: dEQP-EGL.functional.sharing.* Change-Id: I02c14681b7743c6aaef4404291ac52a48890832c Reviewed-on: https://swiftshader-review.googlesource.com/20368Tested-by:
Chris Forbes <chrisforbes@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
- 30 Aug, 2018 3 commits
-
-
Greg Hartman authored
BUG: 113551166 Change-Id: I0646638710abfc84707ca42faea10f94c87c1f4b Test: oc and pi build and boot Reviewed-on: https://swiftshader-review.googlesource.com/20329Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Greg Hartman <ghartman@google.com>
-
Greg Hartman authored
BUG: 77218110 Change-Id: Iddaacc2d5fb826ad8b38b46cc9e7ef406b2cd01b Test: oc and pi builds with I0646638710abfc84707ca42faea10f94c87c1f4b Reviewed-on: https://swiftshader-review.googlesource.com/20328Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Greg Hartman <ghartman@google.com>
-
Alexis Hetu authored
These vulkan headers are copied directly from their repo: https://github.com/KhronosGroup/Vulkan-Headers commit db09f95ac00e44149f3894bf82c918e58277cfdb Version 1.1.83 Apache License 2.0 Change-Id: I593b6267dd35092fc9be243ac5209d47103c9a9d Reviewed-on: https://swiftshader-review.googlesource.com/20348Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Alexis Hétu <sugoi@google.com>
-
- 29 Aug, 2018 3 commits
-
-
Alistair Strachan authored
This makes it possible to build swiftshader for the host. The target build also works but it has been disabled. Change-Id: I8aecf931f4ebf72c06d4e3423e2eafea6bfa7f6c Reviewed-on: https://swiftshader-review.googlesource.com/17988Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Alistair Strachan <astrachan@google.com>
-
Alistair Strachan authored
These host versions will be used by a future change to enable the build of SwiftShader on the host, using Android extensions, without needing to pull in non-host-ported parts of the Android framework. These headers are derived from the framework versions, but modified slightly to minimize their dependency on other headers, and to reduce code size. If a feature is introduced in the platform that SwiftShader needs, it will need to be added to these headers (however, even if these headers were copies, they would still need to be updated.) Change-Id: I51bf7a01fd782f724d98ff05930117ecacdcefb4 Reviewed-on: https://swiftshader-review.googlesource.com/18030Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Alistair Strachan <astrachan@google.com>
-
Alistair Strachan authored
Avoid using the Android logger directly. Instead, use the Common/Debug and OpenGL/common/debug paths instead, which abstracts away use of the logger. Add ANDRIOD_HOST_BUILD to tell the build we are building an Android swiftshader, but minimizing the use of platform features such as the logger. Change-Id: Ic6c70843d947c568d0e29fe66c55af74b8559a59 Reviewed-on: https://swiftshader-review.googlesource.com/18028Tested-by:
Alistair Strachan <astrachan@google.com> Reviewed-by:
Greg Hartman <ghartman@google.com> Reviewed-by:
Lingfeng Yang <lfy@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
- 18 Aug, 2018 1 commit
-
-
Nicolas Capens authored
Fixes Visual Studio build issues. Bug swiftshader:115 Change-Id: Ibd09f4de84a115ed1b264b36985d2d4f31fb3a97 Reviewed-on: https://swiftshader-review.googlesource.com/20269Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
- 14 Aug, 2018 1 commit
-
-
Nicolas Capens authored
On some platforms, nested braces are required for nested initializers, or a warning will be produced which is treated as an error. Change-Id: I4806ee13869bfe5c5c41505552cd03ff6bdde85e Reviewed-on: https://swiftshader-review.googlesource.com/20248Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
- 13 Aug, 2018 1 commit
-
-
Nicolas Capens authored
When a vertex attribute has a GLSL layout location qualifier, it takes precedence over the binding location provided through the glBindAttribLocation API call. OpenGL ES 3.0.5 spec: "If an active attribute has a binding explicitly set within the shader text and a different binding assigned by BindAttribLocation, the assignment in the shader text is used." Change-Id: If0bc0dc01a8ff6189703f2be26f1938fbff5f5ae Reviewed-on: https://swiftshader-review.googlesource.com/20168Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
- 10 Aug, 2018 2 commits
-
-
Alexis Hetu authored
Reverted the portion of the following cl which broke the build: https://swiftshader-review.googlesource.com/c/SwiftShader/+/15909 Change-Id: I4a0e7ef5507dd5502861ccf34c400f1feb54b0cc Reviewed-on: https://swiftshader-review.googlesource.com/20228Reviewed-by:
Alexis Hétu <sugoi@google.com> Tested-by:
Alexis Hétu <sugoi@google.com>
-
Alexis Hetu authored
This cl contains the necessary config and build changes to make SwiftShader work on Fuchsia x64. Passes all tests in content_unittests. Bug: chromium:739182 Change-Id: I7df44bd6b12b2560f18e4375f16ada3850f1d8a5 Reviewed-on: https://swiftshader-review.googlesource.com/20208Reviewed-by:
Alexis Hétu <sugoi@google.com> Tested-by:
Alexis Hétu <sugoi@google.com>
-
- 07 Aug, 2018 2 commits
-
-
Nicolas Capens authored
We were checking if the attrib_list was NULL to verify that no unsupported attributes are provides, but a single EGL_NONE attribute should also be allowed. Also use operator& to avoid confusing implicit conversion to a pointer. Change-Id: I3c30968fddfd4d1dfbdff9c4ff291abb258e304c Reviewed-on: https://swiftshader-review.googlesource.com/20148Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Nicolas Capens authored
This enables running dEQP on Linux when it was built against an EGL 1.5 capable driver. Note that this is not a complete EGL 1.5 implementation. Change-Id: Ie29d9ec61e7e3694eb8862aad7432b77fe7c7bae Reviewed-on: https://swiftshader-review.googlesource.com/15909Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
- 06 Aug, 2018 1 commit
-
-
Nicolas Capens authored
Bug swiftshader:114 Change-Id: I4e69b85ff3fdf59cc340d3c149964d21bc4b1dd9 Reviewed-on: https://swiftshader-review.googlesource.com/20089Reviewed-by:
Alexis Hétu <sugoi@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com>
-
- 02 Aug, 2018 1 commit
-
-
Nicolas Capens authored
Bug swiftshader:113 Change-Id: Ia1cbcdbb396eaabaa79e4c8651d7c025f73d028a Reviewed-on: https://swiftshader-review.googlesource.com/20068Reviewed-by:
Alexis Hétu <sugoi@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com>
-
- 01 Aug, 2018 1 commit
-
-
Alexis Hetu authored
leadingVertexFirst is used within rendering threads and assigned in the Renderer's constructor, so TSAN detects this as a data race. In order to fix this, we can make sure any of these global rendering settings are only set once (since they never change). Change-Id: Ib4b43d181b140e500ca31e1ce48340c7f4ce500d Reviewed-on: https://swiftshader-review.googlesource.com/20008Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
- 31 Jul, 2018 1 commit
-
-
Nicolas Capens authored
Uniform block members should not be validated against the GL_MAX_VERTEX_UNIFORM_VECTORS and GL_MAX_FRAGMENT_UNIFORM_VECTORS limits. Instead, block sizes should not exceed MAX_UNIFORM_BLOCK_SIZE. Also move uniform block index validation to the entry functions. Bug b/111803744 Change-Id: I0ea530813d1f2c29141dc64a93aa10f50460885b Reviewed-on: https://swiftshader-review.googlesource.com/20028Reviewed-by:
Alexis Hétu <sugoi@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com>
-
- 20 Jul, 2018 2 commits
-
-
Nicolas Capens authored
malloc/free are being used if SWIFTSHADER_TRANSLATOR_DISABLE_POOL_ALLOC is defined. Change-Id: I213c9d614b38fecdc673be5058d5f6f2bc579ca6 Reviewed-on: https://swiftshader-review.googlesource.com/19968Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
We were leaking memory for uniforms that were previously defined but don't have a location, e.g. structures. This change also verifies that such uniforms have the same type in both shaders. Also, simplify uniform lookup. Bug chromium:863682 Change-Id: I468aace4df6f5329dc7bb9f33bf9bf533a743ae1 Reviewed-on: https://swiftshader-review.googlesource.com/19928Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Corentin Wallez <cwallez@google.com>
-
- 13 Jul, 2018 1 commit
-
-
Nicolas Capens authored
Despite being a 'client resource', the window can become invalid due to events outside of the client code's control, which causes XGetWindowAttributes to fail because it retrieves servers-side data that is no longer available. Hence it is something we should expect to see happen, and not (always) an indication of a bug that needs fixing. Also, we should be able to safely continue with an invalid window. At this point it's up to the client code to catch the X error and handle it appropriately. The EGL spec does not indicate that it should catch it instead and generate an error (eglSwapBuffers can generate EGL_CONTEXT_LOST but that's reserved for power management events). Bug chromium:861882 Bug chromium:824522 Change-Id: I78a364516b9466f652c94de68553369935590bde Reviewed-on: https://swiftshader-review.googlesource.com/19868Reviewed-by:
Antoine Labour <piman@chromium.org> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com>
-
- 09 Jul, 2018 1 commit
-
-
Nicolas Capens authored
Subzero x86-64 call instruction operands can be 64-bit now and require a register. Bug chromium:860533 Change-Id: I4446be34f57ef73e24718252210bdaa81995c8be Reviewed-on: https://swiftshader-review.googlesource.com/19848Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Corentin Wallez <cwallez@google.com>
-
- 06 Jul, 2018 4 commits
-
-
Nicolas Capens authored
MemorySanitizer doesn't automatically work with dynamically generated code or inline assembly, since it can't instrument it to know what memory it touches. We can help it by marking all the memory that is written to by Reactor with the Subzero back-end as initialized by calling __msan_unpoison. Note that writes to memory don't guarantee proper initialization. It could be copying or writing other uninitialized values. See also https://sites.google.com/a/chromium.org/dev/developers/testing/memorysanitizer Bug chromium:860533 Change-Id: Idf64e43c6ab9b8f71f64723fc7e3653f6ea2fb30 Reviewed-on: https://swiftshader-review.googlesource.com/19789Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Nicolas Capens authored
The x86-64 call instruction only supports 32-bit IP-relative direct calls or 64-bit indirect calls. So handle 64-bit direct calls by storing the value into a register and making an indirect call. Bug chromium:860533 Change-Id: I3781d1e8a489ce9ab7c17b098ffe830cae62477e Reviewed-on: https://swiftshader-review.googlesource.com/19828Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Nicolas Capens authored
Avoid accessing null pointers when an X11 call fails. Since EGL doesn't own the X11 window, we expect it to be valid for the duration of the EGL surface. Fail hard if that's not the case. Bug chromium:833229 Bug chromium:824522 Change-Id: Iba5e3832fe312fb50232a13e2163a022f5048a76 Reviewed-on: https://swiftshader-review.googlesource.com/19788Reviewed-by:
Corentin Wallez <cwallez@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com>
-
Alexis Hetu authored
Chromium's memory sanitizer doesn't work with JIT compiled code, so we have to skip blitReactor when using MSAN, otherwise most uses of glReadPixels() will cause MSAN to detect a false use-of-uninitialized-value, since it doesn't instrument the inside of JIT compiled code. Bug chromium:848035 chromium:860533 Change-Id: Idfa194ce0fcd41eb7acf7868cbcebfc04d598f5b Reviewed-on: https://swiftshader-review.googlesource.com/19808Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
- 05 Jul, 2018 3 commits
-
-
Nicolas Capens authored
glCopyTexImage2D() with an framebuffer format of GL_RGB10_A2 and internalformat of GL_LUMINANCE_ALPHA was hitting the UNIMPLEMENTED() assert. The spec states that: If an effective internal format exists that has * the same component sizes as, * component sizes greater than or equal to, or * component sizes smaller than or equal to those of the source buffer's effective internal format (for all matching components in <internalformat>), that format is chosen for the new image array and this is the effective internal format of the new texel array. There is no unorm luminance+alpha format that has all components either greater or smaller, so this operation is invalid. Also see https://www.khronos.org/members/login/bugzilla/show_bug.cgi?id=9807#c56 Bug chromium:853424 Change-Id: Ia79a50bf7411a3f2aa87cf7f9bdbcbf971bdd7ce Reviewed-on: https://swiftshader-review.googlesource.com/19768Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Nicolas Capens authored
While all symbols except for the ones in the version script are hidden, the exported ones can still be overridden by other libraries which export the same symbols. Using -fvisibility=protected or the equivalent attribute fixes this. Protected visibility used to not work because of https://bugs.llvm.org//show_bug.cgi?id=30960, but that doesn't appear to be an issue any more. Bug chromium:852537 Bug swiftshader:64 Change-Id: Id0b1197b90baa5f5c68bf2aa107d12f8a9856796 Reviewed-on: https://swiftshader-review.googlesource.com/19728Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Nicolas Capens authored
Texture::releaseTexImage() is a virtual method called by libEGL but defined by libGLESv2, so prevent LTO from treating it as undefined. This fixes running Chromium swiftshader_unittests with an 'is_official' build. Bug chromium:720933 Change-Id: I58c4441f9bd32b96703a28267837cc79b6087659 Reviewed-on: https://swiftshader-review.googlesource.com/19708Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
- 04 Jul, 2018 4 commits
-
-
Nicolas Capens authored
GL_UNIFORM_BUFFER_SIZE and GL_UNIFORM_BUFFER_START can't be queried using glGetIntegerv(). They're only valid for glGetInteger64i_v(). This prevents a potential null dereference. Bug chromium:859775 Change-Id: Ic66f33a582805b021a2d4bd08ff627f704d42aa7 Reviewed-on: https://swiftshader-review.googlesource.com/19748Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Nicolas Capens authored
While all symbols except for the ones in the version script are hidden, the exported ones can still be overridden by other libraries which export the same symbols. Using -fvisibility=protected fixes this. We can only apply it to the shared library targets because of ld linker issues. Bug b/110884149 Change-Id: I98222420eabbb9ea0873816f52e1354625b9a3a8 Reviewed-on: https://swiftshader-review.googlesource.com/19688Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Nicolas Capens authored
Exported symbols with protected visibility (change made in the next patch) have a relocation type that is incompatible with passing their address to dladdr(). Instead we can use a static local variable. Bug b/110884149 Change-Id: I3e38280276ec00913b28ff97b007490619a99f58 Reviewed-on: https://swiftshader-review.googlesource.com/19710Reviewed-by:
Alexis Hétu <sugoi@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
EQUAL compares numeric values. Use STREQUAL instead. Also clarify the macro for setting the export map / version script. Bug b/110884149 Change-Id: If30c31d17ad35684a8c637b3619bdd0b90be6f2d Reviewed-on: https://swiftshader-review.googlesource.com/19709Reviewed-by:
Alexis Hétu <sugoi@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com>
-
- 28 Jun, 2018 2 commits
-
-
Nicolas Capens authored
For seamless cube maps the pitch (in pixels) differs from the width, due to the border. Also renamed identicalFormats() to identicalBuffers() since much more than the format is compared to determine if the buffers should be identical. Bug swiftshader:45 Change-Id: I295557b2cb039615a624c106be3e74588463b102 Reviewed-on: https://swiftshader-review.googlesource.com/19668Reviewed-by:
Alexis Hétu <sugoi@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
Clang treats conversion of an unsigned constant to a signed one that doesn't fit its range as an error. Make Visual Studio also produce an error. Change-Id: I2d392d5ba7765b72aa9e9478c5eee02102bdf286 Reviewed-on: https://swiftshader-review.googlesource.com/19648Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
- 27 Jun, 2018 1 commit
-
-
Nicolas Capens authored
Bug swiftshader:104 Change-Id: I037fcb69131906b52e0c1919f36fea61b2e1c621 Reviewed-on: https://swiftshader-review.googlesource.com/19628Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
- 26 Jun, 2018 2 commits
-
-
Nicolas Capens authored
Bug chromium:853424 Change-Id: I9b2de054baf6b042bcd04c5d023099a39ca20d2a Reviewed-on: https://swiftshader-review.googlesource.com/19569Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Nicolas Capens authored
The EGL spec allows that on context creation, a newer, compatible version is returned. OpenGL ES 3.0 is stated to be backward compatible with OpenGL ES 2.0, so we can stop creating a context that is limited to OpenGL ES 2.0 features, and always return an OpenGL ES 3.0 context. This simplifies our code and maintenance a bit and reduces the risk of incorrect validation. Note that Appendix F of the OpenGL ES 3.0 specification lists changes in behavior that aren't entirely backward compatible with OpenGL ES 2.0: * OpenGL ES 3.0 requires that all cube map filtering be seamless. OpenGL ES 2.0 specified that a single cube map face be selected and used for filtering. See section 3.8.9.1. * OpenGL ES 3.0 specifies a zero-preserving mapping when converting back and forth between signed normalized fixed-point values and floating- point values. OpenGL ES 2.0 specified a mapping by which zeros are not preserved. See section 2.1.6. * OpenGL ES 3.0 requires that framebuffer objects not be shared between contexts. OpenGL ES 2.0 left it undefined whether framebuffer objects could be shared. See appendix D. Additional differences can stem from new extensions being exposed (e.g. GL_EXT_color_buffer_float), and framebuffer configurations that are newly supported or no longer supported (in particular we allowed separate depth and stencil attachments, which OpenGL ES 3.0 expressly disallows). See also https://gitlab.khronos.org/opengl/API/issues/82 Bug swiftshader:45 Change-Id: I90d72698d509b4f03263edcf7c67e44fcef0beb6 Reviewed-on: https://swiftshader-review.googlesource.com/19388Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-