- 14 Jun, 2018 1 commit
-
-
Alexis Hetu authored
SwiftShader should be able to build on Fuchsia, but it would hit a collision error if added as a dependency in Fuchsia, so the same logic currently used on MacOS could also be used to avoid the collision on Fuchsia. Change-Id: I9ac216dfc2180165a82bd5ae81c843ee4aea7ce6 Reviewed-on: https://swiftshader-review.googlesource.com/19328Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Sergey Ulanov <sergeyu@chromium.org> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
- 08 Jun, 2018 1 commit
-
-
Nicolas Capens authored
The parameters of the matrix constructor form an aggregate node that was passed directly to the constructor of the structure, instead of creating a one-element aggregate containing the matrix. https://github.com/mc-imperial/shader-compiler-bugs/issues/74 Bug swiftshader:56 Change-Id: Iff9a2d8dc60d79a0dde28f2aad76407028486ec8 Reviewed-on: https://swiftshader-review.googlesource.com/19308Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
- 05 Jun, 2018 4 commits
-
-
Alexis Hetu authored
It appears that not only render targets, but also samplers that use IOSurfaces require SwiftShader to perform synchronized draws, otherwise it seems like using a shared IOSurface's CPU memory is unsafe and can cause crashes in Layout Tests. Bug chromium:846693 Change-Id: I0ce24700d34c657ac2447ceb2f6f837bfa3a9a58 Reviewed-on: https://swiftshader-review.googlesource.com/19288Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
Change-Id: If953be0cce3cd11b833d9646e10ede0b31732729 Reviewed-on: https://swiftshader-review.googlesource.com/19248Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Nicolas Capens authored
Change-Id: I0984f43de3846428c30232192c7ba83342b1debd Reviewed-on: https://swiftshader-review.googlesource.com/19228Reviewed-by:
Krzysztof Kosiński <krzysio@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
Bug chromium:849217 Change-Id: I69d2269c117500d21e5d0860aed0acea212948ba Reviewed-on: https://swiftshader-review.googlesource.com/19268Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
- 04 Jun, 2018 2 commits
-
-
Alexis Hetu authored
Added missing function declaration. Change-Id: I52ddb666d70733187242906d298fb986f413756a Reviewed-on: https://swiftshader-review.googlesource.com/19208Reviewed-by:
Alexis Hétu <sugoi@google.com> Tested-by:
Alexis Hétu <sugoi@google.com>
-
Alexis Hetu authored
Because of the way SwiftShader is integrated into Chromium on MacOS, a synchronization issue exists when Chromium attempts to use an IOSurface before SwiftShader is done rendering into it. In order to solve this, all draw calls that end up rendering into an IOSurface must be synchronized within SwiftShader and can't yield to Chromium until rendering is complete. Bug chromium:847094 Change-Id: If2dba4fa998e7437ec414d3b4aff9e8b19ecc128 Reviewed-on: https://swiftshader-review.googlesource.com/19188Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
- 02 Jun, 2018 2 commits
-
-
Nicolas Capens authored
Fixes "error: conditional expression is ambiguous; 'sw::Float' can be converted to 'RValue<sw::Float>' and vice versa". Change-Id: I2bd21036803dc54ce212df61a7520b7276b94b2a Reviewed-on: https://swiftshader-review.googlesource.com/19168Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
The numeric imprecision can accumulate quickly and cause visible sampling errors. Bug chromium:848238 Change-Id: Ie41c10a0462e5b5e5c3ed5f7329ece00dab3f7f9 Reviewed-on: https://swiftshader-review.googlesource.com/19148Reviewed-by:
Alexis Hétu <sugoi@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com>
-
- 01 Jun, 2018 1 commit
-
-
Nicolas Capens authored
On Windows, GLAPI defaults to __declspec(dllimport), while GLAPICALL is empty, leading to declaration mismatches. Either should be empty for the unit tests since we link statically, for all platforms. Change-Id: I2dde0ca35108678fd9767895e0120ee4b0d7030f Reviewed-on: https://swiftshader-review.googlesource.com/19128Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
- 31 May, 2018 2 commits
-
-
Nicolas Capens authored
GLAPI is the desktop OpenGL equivalent of OpenGL ES's GL_APICALL macro. They need to be consistent to prevent CLang from producing errors when compiling with -Werror,-Winconsistent-dllimport. Change-Id: Iceb73f42f52628a31aba7ce18fe60221529f890c Reviewed-on: https://swiftshader-review.googlesource.com/19108Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Nicolas Capens authored
https://github.com/KhronosGroup/EGL-Registry/pull/43 made eglplatform.h include X11 headers on Mac OS, which aren't pre-installed and breaks the Chrome build. https://github.com/KhronosGroup/EGL-Registry/issues/52 Change-Id: I73e3c11244a07e269684323ce76cc9700fe9c1aa Reviewed-on: https://swiftshader-review.googlesource.com/19088Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
- 30 May, 2018 6 commits
-
-
Nicolas Capens authored
Fixing https://github.com/KhronosGroup/OpenGL-Registry/pull/149 and https://github.com/KhronosGroup/OpenGL-Registry/pull/183 enabled including desktop OpenGL headers without conflicts, so we no longer have to define enums for ARB extensions ourselves. Change-Id: I4f2e2d3b79a6f5cacf53f2a8ace78b6d124cb5d1 Reviewed-on: https://swiftshader-review.googlesource.com/19029Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Nicolas Capens authored
Change-Id: If56e711f15236397ac0f8b15f4ca182a7b1e7c49 Reviewed-on: https://swiftshader-review.googlesource.com/19028Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Peter Collingbourne authored
This allows compilers targeting the MS ABI to select the correct inheritance model for the member function pointer field DrawCall::setupPrimitives using the complete type of Renderer. It will allow us to enable the new Clang flag -fcomplete-member-pointers globally. Bug: chromium:847724 Change-Id: Ied5859ec2f5d38b3ccf51608527506caec53f470 Reviewed-on: https://swiftshader-review.googlesource.com/19068Tested-by:
Peter Collingbourne <pcc@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
delete[] should be called on memory allocated with new[]. Change-Id: Ic21e270a7aa0e6e15132cbc3c454ea4f1e0222ea Reviewed-on: https://swiftshader-review.googlesource.com/19048Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Nicolas Capens authored
Loops were no longer getting unrolled because we analyzed the entire loop, not just the body, for changes to the index variable. Also, the logic was inverted. Also, be conservative about loops with return statements not being unrollable. Bug chromium:845103 Change-Id: I5957e17f7b985ae90b10053216b6945f3f64338e Reviewed-on: https://swiftshader-review.googlesource.com/19008Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Nicolas Capens authored
Previously we only copied the GLSL shader compiler's info log on failure. This hid any warnings or debug info from the application. Bug chromium:845103 Change-Id: Ia1877a405db2017d327dfc68037596fbda1579fa Reviewed-on: https://swiftshader-review.googlesource.com/19009Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
- 29 May, 2018 3 commits
-
-
Nicolas Capens authored
Previously only dynamic indexing of uniforms was supported. Since this is essentially a gather operation within the register file, it is slow. We optimize the common case of using the loop index variable as relative address, where the index value would be the same for all shader invocations running in lock-step across SIMD lanes. Bug chromium:845103 Bug skia:7846 Change-Id: Idb36b512dd560d740ac9088691b633ff3a1561c1 Reviewed-on: https://swiftshader-review.googlesource.com/18968Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Nicolas Capens authored
This allows to address the registers with a vector of indices. Also rename 'dynamic' register files to 'indirect addressable', to disambiguate from 'dynamic indexing' at the shader level. Indexing with a uniform does not require gather/scatter operations, but does require indirect addressing. Bug chromium:845103 Bug skia:7846 Change-Id: I3c42be33def66328688f2900c61c80246bf1e584 Reviewed-on: https://swiftshader-review.googlesource.com/18989Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Nicolas Capens authored
Loops can only be unrolled if their loop index variable is not being modified in the loop body. Also check that the increment step of the loop operates on the initial index variable. Also remove some UNIMPLEMENTED's that were benign. Bug chromium:845103 Bug chromium:843867 Bug skia:7846 Change-Id: Ib2b39f2d58763f0299ce7f6f75a8a75e6bdc7963 Reviewed-on: https://swiftshader-review.googlesource.com/18988Reviewed-by:
Alexis Hétu <sugoi@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com>
-
- 23 May, 2018 2 commits
-
-
Nicolas Capens authored
Change-Id: Icdeb96a3044ddf215a59ab832703bb447d85c3ab Reviewed-on: https://swiftshader-review.googlesource.com/18948Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Nicolas Capens authored
Change-Id: I3cd5b2514149c5bf44dfab483eda415082da7793 Reviewed-on: https://swiftshader-review.googlesource.com/18928Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
- 18 May, 2018 1 commit
-
-
Krzysztof Kosiński authored
This usage is not explicitly specified in EXT_texture_filter_anisotropic, but in practice all notable ES 3.0 implementations treat maximum anisotropy as sampler state. Furthermore, it's already accepted as a valid sampler parameter by ValidateSamplerObjectParameter in Context.cpp. This avoids a crash when calling glSamplerParameteri(sampler, GL_TEXTURE_MAX_ANISOTROPY_EXT, 1.f); Bug: b/79951966 Change-Id: I4013f621781fc74a0fbfbf14ab326871fbb87b7c Reviewed-on: https://swiftshader-review.googlesource.com/18908Reviewed-by:
Alexis Hétu <sugoi@google.com> Tested-by:
Krzysztof Kosiński <krzysio@google.com>
-
- 17 May, 2018 3 commits
-
-
Nicolas Capens authored
We assume the pixels of an image can be addressed with a signed 32-bit offset, including any padding. For a 3D image it's possible to exceed this without exceeding the per-dimension limits. Lowering the per- dimension limit so the allocation is always less than 2 GiB makes them unreasonably small, so instead we must check the total size. Use 1 GiB as the soft limit in OpenGL. Bug chromium:835299 Change-Id: I9c5184002c1710e3923b549f8c21e7f6a516e1c7 Reviewed-on: https://swiftshader-review.googlesource.com/18869Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
This eliminates the duplication between pitchB() and size(), and ensures that the latter is the full allocation size. Bug chromium:835299 Change-Id: Icf555ad497fb3b92fd00e9a3e6ced6810b2d310d Reviewed-on: https://swiftshader-review.googlesource.com/18789Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Nicolas Capens authored
OpenGL has separate implementation-defined texture size limits, for 3D textures and array textures. For now just give them the same value. Bug chromium:835299 Change-Id: Ifaf537511f016e21992388f56598d5ec12a393b8 Reviewed-on: https://swiftshader-review.googlesource.com/18788Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
- 16 May, 2018 3 commits
-
-
Nicolas Capens authored
https://gitlab.khronos.org/opengl/API/issues/72 was resolved to treat these cases as a no-op and not generate an error. Bug chromium:825545 Change-Id: Ic4cfbc728156bb88a6dc70486ae57c3e12ea43ae Reviewed-on: https://swiftshader-review.googlesource.com/18870Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
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 1 commit
-
-
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>
-