- 31 May, 2018 1 commit
-
-
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 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 3 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>
-