- 16 May, 2018 2 commits
-
-
Alexis Hetu authored
The format comparison for blitting from a multisampled buffer was not ES2 specific, so the ES3 check was removed. That had been added to fix blitting to the backbuffer on MacOS, which is now instead fixed by allowing BGRA8 and RGBA8 to be accepted interchangeably as draw and read formats. Fixes dEQP-GLES3.functional.negative_api.buffer.blit_framebuffer_multisample Change-Id: Id577372791007a780c542b0986378147e1e7bc1b Reviewed-on: https://swiftshader-review.googlesource.com/18888Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Alexis Hétu <sugoi@google.com>
-
Alexis Hetu authored
atan(0, <negative>) was returning 0 instead of PI. Did a simple fix in the arctan() function and added an associated unit test. Change-Id: Idbbdaf099b5104e3aaa2868ca8fd806c6c735981 Reviewed-on: https://swiftshader-review.googlesource.com/18868Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
- 14 May, 2018 2 commits
-
-
Krzysztof Kosiński authored
This extension works the same as OpenGL ES 3.0 vertex arrays, but requires entry points with the OES suffix. Change-Id: I82b92bbcec078f88becee6f3b37eb7e8256a1233 Reviewed-on: https://swiftshader-review.googlesource.com/18808Tested-by:
Krzysztof Kosiński <krzysio@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Alexis Hetu authored
The cl "Fix Linux build." broke swiftshader_unittests on Linux and MacOS. Reverting part of that cl to fix swiftshader_unittests, and hopefully keep the part of the cl that fixed the build originally. Change-Id: I3126a12f12ca7337f18c758db16dd3542dcfc226 Reviewed-on: https://swiftshader-review.googlesource.com/18848Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
- 11 May, 2018 1 commit
-
-
Alexis Hetu authored
On MacOS, a Surface constructor receiving the 'pitchPprovided' parameter wasn't using it for the surface's external pitch, which was causing an error when using the Image::getPitch() function, which returns getExternalPitchB(). Image::getPitch() is used within Image::loadImageData(), which is used by gl functions like glTexImage2D() and glTexSubImage2D(). Both the internal and external buffers now use the parameter to solve this issue. Bug b/19979104 Change-Id: I9762ed53b535ae9eb052f57ee1ceed8ee87cb29c Reviewed-on: https://swiftshader-review.googlesource.com/18828Tested-by:
Alexis Hétu <sugoi@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
- 09 May, 2018 1 commit
-
-
Alexis Hetu authored
Texture rectangle coordinates were clamped in the [0, dim - 1] range, but should have been sampled in the [0.5, dim - 0.5 range] according to the spec (a related comment was added in the code). Also, by having getAddressingModeW() return ADDRESSING_LAYER for rectangle textures, the 3rd texture coordinate computation will be skipped entirely, preventing the temporary variable 'fv' from being overwritten. Change-Id: I4bbc30b2a2b747eae2f2a1dfb710a986bff7849b Reviewed-on: https://swiftshader-review.googlesource.com/18768Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
- 07 May, 2018 1 commit
-
-
Ian Rogers authored
Executable heap memory can confuse profiling tools. Use memfd_create on Linux, if possible, to create a named anonymous memory region. Only enabled if LINUX_ENABLE_NAMED_MMAP is defined. Bug b/73721724 Change-Id: I420711e4f64725ae834ab54264038683e4c445fe Reviewed-on: https://swiftshader-review.googlesource.com/17208Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Ian Rogers <irogers@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com>
-
- 04 May, 2018 1 commit
-
-
Nicolas Capens authored
This fixes a undefined shift if the temporary register has an index higher than 32 (also, we only have 16 samplers currently). For GLSL we declare all actual sampler units during ASM output, so we don't have to rely on analyzing the instructions afterwards (that is only still relevant for Direct3D 8/9 shaders). Change-Id: I11a58964d53fcc2c29e0ad923d9a4a4161a545f4 Reviewed-on: https://swiftshader-review.googlesource.com/18748Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
- 03 May, 2018 1 commit
-
-
Nicolas Capens authored
The EGL 1.4 spec description of eglChooseConfig states: "If EGL_MAX_PBUFFER_WIDTH, EGL_MAX_PBUFFER_HEIGHT, EGL_MAX_PBUFFER_- PIXELS, or EGL_NATIVE_VISUAL_ID are specified in attrib_list, then they are ignored" Change-Id: I9ec90eff692f9759aa54a0a10f1e57f2c244db7f Reviewed-on: https://swiftshader-review.googlesource.com/18608Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
- 26 Apr, 2018 1 commit
-
-
Nicolas Capens authored
These enums don't have the same value, but this is only because of desktop OpenGL and OpenGL ES having evolved separately. OpenGL ES 3.0 reconverged to use the enum name and value of desktop OpenGL. Apps choosing between OpenGL ES 2.0 and 3.0 strictly speaking have to use different enums, but many drivers already accept either enum so the apps don't bother to differentiate them. Running them on a driver which adheres more strictly to the (extension) specs would cause parameter validation errors. Additionally, native platform pixel formats such as HAL_PIXEL_FORMAT_RGBA_FP16 on Android couldn't be mapped to GL_RGBA16F with GL_HALF_FLOAT component types on an OpenGL ES 2.0 context if the latter are considered OpenGL ES 3.0 only. Change-Id: Ib66cba7444fe438c0e4a8a6454460773cf02236d Reviewed-on: https://swiftshader-review.googlesource.com/18728Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
- 25 Apr, 2018 3 commits
-
-
Nicolas Capens authored
We don't need protected visibility because we now have a version script which hides all symbols except the ones we want to export. Fixes ld linker errors: relocation R_X86_64_PC32 against protected symbol `libEGL_swiftshader' can not be used when making a shared object relocation R_X86_64_PC32 against protected symbol `libGLESv2_swiftshader' can not be used when making a shared object Change-Id: I059c4b03f2523bf8caf08180b02a349d3cf7b2f2 Reviewed-on: https://swiftshader-review.googlesource.com/18708Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Corentin Wallez <cwallez@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Jorge E. Moreira authored
Bug b/78194651 Change-Id: Iafe8728a3593b0bd48b9633261df4035d2e94117 Reviewed-on: https://swiftshader-review.googlesource.com/18668Reviewed-by:
Alexis Hétu <sugoi@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com>
-
Takuto Ikuta authored
Bug: chromium:428099 Change-Id: Ib070a540a3ef245e2828b277dcdabd5b973322f0 Reviewed-on: https://swiftshader-review.googlesource.com/18688Tested-by:
Takuto Ikuta <tikuta@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
- 24 Apr, 2018 1 commit
-
-
Alexis Hetu authored
The sampler was simply not declared in that case, as if the uniform was unused in the shader, so making sure structures containing samplers call samplerRegister solves this issue. It was working properly if the sampler was used anywhere else in the shader, but failed when the only use in the shader was being passed as an argument to a function through a containing structure. Added a unit test since this isn't covered by dEQP. Fixes 2 WebGL tests: conformance/glsl/bugs/sampler-array-struct-function-arg.html conformance/glsl/bugs/sampler-struct-function-arg.html Change-Id: I81767d7c6415de7aefefecffcc66265d944a94ab Reviewed-on: https://swiftshader-review.googlesource.com/18628Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
- 19 Apr, 2018 1 commit
-
-
Alexis Hetu authored
When libEGL and either libGLESv2 or libGLES_CM are in a different folder from the executable's folder, libEGL wasn't successfully finding libGLESv2/libGLES_CM (or vice versa). Since these libraries are generally in the same folder, using the current library's folder as a starting location to find another library solves this issue. Change-Id: Ice9217411de4e269d511549411297b57fc1a4bbb Reviewed-on: https://swiftshader-review.googlesource.com/18548Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
- 18 Apr, 2018 1 commit
-
-
Nicolas Capens authored
Fixes dEQP-EGL.functional.query_surface.* tests. Change-Id: I9d0d2dee83140613af24471d350777959ee37565 Reviewed-on: https://swiftshader-review.googlesource.com/18488Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
- 17 Apr, 2018 1 commit
-
-
Nicolas Capens authored
This information is now part of internal structured metadata. Change-Id: Idb8c1ce256133d9857b96c2a3152e333606f4fbd Reviewed-on: https://swiftshader-review.googlesource.com/18568Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Corentin Wallez <cwallez@google.com>
-
- 16 Apr, 2018 1 commit
-
-
Nicolas Capens authored
Change-Id: Ic0a16ac68582e398a02eef722d52a77a1ebde877 Reviewed-on: https://swiftshader-review.googlesource.com/18508Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
- 13 Apr, 2018 1 commit
-
-
Alexis Hetu authored
Currently, when overflowing the number of temporary registers allowed, SwiftShader will crash somewhere in the generated code. This cl adds an early check to prevent the crash and instead output an error message to the user. Bug chromium:814987 Change-Id: Idadda21ee14298662763d986ee1283a5114c1c01 Reviewed-on: https://swiftshader-review.googlesource.com/18388Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
- 12 Apr, 2018 1 commit
-
-
David Rim authored
Calls to the EGL API from different threads may exit without releasing their current TLS storage. This patch adds a destructor to release them if they have not been released already. Prevents memory leakage in processes where many threads are created. Bug b/63434079 Bug swiftshader:80 Test: cts-tradefed run commandAndExit cts -m CtsMediaTestCases -t \ android.media.cts.DecodeAccuracyTest Change-Id: I6e94a6d04ce84b884571248ab89b3b1a4e71998b Reviewed-on: https://swiftshader-review.googlesource.com/18328Tested-by:David Rim <davidrim@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
- 10 Apr, 2018 7 commits
-
-
Alexis Hetu authored
Adding a getPlane() function in order to not have the "plane" private member unused, which causes a warning and makes compilation fail. Change-Id: I3ec08d3439c7e8f3d4314f3b4864d12e9c34d6f4 Reviewed-on: https://swiftshader-review.googlesource.com/18468Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Alexis Hetu authored
Added the missing libraries (CoreFoundation and IOSurface) to the CMakeLists.txt file. Change-Id: I6db6b3d2396f557296bbf670d152cc421b6727dd Reviewed-on: https://swiftshader-review.googlesource.com/18469Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
Strict compilation requires symbols used in template functions to have been declared, which will be enforced in future compilers. Bug swiftshader:103 Change-Id: Ibfc05011b1a2938e958dfacf6792477362699dc6 Reviewed-on: https://swiftshader-review.googlesource.com/18448Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com>
-
Greg Hartman authored
Bug b/75229322 Test: Local build of K Fixes build break ab/4660759 Change-Id: Ib2cb43594b331c4415650517df65e8ccd497f820 Reviewed-on: https://swiftshader-review.googlesource.com/18190Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Greg Hartman authored
It's not safe to rely on LOCAL_MODULE_RELATIVE_PATH on all branches Cleaned up some unnecessary ifdef's Bug b/75229322 Test: Local build of K Fixes build break ab/4660124 Change-Id: I48d3400a2109cd5a2cf593e03f9e234f490c8252 Reviewed-on: https://swiftshader-review.googlesource.com/18189Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
Android versions before M did not have: std::shared_ptr std::unique_ptr std::to_string This is fixed by extending stlport with custom implementations for these features. This works by using 'string' and 'memory' header files in a path searched before stlport itself, in which the new features are implemented, and including stport's original headers for all other functionality. Bug b/75229322 Change-Id: Icd05c072c366381155e086c3f14f805bc4f104d6 Reviewed-on: https://swiftshader-review.googlesource.com/18408Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Greg Hartman authored
libnativebase and liblog_headers didn't exist until O MR1 Bug b/75229322 Test: Local builds K through P DP1 Change-Id: I07361e4ef8a98108536319428741554b937eda1a Reviewed-on: https://swiftshader-review.googlesource.com/17768Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com>
-
- 09 Apr, 2018 3 commits
-
-
Alexis Hetu authored
Added support for eglCreatePbufferFromClientBuffer(), using an IOSurface on MacOS, or just a straight buffer pointer on other platforms. Added new unit tests (IOSurfaceClientBufferTest class), which pass on both Windows and MacOS. Change-Id: I79a6b420d85fb1f3ae505e0c0067bad2e27510d4 Reviewed-on: https://swiftshader-review.googlesource.com/17168Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
The array size is set using the value returned by arraySizeErrorCheck, even when an error occurred, so don't leave it uninitialized. Bug chromium:801648 Change-Id: If2af27c5f61dca2931796f1681dce61ab6a44341 Reviewed-on: https://swiftshader-review.googlesource.com/18368Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Alexis Hetu authored
On MacOS, the BGRA format is used for framebuffers. Because of that, copying from the BGRA format must be allowed in the same places the RGBA format is allowed. This fixes the following WebGL test on MacOS: conformance/textures/misc/copy-tex-image-2d-formats.html Change-Id: I45c6b81a894dd8d55c4ab5cff0cf9ad1a08c8303 Reviewed-on: https://swiftshader-review.googlesource.com/18348Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
- 06 Apr, 2018 2 commits
-
-
Alexis Hetu authored
The data pointer 'buffer->data()' was being used without the offset applied, which means we were using the wrong part of the index buffer when primitive restart is enabled. 'indices' should already contain the properly offset buffer pointer, so using it directly should work. Bug chromium:823096 Change-Id: If70634f63d40d8efde9b1336370c1a63b1faa19f Reviewed-on: https://swiftshader-review.googlesource.com/18268Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Alexis Hétu <sugoi@google.com>
-
Greg Hartman authored
This cleans up a problem that was introduced by https://swiftshader-review.googlesource.com/17188 LOCAL_VENDOR_MODULE was first supported on O, so when we build SwiftShader on earlier branches the libraries land in /system. The fix in the Android.mk files would be complicated and would revert some of the cleanup, and would cause issues for 64 bit only builds. While it would be possible to extend the original approach, it just seems cleaner to check in /system at runtime. Bug b/76437145 Test: Local build and boot of Cloud Android N Change-Id: I86e0363a8cbd7b8f2ba744f14a67dfe457f3725f Reviewed-on: https://swiftshader-review.googlesource.com/18288Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com>
-
- 04 Apr, 2018 1 commit
-
-
Mustafa Çamurcu authored
Windows implementation for FrameBuffer needs priority over Ozone. When building Chrome for Windows using Ozone, since use_ozone=true, some required windows definitions don't get defined. Change-Id: I6b8475c036dc88f7e3cb118a7db286afc75857fe Reviewed-on: https://swiftshader-review.googlesource.com/17968Tested-by:
Mustafa Çamurcu <camurcu@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
- 29 Mar, 2018 1 commit
-
-
Nicolas Capens authored
Bug chromium:825545 Change-Id: I37d6192bf65115938943f45d43e153196a7d569a Reviewed-on: https://swiftshader-review.googlesource.com/18128Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
- 27 Mar, 2018 2 commits
-
-
Alexis Hetu authored
It seems like SwiftShader already supports surfaceless contexts properly in eglMakeCurrent, so we might as well expose the extension strings. Change-Id: I3c1b85296c46536df9a8bd754856d825307181d0 Reviewed-on: https://swiftshader-review.googlesource.com/17948Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
This reverts commit 9869bedb. It broke 32-bit builds on Windows because GLsizeiptr and GLintptr are defined as different types (int vs. long) in gl2.h and glcorearb.h. See also https://github.com/KhronosGroup/OpenGL-Registry/issues/162 Change-Id: Ia7bd4accb1671529ce6da6849a1df76dceddcdee Reviewed-on: https://swiftshader-review.googlesource.com/18068Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
- 26 Mar, 2018 4 commits
-
-
Nicolas Capens authored
Change-Id: Ifeee2d5c637586e6b843080aaceb446bd0b5af11 Reviewed-on: https://swiftshader-review.googlesource.com/18048Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Nicolas Capens authored
Convert packed types to the next greater non-packed component type. Specifically, when the red component has fewer than 8 bits, use the corresponding sized internal format with 8-bit components. Note that this is still not fully compliant. The OpenGL ES 3.0 spec section 3.8.5 states that: If internalformat is unsized, the internal format of the new texel array is determined by the following rules, applied in order. If an effective internal format exists that has 1. the same component sizes as, 2. component sizes greater than or equal to, or 3. 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 also the new texel array’s effective internal format. This means that in theory when copying an RGBA4 framebuffer into an RGB texture, the effective internal format should be RGB565, not RGB8. However, dEQP does not enforce this, and ANGLE always assumes UNSIGNED_BYTE components. Change-Id: Id243b963779108e205c275499ddfb6e041a873d6 Reviewed-on: https://swiftshader-review.googlesource.com/17969Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Nicolas Capens authored
Change-Id: I5be0cc629477b6cfb3ede6b4484f067d1c30b0ec Reviewed-on: https://swiftshader-review.googlesource.com/17929Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Nicolas Capens authored
When a pixel unpack buffer is bound, glTexImage calls interpret the <pixels> parameter as an offset into the pixel buffer. We weren't validating that the accessed data falls within the buffer, when taking the offset into account. Bug chromium:822976 Change-Id: I3ab23e3b135fd4ad1e55555eec95d584684f5d82 Reviewed-on: https://swiftshader-review.googlesource.com/17928Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-