- 26 Mar, 2018 1 commit
-
-
Alexis Hetu authored
When clearing a multisampled buffer, the reactor blitter was only clearing the first sample. This cl makes the reactor blitter effectively clear all samples of a multisampled buffer. Change-Id: I7ce1af401bf537fe85e1c8393a2c57144641ad8e Reviewed-on: https://swiftshader-review.googlesource.com/18032Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
- 21 Mar, 2018 1 commit
-
-
Nicolas Capens authored
Bug swiftshader:99 Bug chromium:820461 Change-Id: I2232c27d57aedff03293b37607f97ead56c056c9 Reviewed-on: https://swiftshader-review.googlesource.com/17808Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com>
-
- 20 Mar, 2018 5 commits
-
-
Alexis Hetu authored
On MacOS, libraries have a couple of minor issues and, as a safety, let's make sure no other library than the required library is loaded. Change-Id: I376b77b3cf3f635ff57c12ccde2b9e84d4105adc Reviewed-on: https://swiftshader-review.googlesource.com/17888Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
Change-Id: Ib6e656a7913cf245c73c096376241f6e1f567b6b Reviewed-on: https://swiftshader-review.googlesource.com/17869Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
Change-Id: I7388b3f5d17e35e55726797ba40631fd8590fb24 Reviewed-on: https://swiftshader-review.googlesource.com/17868Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
Change-Id: I501b72e5d33b26075488c0af999713c192c4ac0b Reviewed-on: https://swiftshader-review.googlesource.com/17848Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
Bug b/75778024 Change-Id: Idf17c094ef858b3712839ffe335dc943cd0bd084 Reviewed-on: https://swiftshader-review.googlesource.com/17828Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
- 16 Mar, 2018 1 commit
-
-
Nicolas Capens authored
Change-Id: I92c4c203433c8dc92887c5470631926c3cac1d27 Reviewed-on: https://swiftshader-review.googlesource.com/17788Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com>
-
- 15 Mar, 2018 1 commit
-
-
Nicolas Capens authored
GL_HALF_FLOAT_OES and GL_HALF_FLOAT have different enum values, and we weren't handling the case where a half-float texture was already created (e.g. with an effective internal format of GL_RGBA16F) and then updated with a glTexSubImage call using GL_HALF_FLOAT_OES type. In other words, we assumed the OpenGL ES 3.0 sized internal format could only be used with the OpenGL ES 3.0 half-float type, but this hasn't been true since we started storing only the effective internal format for all versions. Note that GL_OES_texture_half_float, which defines GL_HALF_FLOAT_OES, does not clarify whether HALF_FLOAT images can be updated using FLOAT, or vice-versa. We're assuming the equivalent combinations of OpenGL ES 3.0 table 3.3 are valid. That is, FLOAT can be used to update, HALF_FLOAT, but not the other way around. Bug b/74609191 Change-Id: Ib8548cd37065820eb59a0943fd39647edc5e9f1b Reviewed-on: https://swiftshader-review.googlesource.com/17748Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
- 14 Mar, 2018 1 commit
-
-
Alexis Hetu authored
GL_CHROMIUM_color_buffer_float_rgba (OpenGL ES 2.0) is a subset of GL_EXT_color_buffer_float (OpenGL ES 3.0), which SwiftShader already supports. Fixes 1 webgl conformance tests: conformance/extensions/oes-texture-float.html Change-Id: Ic1451187db219af74ba41fa7634bd5bcb6fb0b44 Reviewed-on: https://swiftshader-review.googlesource.com/16470Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
- 13 Mar, 2018 1 commit
-
-
Nicolas Capens authored
We weren't checking the return status of an XGetWindowAttributes() call while checking for a resized window. It appears that it can start to fail possibly due to an out-of-memory situation or the window being destroyed before the EGL surface. Note that the EGL spec does not have a recommendation on how to handle this situation. Generating EGL_BAD_ALLOC is intended for eglCreate* call failures, while EGL_BAD_NATIVE_WINDOW appears to be reserved for calls that take a native window as a parameter. eglSwapBuffers is neither. Bug chromium:819481 Change-Id: I270730567b5179ee43b814e8bd017b601dfbe079 Reviewed-on: https://swiftshader-review.googlesource.com/17708Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
- 08 Mar, 2018 2 commits
-
-
Alexis Hetu authored
- Added EXPECT_GLENUM_EQ to solve signed/unsigned comparisons - Added createProgram and drawQuad utility functions to reduce code duplication Change-Id: I8a62110346de501a1a77ec9688cf06b321385661 Reviewed-on: https://swiftshader-review.googlesource.com/17668Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Alexis Hetu authored
Being able to sample from sampler2DRect using the "texture" function is required for Chromium on Mac. Change-Id: Iea8970aaec29734a251bcfc19a03223d0ebfbc7e Reviewed-on: https://swiftshader-review.googlesource.com/17572Reviewed-by:
Alexis Hétu <sugoi@google.com> Tested-by:
Alexis Hétu <sugoi@google.com>
-
- 07 Mar, 2018 3 commits
-
-
Nicolas Capens authored
Change-Id: If560b8b41b869458ff4b3a6a314f389c8e7a22f9 Reviewed-on: https://swiftshader-review.googlesource.com/17648Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com>
-
Chih-Hung Hsieh authored
Suppress existing warnings. Bug b/66996870 Change-Id: I9b78f840638a57c2559ccc4dbc583cc6a6e21c14 Reviewed-on: https://swiftshader-review.googlesource.com/17630Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com>
-
Jiyong Park authored
This is using cutils/log.h which is deprecated in O (in favor of log/log.h) and this is causing build error when building with BOARD_VNDK_VERSION=current set. However, since SwiftShader should be able to be built with older versions Android some of which don't have log/log.h, we can't simply change cutils/log.h to log/log.h. Instead, liblog_headers is added to the header lib dependency (only for O and beyond) so that log/log.h can be correctly included via cutils/log.h Bug b/63135587 Change-Id: I763250e7410025b1dcd7ae210693e3d6bffdb6f1 Reviewed-on: https://swiftshader-review.googlesource.com/17629Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com>
-
- 06 Mar, 2018 1 commit
-
-
Nicolas Capens authored
This fixes a regression caused by https://swiftshader-review.googlesource.com/14489 Context::applyVertexBuffer() expects a valid program, so we need to check for it sooner. Not having a current program is not an error and makes the draw call a no-op, but dEQP-GLES3.functional.negative_api.vertex_array.* still expects validation to happen before leaving the function. In particular, the framebuffer completeness check has to be performed. Note that ConvertPrimitiveType() should never return an error because we already check the primitive type in the entry function, sampler validation can only be done when we have a valid program, and likewise applyVertexBuffer() requires a program, so these validations can still happen after the early-out. Change-Id: I7036ca59d37ea0385f79bf87afd1eeeb9728f7af Reviewed-on: https://swiftshader-review.googlesource.com/17228Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Lingfeng Yang <lfy@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
- 02 Mar, 2018 2 commits
-
-
Nicolas Capens authored
Change-Id: I85886ea83f4d748dce98d79acff204bf855da1ad Reviewed-on: https://swiftshader-review.googlesource.com/17569Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Nicolas Capens authored
Also remove traces of cube texture support for OpenGL ES 1.1. We don't support the OES_texture_cube_map extension, and it would be non-trivial due to requiring reflective texture coordinate generation. Change-Id: I5c224f925fc9c03053acaf33e126dae4f3ffe4d9 Reviewed-on: https://swiftshader-review.googlesource.com/16750Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com>
-
- 01 Mar, 2018 5 commits
-
-
Nicolas Capens authored
Change-Id: I491411ba77addcb514944717b19918e4d1b98898 Reviewed-on: https://swiftshader-review.googlesource.com/16228Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Alexis Hetu authored
The surface set during bindTexImage should be unset during releaseTexImage. Failing to do so may keep a dangling pointer to the surface, which can cause a crash later on (this was hit during the testing of new unit tests which will be added soon). Change-Id: Ic258fff8c880d449add825c5e9185435cc4ea419 Reviewed-on: https://swiftshader-review.googlesource.com/17548Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
The spec mentions them as color-renderable, but our IsColorRenderable() function only handles sized internal format, and adding them there might hide bugs in our renderbuffer implementation since they can only be constructed using sized internal formats. dEQP also has a note about this inconsistency, and consequently these formats are not part of the 'mustpass' set for dEQP-GLES3.functional.state_query.internal_format. So it might be a spec oversight. Change-Id: I08ca3dad4c0b5686536dafd3ade1e855e3968aa0 Reviewed-on: https://swiftshader-review.googlesource.com/16410Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com>
-
Tomasz Wiszkowski authored
Current build system assumes single arch targets to be 32bit and produces 64bit libraries in an incorrect folder. The change allows build system to determine proper location of the libraries. Change-Id: Ic95a36f7108fcae8e6f120f0853ee00e9a8926c1 Reviewed-on: https://swiftshader-review.googlesource.com/17188Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
GL_APPLE_texture_format_BGRA8888 specifies that when using the BGRA_EXT format, it "must have an RGBA internal format". Note that GL_EXT_texture_format_BGRA8888 also allows BGRA_EXT as internalformat. Change-Id: I27e032054240efe96c32e27ebbdfb3c28213b1d8 Reviewed-on: https://swiftshader-review.googlesource.com/16248Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com>
-
- 28 Feb, 2018 2 commits
-
-
Nicolas Capens authored
We were expecting R or RG internal formats, instead of L, A, or LA. Change-Id: I6ee145341819460dda262b017db6d8105860f49a Reviewed-on: https://swiftshader-review.googlesource.com/17508Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Alexis Hetu authored
Imported texture rectangle tests from angle and fixed all texture rectangle related failures: - Rectangle textures can be rendered to - Rectangle textures only support level 0 - Rectangle textures can't be compressed - glTexStorage2D can no longer create a texture larger than the maximum size allowed Change-Id: I089291c94aad79e244782a8d56dd224c7510d237 Reviewed-on: https://swiftshader-review.googlesource.com/16908Reviewed-by:
Alexis Hétu <sugoi@google.com> Tested-by:
Alexis Hétu <sugoi@google.com>
-
- 27 Feb, 2018 5 commits
-
-
Nicolas Capens authored
This makes it easier to use a different address, in particular the port. Also add a missing header for std::max. Change-Id: I454dd6f4a92b5d8b97625e4cb50796e9f0940009 Reviewed-on: https://swiftshader-review.googlesource.com/16668Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Nicolas Capens authored
glBindRenderbufferOES() doesn't require anything except a non-zero renderbuffer to create a new Renderbuffer object (it is not required to use GenRenderbuffers before using BindRenderbuffer). This had been fixed for GLES 3.0 and 2.0, but the same also applies to GLES 1.1. Note that the Context already properly handles the case where renderbuffer is zero. Bug b/25983901 Change-Id: If5e97be8027fca7c97cce5c44d063cd054443700 Reviewed-on: https://swiftshader-review.googlesource.com/17490Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
When sampling from an incomplete texture, the OpenGL spec states that (0, 0, 0, 1) will be returned to the shader from the texture lookup function. Swizzling is only described for filtered texture values. Change-Id: Ie8a02b3b0b9e571fd2f86302e777a4ff985da022 Reviewed-on: https://swiftshader-review.googlesource.com/17488Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
With the egl::Image class now only storing the sized internal format, some OpenGL ES 1.1 functionality broke because it was still expecting a base format. Change-Id: Ib41e91f371a06b2a09471ea45dd1f8f56b94091f Reviewed-on: https://swiftshader-review.googlesource.com/17468Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Nicolas Capens authored
GL_NONE is primarily a renderbuffer format, and GL_NO_ERROR more clearly conveys the meaning when used as a validation return code. Also, GL_NONE is not defined in OpenGL ES 1.1 (but GL_NONE_OES is, as a renderbuffer format). Change-Id: Ie1c00009c30c8d2717de15c7e27db295ecd9de1e Reviewed-on: https://swiftshader-review.googlesource.com/17489Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
- 26 Feb, 2018 5 commits
-
-
Nicolas Capens authored
Surface::resolve() currently only supports these formats. Also this change reuses the GetColorComponentType() utility function instead of using a separate switch. Effectively, signed normalized formats now return 0 samples. Change-Id: I839ffa89a63d8e1b0a40913d3b1ad13e2ce0b5a8 Reviewed-on: https://swiftshader-review.googlesource.com/16389Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
We weren't handling several of the format/type/internalformat combos from table 3.2 of the OpenGL ES 3.0.5 spec. In particular those where the format/type of a glTexSubImage2D() call can be used to update images with an internal format not directly corresponding to it. Some of these cases were handled using the blitter, but not all GL formats have a SwiftShader equivalent. Also, the blitter is slower than specialized C++ pixel transfer code, and the blitter's fallback path is even slower. This patch provides specialized pixel rectangle transfer code for each combination of formats. We also now only store the effective sized internal format of the images. Validation also happens using the sized internal format wherever feasible, instead of unsized formats or SwiftShader formats. Change-Id: Id55db490002ab8fc2f16f766c43b43f121e5768e Reviewed-on: https://swiftshader-review.googlesource.com/17429Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
While in general one should strive to never hit an assert, and thus we should not worry about what happens in release mode when the condition is false, there are cases in which it becomes very hard to prove that a condition will always be true. For instance when another layer is responsible for validation, but the code experiences a lot of change, it could inadvertently expose an untested bad edge case which is only detected much later. For these cases, it is wise to still perform a less harmful action than just continue. The ASSERT_OR_RETURN macro will cause a return from the calling function when the condition is false. Bug b/73656151 Change-Id: I36953bb5c477ecca67647ae1a7e2fb97e7e4fca6 Reviewed-on: https://swiftshader-review.googlesource.com/17428Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
When the external buffer of a surface is dirty, and we're trying to lock the internal buffer (or vice-versa), an 'update' needs to happen. This resulted in us locking the internal buffer for writing, thereby marking it as dirty. This triggered an assert which checks that both buffers can't be dirty at the same time. Also, in release mode this could result in redundant updates when the external buffer is locked again. We should mark the destination buffer dirty when we're about to make sure it's up to date, so a new lock type was added which is equivalent to a write lock but without setting the dirty flag. Also, we were allocating memory for a 0x0 stencil buffer for each render target, when there's no stencil component. So return nullptr when the format is NULL. Change-Id: Ie7b5528e3eedc3c3efdf8461047e6284b7bdfc84 Reviewed-on: https://swiftshader-review.googlesource.com/16828Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Nicolas Capens authored
Neither GL_EXT_texture_format_BGRA8888 nor GL_APPLE_texture_format_BGRA8888 make mention of GL_BGRA_EXT or GL_BGRA8_EXT being accepted as the internalformat parameter of glCopyTexImage2D, but there's a reasonable assumption that textures with BGRA format can be used as the read color buffer. GL_EXT_texture_format_BGRA8888 does mention that the format is color-renderable, and GL_APPLE_texture_format_BGRA8888 adds it to table 3.2 (but fails to mention changes to table 3.16). Bug swiftshader:96 Change-Id: I6d18faeaded73164a2c6af87ae6109fc77825964 Reviewed-on: https://swiftshader-review.googlesource.com/17448Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
- 14 Feb, 2018 1 commit
-
-
Nicolas Capens authored
Fixes building SubzeroTest on Mac. Change-Id: I8ca1f2ea8101bec496b8e9741c38025ff932b3d6 Reviewed-on: https://swiftshader-review.googlesource.com/17189Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com>
-
- 13 Feb, 2018 1 commit
-
-
Nicolas Capens authored
Change-Id: I0c186ddd43c28a3f2c49321da23d5db44abe9dbf Reviewed-on: https://swiftshader-review.googlesource.com/17148Reviewed-by:
Alexis Hétu <sugoi@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com>
-
- 08 Feb, 2018 2 commits
-
-
Alexis Hetu authored
Added missing resource initialization in order to prevent getting "uninitialized value" errors when running the fuzzer. Change-Id: I342441832a159b79cbf036d7ce87f05fcaf15e8c Reviewed-on: https://swiftshader-review.googlesource.com/17128Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Nicolas Capens authored
Change-Id: If8871d9286ef7c4d09fd075ad5c7b707079158dd Reviewed-on: https://swiftshader-review.googlesource.com/17108Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com>
-