Log

Author Commit Date CI Message
John Bauman f691cfab 2016-05-04T17:57:50 Fix eglStreamConsumerAcquireKHR This was incorrectly acquiring every plane to texture 0. BUG=angleproject:1332 Change-Id: I6df1401b705d903078e2631634b6bf20a07570de Reviewed-on: https://chromium-review.googlesource.com/342513 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: John Bauman <jbauman@chromium.org>
Jamie Madill 8415b5fd 2016-04-26T13:41:39 Pass ContextImpl to Framebuffer methods instead of ContextState. BUG=angleproject:1363 Change-Id: I7e7524d95f2ca31c35918f9fe5c0cb681ed93616 Reviewed-on: https://chromium-review.googlesource.com/340746 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 437fa654 2016-05-03T15:13:24 Add a ContextImpl class. This class can contain impl-specific functionality for a Context. This will eventually replace the Renderer class, and we can then start passing around a gl::Context instead of gl::ContextState. In D3D11, the ContextImpl could hold a DeferredContext, which would enable multi-thread rendering. In GL, we can implement non-virtual (native) Contexts. In Vulkan it might store the logical device. BUG=angleproject:1363 Change-Id: I39617e6d1a605d1a9574832e4d322400b09867ec Reviewed-on: https://chromium-review.googlesource.com/340745 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Olli Etuaho bd329091 2016-04-29T12:51:42 Add missing errors specified by OES_EGL_image_external Previously the code just silently ignored some filtering parameters for external textures, when in fact trying to set them should result in an error according to the extension specs. BUG=angleproject:1332 Change-Id: I3a691b60561638c562bc1a9780a4dcb88ac43012 Reviewed-on: https://chromium-review.googlesource.com/341441 Reviewed-by: Ian Ewell <ewell@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jamie Madill 2be8c8cc 2016-04-28T14:39:15 Add script for updating Canary ANGLE DLLs. This script makes debugging in Chrome easier on Windows. It scans for the latest set of ANGLE DLLs among many search paths, and then copies them to the latest Chrome Canary binary directory. It also backs up the original DLLs if it finds them. BUG=None Change-Id: I66f8897a1393ceba8f614e4f91c0e1f9f0439eb3 Reviewed-on: https://chromium-review.googlesource.com/341221 Reviewed-by: Geoff Lang <geofflang@chromium.org>
Corentin Wallez bbd663a2 2016-04-20T17:49:17 Add dirty bits for the pixel pack and unpack buffer BUG=605775 Change-Id: Ifb7eee94a395a9e9f5a5c1d6c0f05299162264a9 Reviewed-on: https://chromium-review.googlesource.com/340115 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 7cd70337 2016-04-20T16:40:49 Fix integer constant vertex attributes in OpenGL backend BUG=605775 Change-Id: Ie76cae5be686478019c61c1877611bea83d7502f Reviewed-on: https://chromium-review.googlesource.com/340114 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez a2257dac 2016-04-19T16:43:12 Set the bound XFB to 0 when it is deleted BUG=605775 Change-Id: Ie7af2c0dc4536b26473510a80955f4628ea496bb Reviewed-on: https://chromium-review.googlesource.com/340113 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez e71ea19a 2016-04-19T13:16:37 Allow queries of different types to be active at the same time BUG=605775 Change-Id: I0e23fae25d450c504f174a080279cf51aebcd123 Reviewed-on: https://chromium-review.googlesource.com/340112 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 3f572680 2016-04-26T13:41:36 Rename gl::VertexArray::Data to gl::VertexArrayState. BUG=angleproject:1363 Change-Id: I5acf670bd88988941676cc9bc75606d55cca224e Reviewed-on: https://chromium-review.googlesource.com/340744 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 15243d9b 2016-04-26T13:41:35 Rename gl::Shader::Data to gl::ShaderState. BUG=angleproject:1363 Change-Id: I49cb5d7319742487c8c00c58ec58f9a29561b9c1 Reviewed-on: https://chromium-review.googlesource.com/340743 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Ian Ewell bda75597 2016-04-18T17:25:54 Finish NV12 support via streams. The main functionality for NV12 texture support through EGL streams has been added. Updates to the compiler, texture code, and stream code were added to support binding to external D3D11 NV12 textures. An end2end test was also added to test sampling of YUV textures and converting to RGB. There is also a new script to convert BMP files to an NV12 texture ready to load into D3D11 for testing purposes. BUG=angleproject:1332 Change-Id: I39b6ec393ea338e2c843fb911acc1b36cd1158a0 Reviewed-on: https://chromium-review.googlesource.com/339454 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Ian Ewell <ewell@google.com> Reviewed-on: https://chromium-review.googlesource.com/341254 Reviewed-by: Ian Ewell <ewell@google.com>
Jamie Madill 48ef11b2 2016-04-27T15:21:52 Rename gl::Framebuffer::Data to gl::FramebufferState. Moving this out of the Framebuffer class allows us to forward- declare it. BUG=angleproject:1363 Change-Id: I91971c37a92151df508cdf7f0eb8c3e93506d112 Reviewed-on: https://chromium-review.googlesource.com/340741 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Corentin Wallez 3d63bc79 2016-04-19T12:42:49 OpenGL backend: fix logic updating max uniform components BUG=605775 Change-Id: I37c1dc7117e7e47ee3a7e031cbccb44f39458c09 Reviewed-on: https://chromium-review.googlesource.com/340111 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Corentin Wallez 9670b03e 2016-04-29T09:47:47 Revert "Finish NV12 support via streams." Broke Windows Clang compilation, see https://build.chromium.org/p/chromium.gpu.fyi/builders/GPU%20Win%20Clang%20Builder%20%28dbg%29/builds/3583/steps/compile/logs/stdio and search for TextureStorage11.h This reverts commit 9b8b359fa3615be7c7492239a48f61103b2e4fcc. Change-Id: I6e54305eba02b40927a35577594df39e951adb32 Reviewed-on: https://chromium-review.googlesource.com/341430 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 9082b982 2016-04-27T15:21:51 Rename gl::Data to gl::ContextState. Part of the new world order of renaming the Obj::Data classes to ObjState. BUG=angleproject:1363 Change-Id: I15cf002b8b093d687f540b9e86f045874af24a7e Reviewed-on: https://chromium-review.googlesource.com/340740 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Ian Ewell 9b8b359f 2016-04-18T17:25:54 Finish NV12 support via streams. The main functionality for NV12 texture support through EGL streams has been added. Updates to the compiler, texture code, and stream code were added to support binding to external D3D11 NV12 textures. An end2end test was also added to test sampling of YUV textures and converting to RGB. There is also a new script to convert BMP files to an NV12 texture ready to load into D3D11 for testing purposes. BUG=angleproject:1332 Change-Id: I098940e6f25e113dcc4fc8d22ffed4b5a16fd860 Reviewed-on: https://chromium-review.googlesource.com/339454 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Ian Ewell <ewell@google.com>
Olli Etuaho ac93b7ca 2016-04-28T17:16:59 D3D: Fix RGB5_A1 texture upload from PBO failure on Windows 10 Failure is consistently seen in the dEQP tests on Windows 10 on NVIDIA and Intel drivers, where creating an SRV from the buffer in the right format fails. Disable the fast copy path for this format similarly to how it's already disabled for some other formats. BUG=angleproject:1095 TEST=dEQP-GLES3.functional.texture.specification.teximage2d_pbo.rgb5* Change-Id: I7a1cd15c2cd130c9e8a637457c201778f157333b Reviewed-on: https://chromium-review.googlesource.com/341170 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Corentin Wallez f14f795e 2016-04-21T15:43:51 Use base level to get internal format in GenerateMipMap BUG=605775 Change-Id: I11039ee9ba21dbe2716eed0d3a12a0fb2cf50ea4 Reviewed-on: https://chromium-review.googlesource.com/340116 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Geoff Lang 65a0be92 2015-10-02T09:57:30 Implement program binary in ProgramGL. BUG=angleproject:882 Change-Id: I8d57c185066e9fc0c1b8def09bc48d80ad97d328 Reviewed-on: https://chromium-review.googlesource.com/303901 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Corentin Wallez aab7e868 2016-04-18T11:47:28 DisplayGLX: Add AMD driver version detection BUG=590870 Change-Id: I8b2548038635182bafa691671bdaa16f12b45694 Reviewed-on: https://chromium-review.googlesource.com/339450 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Frank Henigman e7419b9f 2016-04-13T23:29:27 Add FunctionsEGL, FunctionsEGLDL - EGL wrappers. FunctionsEGL is an abstract class. FunctionsEGLDL is an libdl-based implementation. BUG=angleproject:1297 Change-Id: I0fe5a337e34518cc6248494dbc4ee5c2938d4b77 Reviewed-on: https://chromium-review.googlesource.com/338884 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
Jamie Madill 4200fc36 2016-04-26T11:37:18 gyp: Remove the post-build script hook. This was used by developers to copy compiled libs around. With better dEQP integration and supporting tools it is no longer necessary. BUG=None Change-Id: Iff35be88111c2c806bb02abf43ffb33ed5b641fd Reviewed-on: https://chromium-review.googlesource.com/340589 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang d860552f 2016-04-13T10:19:12 Implement support for CHROMIUM_bind_uniform_location. BUG=angleproject:1353 Change-Id: Ia219ff973de0de2f8e112c276b3ab6319f7d3884 Reviewed-on: https://chromium-review.googlesource.com/334252 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jamie Madill 5ed23982 2016-04-22T15:08:57 Fix allocation in ValidateOutputs. We should not be using the pool allocator for destructable objects. BUG=None Change-Id: I89236b28f04bd9b7095056edbda4172dbbfe9586 Reviewed-on: https://chromium-review.googlesource.com/340362 Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Olli Etuaho d4f4c11b 2016-04-15T15:11:24 Fix deferring global array initialization The initial implementation of DeferGlobalInitializers did not take HLSL corner cases into account. In particular, in case there was a const-qualified array variable with an initializer that contained elements that weren't constant folded, initialization would not be deferred and the global scope of HLSL output would contain a call to angle_construct_into_*(). On the other hand, deferring global initializers was also done in cases where it wasn't necessary. Initializers of non-const qualified array variables that could be written as HLSL literals by HLSL output were unnecessarily deferred. This patch fixes both of these issues: Now all global initializers are potential candidates for deferral instead of just those where the symbol has the EvqGlobal qualifier, and initializers that are constructors taking only constant unions as parameters are not unnecessarily deferred. BUG=angleproject:1205 BUG=541551 TEST=angle_end2end_tests Change-Id: I4027059e0e5f39c8a5a48b5c97a3fceaac6b6f8a Reviewed-on: https://chromium-review.googlesource.com/339201 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Geoff Lang 250062bc 2016-04-25T12:33:44 Make sure D3DRS_TWOSIDEDSTENCILMODE is enabled if the stencil test is. This state-setting code was not ported when adding the dirty bits for D3D9 depth stencil state in https://chromium-review.googlesource.com/#/c/316449. BUG=597107 Change-Id: I0a1bdae18dd22c9b01f12a73267040157a866654 Reviewed-on: https://chromium-review.googlesource.com/340436 Tryjob-Request: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Olli Etuaho 82c47ad0 2016-04-20T18:28:47 Pass ImplFactory to Texture constructor This improves encapsulation inside the Texture class, and removes duplication of createTexture calls. This is a necessary step towards adding a shared "Data" structure to the Texture classes, following a similar pattern as for example the Framebuffer class. This patch also shares the same MockFactory class among different unit tests. BUG=angleproject:596 TEST=angle_unittests Change-Id: Ie8d3a9aa4ec35565d7ecbabb8c40e7b1ba068721 Reviewed-on: https://chromium-review.googlesource.com/340200 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Jamie Madill e4857c7d 2016-04-21T14:13:53 Buffer11: Use adaptive threshold for releasing system memory. The hard-coded threshold of five uses before a release was regressing the Oort online benchmark, which seems to use an index buffer many times, then change to a different range of indices, which would need to check the system memory for index range validation. Also add a performance regression test, and an update to the perf runner script which checks for the most recent binary among the search directories. BUG=594066 Change-Id: Id09cc32fd00bff1c72cbe9b6fb7c210fd047a551 Reviewed-on: https://chromium-review.googlesource.com/339271 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Olli Etuaho b97a3e77 2016-04-13T14:31:52 Clean up MipmapTest This refactoring is done to prepare for adding more mipmap tests for ES3 where base level / max level is changed from 0. 1. Reuse drawQuad() from ANGLETest instead of having completely custom quad drawing code, and reuse the same clear+draw function for both 2D and cube map texture tests. 2. Add a helper function for clearing texture level 0 with glClear. 3. Remove a few redundant texture binding and useProgram calls. 4. Rely on sampler uniforms being set to 0 by default and texture unit 0 being active by default. 5. Remove "Offscreen" from variable names. 6. Split SetUp functions to helper functions. 7. Reuse FillWithRGBA from TextureTest also in MipmapTest. BUG=angleproject:596 TEST=angle_end2end_tests Change-Id: I9fd738f4b8b0a19c7aa1d267f7dbaa40a6935631 Reviewed-on: https://chromium-review.googlesource.com/338791 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Geoff Lang b0a53105 2016-04-01T11:43:54 Add a NativeWindowD3D abstract class to handle native window interactions. The previous NativeWindow class included D3D11 headers while being included in all D3D backds and had platform-dependent includes and members. This turns it into an abstract class that only implements the minimal functionality for each renderer. BUG=angleproject:1345 Change-Id: I8f20339dd6bba719e574a1dcb3ec859897c9228f Reviewed-on: https://chromium-review.googlesource.com/336780 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang ae2d0a0e 2016-04-15T15:04:14 Fix incorrect dirty bit state tracking on D3D9 AMD with color masks. When using the zero color mask workaround in StateManager9, the blend state and blend equation were being modified. This caused inconsistant state if the workaround stopped being used in subsequent draw calls. To deal with this issue, dirty the BLEND_ENABLED and BLEND_EQUATION states when the COLOR_MASK changes and dirty the COLOR_MASK state wheneither BLEND_ENABLED or BLEND_EQUATION changes. BUG=597107 Change-Id: I03de934b419b7593e4863838720ced1e5773c092 Reviewed-on: https://chromium-review.googlesource.com/339280 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tryjob-Request: Geoff Lang <geofflang@chromium.org>
Olli Etuaho 5858f7e3 2016-04-08T13:08:46 Re-land "Refactor texture function handling in OutputHLSL" This change is pure refactoring, it does not introduce any functional changes. Separate texture function output into a helper class and further into different helper functions to make the code more maintainable. Some of the logic is simplified slightly by eliminating duplicate cases and limiting the scope of variables where possible, but care has been taken to preserve the exact same functionality as before. Re-land with a fix to typo in include guard. BUG=angleproject:1349 TEST=dEQP-GLES3.functional.shaders.texture_functions.* (no regression) dEQP-GLES3.texture.* (no regression) Change-Id: I57c1ec1950fa05bd16275ca578eb5ee99b34a5ae Reviewed-on: https://chromium-review.googlesource.com/339180 Reviewed-by: Jamie Madill <jmadill@chromium.org>
Corentin Wallez c2ed9380 2016-04-15T13:29:25 Revert "Refactor texture function handling in OutputHLSL" It triggered an include guard warning on Windows Clang This reverts commit 6f6c5580553d1f3c584df692823c2f5640e23d88. Change-Id: Ibd4f2851f311a494f16376d8eed38f3119594761 Reviewed-on: https://chromium-review.googlesource.com/338933 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Olli Etuaho 6f6c5580 2016-04-08T13:08:46 Refactor texture function handling in OutputHLSL This change is pure refactoring, it does not introduce any functional changes. Separate texture function output into a helper class and further into different helper functions to make the code more maintainable. Some of the logic is simplified slightly by eliminating duplicate cases and limiting the scope of variables where possible, but care has been taken to preserve the exact same functionality as before. BUG=angleproject:1349 TEST=dEQP-GLES3.functional.shaders.texture_functions.* (no regression) dEQP-GLES3.texture.* (no regression) Change-Id: I5d81b842d693c0055890d5724eae6c105e454cd8 Reviewed-on: https://chromium-review.googlesource.com/337931 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Minmin Gong 6684007a 2016-03-15T17:01:42 Takes principal component analysis to improve the endpoint in ETC transcode. Insteading of getting the BC1 endpoints from the max and min intensity, a PCA on pixels might give us better quality results, with limited costs. Change-Id: I7638d78c666c2580a6b0c267470bf4a0f7082e05 Reviewed-on: https://chromium-review.googlesource.com/332871 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Olli Etuaho 3d932d83 2016-04-12T11:10:30 Defer global initializers when necessary Move global variable initializers that are not constant expressions to a function that gets called at the start of main(). This is done with an AST transformation. This needs to be done because global variable initializers must be constant in native GL, but ANGLE is more lenient with what can be put into ESSL 1.00 global initializers to remain compatible with legacy WebGL content. Non-constant global variable initializers also caused issues in HLSL output, since in HLSL output some types of expressions get unfolded into multiple statements. These include short-circuiting operators and array initialization. To make sure that these cases are covered, any initializers that can't be constant folded are deferred, even if they have the const qualifier. The old deferring mechanism in OutputHLSL is removed in favor of this new AST transformation based approach. BUG=angleproject:819 BUG=angleproject:1205 BUG=angleproject:1350 BUG=596616 TEST=WebGL conformance test conformance/glsl/misc/global-variable-init.html Change-Id: I039cc05d6b8c284baeefbdf7f10062cae4bc5716 Reviewed-on: https://chromium-review.googlesource.com/338291 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho b079c7af 2016-04-01T12:32:52 Wrap integer textures with correct wrap mode in HLSL The wrap mode information for all three dimensions is packed to a single integer in order to conserve sampler metadata space. Only one int4 vector is used for the metadata for a single sampler. The sampler metadata is now packed into a struct instead of an array of integers in order to make the code more readable and maintainable. The internalFormatBits field is not removed in this patch. It's better to remove it in a separate patch, so restoring it is easier in case it will be used for optimizing some of the texture sampling functions. The wrap mode passed in sampler metadata is used to wrap the texture coordinates in the code generated to implement ESSL 3.00 integer texture sampling built-ins. Those dEQP-GLES3.functional.texture.units.* tests that sample from integer cube maps still fail on Intel D3D after this change, presumably due to driver issues. BUG=angleproject:1244 BUG=angleproject:1095 BUG=angleproject:1092 TEST=dEQP-GLES3.functional.texture.units.* (all pass on NVIDIA), dEQP-GLES3.functional.shaders.texture_functions.* (no regressions) Change-Id: I4e31e5796086f9cc290c6f1f8c4380a768758d71 Reviewed-on: https://chromium-review.googlesource.com/336638 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Geoff Lang f4863a45 2016-04-12T11:37:23 Add a perf test for setting uniform data. BUG=angleproject:1353 Change-Id: Iaae79bb85318583c12b9a939ea27a7f7f7f64faf Reviewed-on: https://chromium-review.googlesource.com/338441 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Brett Wilson 81efa8ec 2016-04-12T14:17:19 Disable pointer conversion warning in XNVCtrl This warning happens on some older versions of the X headers, such as those present on the current Chromium linux_chromium_chromeos_rel_ng bots. The default warnings in the GN build are slightly more strict than in GYP which is why we need to add some isolated warning disables. BUG=432959 Change-Id: Id6218780195c59f160adae789305638d3463be9a Reviewed-on: https://chromium-review.googlesource.com/338424 Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Frank Henigman 71fb2100 2016-04-07T20:30:50 Gyp support for Ozone. Introduce gyp flag 'use_ozone' to select Ozone code. Ozone is a display method used on Chrome OS which is based on gbm, drm/kms, and surfaceless egl. BUG=angleproject:1297 Change-Id: Ic1f66121d23d26bac56b09e3e6aedefec5a131df Reviewed-on: https://chromium-review.googlesource.com/338442 Commit-Queue: Frank Henigman <fjhenigman@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 9a9c0484 2016-04-12T10:36:25 Lexer: Error out on invalid field start. When parsing something like x.} the following would happen: - Parsing "." the lexer would move to the FIELDS start condition - Parsing } the lexer wouldn't find any <FIELDS> rule matching - The parser would fall back to <*>. that was asserted unreachable. The fix is to add a <FIELDS>. rule to catch bad field starts BUG=angleproject:1352 Change-Id: I262d2b9ef5f7346c19ae5e19a173e24f40f2f600 Reviewed-on: https://chromium-review.googlesource.com/338222 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 50fcf744 2016-04-11T13:57:32 Add a test for gl_VertexID BUG=angleproject:1217 BUG=587781 Change-Id: I2fd20c686863c1409228717606977a3c4e1cd7fa Reviewed-on: https://chromium-review.googlesource.com/338180 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 52b09c2f 2016-04-11T14:12:31 Re-re-land "D3D11: Implement dirty bits for VertexArray11."" Translated attributes are now stored in the VertexArray11 in a cache, and only updated when dirty bits change. Currently dynamic attributes must be re-translated every call, so these are stored in a list and processed repeatedly. This skips doing a lot of the VertexDataManager work for vertex attributes that don't change between draw calls. Current value attributes, which correspond to disabled attributes that the program will pulls vertex data from, are owned by the Context, so these need to be handled outside of the VertexArray11. Further changes will be necessary to reduce the redundant work we do in the InputLayoutCache. We shouldn't need to re-check the cache if nothing relevant changed. This give about a 23% performance improvement on the draw call benchmark on my machine. Re-land with a fix for the start vertex offset. Re-re-land with a fix for using XFB with deleted buffers. BUG=angleproject:1327 Change-Id: I0fba49515375c149bbf54d933f8d1f747fbb8158 Reviewed-on: https://chromium-review.googlesource.com/338003 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Olli Etuaho 8c15c574 2016-04-12T11:33:37 Revert "Gyp support for Ozone." This broke the Linux standalone build. Error message seen when running "gclient runhooks": "gyp: name 'use_ozone' is not defined while evaluating condition 'OS=="linux" and use_ozone==0' in build/ANGLE.gyp while trying to load build/ANGLE.gyp" This reverts commit 35e65e921394713f89df8d9bfe243b4abb5e9bd7. Change-Id: Iee5f08195ee1c74ead99bb9d70d04928c9bae7af Reviewed-on: https://chromium-review.googlesource.com/338290 Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Frank Henigman 35e65e92 2016-04-07T20:30:50 Gyp support for Ozone. Introduce gyp flag 'use_ozone' to select Ozone code. Ozone is a display method used on Chrome OS which is based on gbm, drm/kms, and surfaceless egl. BUG=angleproject:1297 Change-Id: I5272651bd1af5806b6b42067d2d0f0abf0895af3 Reviewed-on: https://chromium-review.googlesource.com/337781 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
Frank Henigman b6d88e72 2016-04-07T20:17:00 Gyp support for Chrome OS. Change comment to explain the 'chromeos' gyp flag. Make it possible to override pkg-config. BUG=angleproject:1297 Change-Id: Ifc56cc4575d83ff893aaa0283c3aaa91df14fafd Reviewed-on: https://chromium-review.googlesource.com/337708 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
Philippe Hamel 4091119b 2016-04-07T16:45:50 Add workaround to always call useProgram after a successful link. This workaround is meant to reproduce the behavior of the use_current_program_after_successful_link workaround in Chromium (http://crbug.com/110263) The workaround was shown to be unnecessary for MacOSX 10.9 and higher (http://crrev.com/39eb535b). BUG=349137 Change-Id: I3023f053aa1593ba7044a889dd47746b8f7e0581 Reviewed-on: https://chromium-review.googlesource.com/337780 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jamie Madill 53a36004 2016-04-08T19:03:18 Revert "Re-land "D3D11: Implement dirty bits for VertexArray11.""" Seems to make the following dEQP test flaky: dEQP-GLES3.functional.lifetime.attach.deleted_output.buffer_transform_feedback doesn't show up on every bot test, but run it a few times and it'll flake. Reverting while I investigate. BUG=angleproject:1327 This reverts commit 3477f3a62dc139a253a0b361ee138116e9fa881f. Change-Id: Ic23a392526f5f6e107cf0aa06448389804d6b208 Reviewed-on: https://chromium-review.googlesource.com/337961 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Frank Henigman 76d17b27 2016-04-07T20:05:18 Deqp gyp use_x11 fixes. Remove the use_x11==1 condition from two things which have nothing to do with x11: defining _GNU_SOURCE and choosing deqp_libtester_sources_unix. This lets us build for Chrome OS where typically use_x11==0. BUG=angleproject:1297 Change-Id: I9166f2a8119493aaab82af15e109d378fffb811a Reviewed-on: https://chromium-review.googlesource.com/337695 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
Ian Ewell 4a48d9a3 2016-03-31T16:46:25 Initial implementation of ANGLE_stream_producer_d3d_texture_nv12. Add the validation and entrypoints for ANGLE_stream_producer_d3d_texture_nv12, which is a new EGL extension currently being written. The purpose of this extension is to allow insertion of D3D11 NV12 textures to be inserted into a stream. This acts as the producer of the EGL stream. BUG=angleproject:1332 Change-Id: I50d4565cc82b63f7da7632adad4ac4c77d8800f2 Reviewed-on: https://chromium-review.googlesource.com/336695 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Ian Ewell <ewell@google.com>
Jeremy Roman 06feb81c 2016-04-06T16:39:52 Make :angle_common depend on :commit_id. BUG=chromium:601195 Change-Id: Ic90b8c8dbe07700e66c8fe973a3e620f439d2fbe Reviewed-on: https://chromium-review.googlesource.com/337335 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Olli Etuaho ced87057 2016-04-04T16:34:27 Fix integer texture sampling with explicit gradients The lod level should be selected according to the explicit gradients, and the gradients are relative to the normalized texture coordinates, so they need to be multiplied by the base level dimensions to get the correct gradients to use in the lod level formula. In the case of sampling integer cube maps, the derivatives of the texture coordinates on the cube map face need to be calculated based on the derivatives of the cube map direction vector components. Also includes fix for sampling integer cube maps with explicit LOD. BUG=angleproject:1092 TEST=dEQP-GLES3.functional.shaders.texture_functions.*grad* Change-Id: Iadd358e713fa9695e755e98db8f368e8c512ac45 Reviewed-on: https://chromium-review.googlesource.com/337100 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho a1c917f2 2016-04-06T13:50:03 Suppress samplers in structs test failures on Intel OpenGL Some of the tests made to verify D3D implementation of samplers in structs are failing on Intel's OpenGL drivers, so suppress the failures. Since the test was crashing in shader program setup, shader program setup needs to be moved out of the SetUp() function of the texture tests. BUG=600758 TEST=angle_end2end_tests Change-Id: I1b6e788d900425e914572d2a3d7ef1fc43146f50 Reviewed-on: https://chromium-review.googlesource.com/337500 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho d4102f09 2016-01-22T14:54:04 Refactor HLSL texture coordinate output to prepare for wrap modes Wrap modes for integer textures need to be implemented in shaders in HLSL. This requires more complex transformations on the texture coordinates, so store the texture coordinate code for each texture coordinate in a string variable. BUG=angleproject:1244 TEST=dEQP-GLES3.functional.shaders.texture_functions.* (no regression), dEQP-GLES3.functional.texture.units.* (no regression) Change-Id: Iadd9617a7f906aa1d56dabfba6639f932152e6f1 Reviewed-on: https://chromium-review.googlesource.com/336637 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Ian Ewell 54f8746e 2016-03-10T13:47:21 Add initial support for various stream extensions. Add entry points and validation for various egl stream extensions including EGL_KHR_stream_consumer_gltexture and EGL_NV_stream_consumer_gltexture_yuv and NV_EGL_stream_consumer_external. The extensions functionality is not yet implemented and the extension strings are thus not exposed yet. BUG=angleproject:1332 Change-Id: I115d872557db38d8dd94cc367038668406719109 Reviewed-on: https://chromium-review.googlesource.com/332026 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Ian Ewell <ewell@google.com>
Ian Ewell ec2c0c5e 2016-04-05T13:46:26 Update internal AttributeMap type to EGLAttrib. Newer EGL functions use EGLAttrib to pass in attributes, which can be either 32-bit or 64-bit depending on the system while the old attributes are passed in as EGLints, which are usually 32-bits. To support these newer functions, AttributeMap now uses EGLAttrib internally instead of EGLint, and all the code using AttributeMap has been updated to cast properly. BUG=angleproject:1348 Change-Id: I7c4dd9ef23ea1b1741f3a565502fb5e26bf962d7 Reviewed-on: https://chromium-review.googlesource.com/337162 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Ian Ewell <ewell@google.com>
Olli Etuaho 4f66748d 2016-03-30T15:56:35 Fix buffer mapping validation and refactor entry points Checks for extension support are added to GetBufferPointervOES, mapBufferOES, unmapBufferOES, mapBufferRangeEXT and flushMappedBufferRangeEXT. The GetBufferPointerv function now checks if state is queried from buffer object zero. The code is also refactored so that validation happens in separate validation functions and the implementations are in Context functions. BUG=angleproject:1101 TEST=dEQP-GLES3.functional.negative_api.state.get_buffer_pointerv dEQP-GLES3.functional.*buffer*map* (no regression) Change-Id: I0f439abd12c92c51324f2e5a31bf621f61534306 Reviewed-on: https://chromium-review.googlesource.com/336164 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho 9696316d 2016-03-21T11:54:33 Support ESSL structs containing samplers on D3D Since HLSL can't natively handle samplers in structs, samplers need to be extracted out of structs into separate variables in the translated shader code. In HLSL 4.1, samplers that were in structs go into the normal sampler arrays and are identified by index constants. In other HLSL versions, samplers that were in structs are translated as uniform variables. These transformations are done inside the HLSL output classes, not as tree transformations. This helps to keep the uniform API provided by the shader translator intact. Wherever a struct containing samplers is passed into a user-defined function, the translated HLSL code passes the separate sampler variables alongside a struct where the samplers have been removed. The D3D backend in libANGLE queries the uniform registers of any samplers that were in uniform structs, and adds them to the register maps, so that correct sampler state gets assigned to them. The extracted sampler variables are prefixed with "angle_" instead of the usual "_" to prevent any name conflicts between them and regular variables. BUG=angleproject:504 TEST=angle_end2end_tests, dEQP-GLES*.functional.shaders.struct.uniform.* (all pass), dEQP-GLES*.functional.uniform_api.* (most now pass) Change-Id: Ib79cba2fa0ff8257a973d70dfd917a64f0ca1efb Reviewed-on: https://chromium-review.googlesource.com/333743 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho f0fee07a 2016-03-30T15:11:58 Fix ProgramParameteri validation dEQP tests suggest that passing a value other than GL_FALSE or GL_TRUE to ProgramParameteri generates INVALID_VALUE. The code is also refactored so that the implementation of ProgramParameteri is in the Context object. BUG=angleproject:1101 TEST=dEQP-GLES3.functional.negative_api.shader.program_parameteri Change-Id: I432d19fb574e58a7e0059189ab5b1863de029cdc Reviewed-on: https://chromium-review.googlesource.com/336163 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Frank Henigman 0c0d8006 2016-04-01T18:21:06 Revert "Gyp build support for Chrome OS." http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_ng/builds/189745 ../../third_party/angle/src/libANGLE/renderer/gl/glx/DisplayGLX.cpp:87:27: error: assigning to 'Display *' (aka '_XDisplay *') from incompatible type 'EGLNativeDisplayType' (aka 'long') mXDisplay = display->getNativeDisplayId(); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../third_party/angle/src/libANGLE/renderer/gl/glx/DisplayGLX.cpp:93:19: error: comparison between pointer and integer ('Display *' (aka '_XDisplay *') and 'EGLNativeDisplayType' (aka 'long')) if (mXDisplay == EGL_DEFAULT_DISPLAY) ~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~ TBR=kbr@chromium.org TBR=jmadill@chromium.org BUG=angleproject:1297 This reverts commit b5aa26bda986d7f367ed4c33e50e931e9620abe9. Change-Id: Icf3bd84df4493e66e78f8351b1a3879893ae9d0e Reviewed-on: https://chromium-review.googlesource.com/336849 Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 3477f3a6 2016-03-29T17:15:29 Re-land "D3D11: Implement dirty bits for VertexArray11."" Translated attributes are now stored in the VertexArray11 in a cache, and only updated when dirty bits change. Currently dynamic attributes must be re-translated every call, so these are stored in a list and processed repeatedly. This skips doing a lot of the VertexDataManager work for vertex attributes that don't change between draw calls. Current value attributes, which correspond to disabled attributes that the program will pulls vertex data from, are owned by the Context, so these need to be handled outside of the VertexArray11. Further changes will be necessary to reduce the redundant work we do in the InputLayoutCache. We shouldn't need to re-check the cache if nothing relevant changed. This give about a 23% performance improvement on the draw call benchmark on my machine. Re-land with a fix for the start vertex offset. BUG=angleproject:1327 Change-Id: Ic23e48fb18ed7f29c1999914a2f799ac04aa03e9 Reviewed-on: https://chromium-review.googlesource.com/334225 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang 04c8cc2e 2016-03-31T17:18:58 Mark mRenderer as unused in Stream11. BUG=angleproject:1332 Change-Id: I122f1b079e6d507423719df4576d7460e058f4b2 Reviewed-on: https://chromium-review.googlesource.com/336696 Reviewed-by: Geoff Lang <geofflang@chromium.org>
Ian Ewell 701b74b0 2016-03-02T15:26:39 Add support for EGL_KHR_stream. EGL_KHR_stream is now implemented. Since the extension does not come with any producers or consumers, it does not have much functionality and the implementation is therefore very simple (validation layers and a new object to store some attributes). This however add the groundwork to add the appropriate consumer and producer extensions to stream D3D NV12 textures directly into ANGLE which will significantly improve video performance on Chromium on D3D-based platforms. BUG=angleproject:1332 Change-Id: Ie240c73869f5098d1215cc5e27aa5decd06c3ed1 Reviewed-on: https://chromium-review.googlesource.com/330003 Commit-Queue: Ian Ewell <ewell@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Frank Henigman bb51c35c 2016-03-24T16:27:37 Insert slash when concatenating paths. BUG=angleproject:1343 Change-Id: I04180135dcd3aac2d40dc3f6d32b1aad362c69d1 Reviewed-on: https://chromium-review.googlesource.com/334920 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
Corentin Wallez b076adde 2016-01-11T16:45:46 Implement gl_VertexID BUG=angleproject:1217 Change-Id: Ibb9423d7de4966bce231734925a804b6340b5059 Reviewed-on: https://chromium-review.googlesource.com/321420 Reviewed-by: Jamie Madill <jmadill@chromium.org>
Olli Etuaho 37477918 2016-03-30T14:54:40 Fix samplerParameter validation Refactor the validation out from the API and into a separate Validate function. Also check the sampler parameter first to match dEQP expectations. BUG=angleproject:1101 TEST=dEQP-GLES3.functional.negative_api.shader.sampler* (all pass) Change-Id: I5f4072d9e52d37f741bd4c90f1bffe13371af3f5 Reviewed-on: https://chromium-review.googlesource.com/336162 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Corentin Wallez 9e3c615e 2016-03-29T21:58:33 Suppress end2end failures for the new Linux Intel bot. Since this is a new bot, we should make it green ASAP so we can catch any new regressions. BUG=angleproject:1346 Change-Id: I2c1288b8115a9d7980d5a3f37753b35cbb837486 Reviewed-on: https://chromium-review.googlesource.com/336050 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Jamie Madill da123308 2016-03-29T17:00:48 Add ANGLE_TRY macros to reduce boilerplate with gl/egl Errors. The macros don't need to disambiguate between GL/EGL. Also make helpers to deal with ErrorOrResult. BUG=angleproject:1310 BUG=angleproject:1327 Change-Id: I8041c4b17a859fe1f236bca3ad266453d67a8fd4 Reviewed-on: https://chromium-review.googlesource.com/335826 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Bruce Dawson e2fcf5c3 2016-03-30T11:27:12 Fix C4434 warnings about 32-bit shift assigned to 64-bits VS 2015 has a new or louder warning about 32-bit shifts that are then assigned to a 64-bit target. This code triggers it: int64_t size = 1 << shift_amount; Because the '1' being shifted is a 32-bit int the result of the shift will be a 32-bit result, so assigning it to a 64-bit variable is just misleading. In other cases the destination is a size_t which means that the warning only shows up on 64-bit builds. However in this case the size_t was later cast to a 32-bit type, so the warnings can be suppressed by selecting more natural types and *deleting* some casts. The two warnings were: C4334: '<<': result of 32-bit shift implicitly converted to 64 bits third_party\angle\src\tests\gl_tests\framebufferrendermipmaptest.cpp(90) third_party\angle\src\tests\gl_tests\framebufferrendermipmaptest.cpp(156) BUG=593448 Change-Id: Ice9f67096b155fbb5fa3247ad04ac41acffa36a5 Reviewed-on: https://chromium-review.googlesource.com/336332 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 7d712e7d 2016-03-29T21:54:33 Re-land "Clean up Buffer11." This cleans up some messy stuff from the emulated index buffers, which were caching variables that didn't need to be cached. Also add in missing error checks. This touches a lot of code. Re-land with a fix for clang-win build. BUG=angleproject:1327 BUG=angleproject:1310 Change-Id: I31ed81c7242782bef7c5f6cde2192552f7ff9403 Reviewed-on: https://chromium-review.googlesource.com/336052 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill e34deaa3 2016-03-30T01:50:40 Revert "Clean up Buffer11." Fails Clang-win because of std::forward ..\..\third_party\angle\src\libANGLE/Error.h(60,40): error: no matching function for call to 'forward' BUG=598944 BUG=angleproject:1327 BUG=angleproject:1310 This reverts commit 041d678b4764484386f934df927f00a5df48a351. Change-Id: I9fb0685cd01090b1faf8417ffa3c9b49eeb4510e Reviewed-on: https://chromium-review.googlesource.com/336040 Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 041d678b 2016-03-29T17:00:47 Clean up Buffer11. This cleans up some messy stuff from the emulated index buffers, which were caching variables that didn't need to be cached. Also add in missing error checks. This touches a lot of code. BUG=angleproject:1327 BUG=angleproject:1310 Change-Id: Icd722d57d9449388fbabc62c7ea37f0526a568ff Reviewed-on: https://chromium-review.googlesource.com/334731 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Frank Henigman 7d52be02 2016-03-24T14:40:58 Move -lrt where it belongs. Only deqp uses librt so the dependency belongs there, not in util.gyp, and the condition should be OS==linux, not use_x11. This lets things work on Chrome OS. BUG=angleproject:1297 Change-Id: If397da5463b9c2d5217eb3b20841fa5a44bf56a3 Reviewed-on: https://chromium-review.googlesource.com/334813 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
Jamie Madill 7e2ba9ee 2016-03-29T15:22:01 Fix warning introduced in "Program::getUniformInternal: return only one array element" The warning does not seem to occur on the Chromium bots, but shows when compiling ANGLE standalone. BUG=595836 Change-Id: I3c22bbea263223f9e92f82229817e9e9894a46ad Reviewed-on: https://chromium-review.googlesource.com/335576 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Olli Etuaho c3e55a43 2016-03-09T16:29:18 Validate program changes wrt transform feedback UseProgram can't be called while transform feedback is active and unpaused. Validate this by checking the presence of active transform feedback in UseProgram. LinkProgram or ProgramBinary can't be called while transform feedback associated with the program is active. Validate this by going through all of the existing transform feedback objects when one of these functions is called and checking whether they are associated with the program being changed. A program association is added to gl::TransformFeedback to facilitate this. BeginTransformFeedback can't be used to unpause a transform feedback object, so code for that is removed. The validation of the entry points touched in this patch is refactored to follow the current convention of separate Validate* functions, though with LinkProgram following this convention fully isn't practical. This patch also makes sure that ANGLE doesn't invoke behavior that the GL spec doesn't specify if a program object associated with a paused transform feedback is deleted. Tests are edited so that they don't call UseProgram when it generates an error. BUG=angleproject:1101 TEST=dEQP-GLES3.functional.negative_api.shader.* (2 more tests pass), dEQP-GLES3.functional.transform_feedback.* (no regressions), angle_end2end_tests Change-Id: I2e5b3a027ced11249b762ec01a29fa41d2c0dd96 Reviewed-on: https://chromium-review.googlesource.com/332141 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Corentin Wallez 6596c465 2016-03-17T17:26:58 Program::getUniformInternal: return only one array element Reland with a compilation fix for GPU Builder, with a fix for UniformTest.BooleanArrayUniformStateQuery and better formatting. When getUniformInternal detected a mismatch between the glGetUniform type and the uniform type, it entered a code path where it wrongly wrote the whole array instead of a single element, causing a buffer overflow. Adds a regression test. BUG=595836 Change-Id: Ie860b87ad56046483650f457457116cc22bf3c0f Reviewed-on: https://chromium-review.googlesource.com/334448 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez cc068e93 2016-02-29T16:37:04 Add DisplayGL::getDriverVersion and implementation on Linux NVIDIA Some GPU driver bug workarounds should be active only for specific driver version ranges. This adds NVIDIA Linux driver detection using the XNVCtrl X11 extension. BUG=590870 Change-Id: I8cbf692a0c8a6da7473169f29d720bdc2d07663d Reviewed-on: https://chromium-review.googlesource.com/329637 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Jamie Madill bc4c4bc5 2016-03-23T21:04:43 Re-land "Validate that attrib offsets don't overflow buffers." During draw calls, we wouldn't add the current attrib offset to the required draw call size when checking attributes. This could lead to us producing warnings in the D3D11 runtime, and miss returning some errors. Re-land with a test data initialization fix, and with some extra tests merged from another CL. BUG=angleproject:1339 Change-Id: Ifd549c3b1f6871417dc1693cb3ec534414e92cfd Reviewed-on: https://chromium-review.googlesource.com/333723 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Olli Etuaho 71dfb369 2016-03-10T14:04:27 Add validation for DrawRangeElements end < start end < start must generate an INVALID_VALUE error. Before this patch INVALID_OPERATION was generated from the check which validated the actual index range against end and start in this case. BUG=angleproject:1101 TEST=dEQP-GLES3.functional.negative_api.vertex_array.* (few more subtests pass) Change-Id: Ida9c5a8bc9dc416f1955e9012e5715c0848a0307 Reviewed-on: https://chromium-review.googlesource.com/332143 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Frank Henigman b5aa26bd 2016-01-24T12:43:37 Gyp build support for Chrome OS. Don't hard code "chromeos" to zero. Fix incorrect assumptions that X11 would always be used on linux. Introduce "angle_use_drm" as the Chrome OS alternative to "angle_use_x11." Define USE_OZONE for Chrome OS. Allow overriding pkg-config. BUG=angleproject:1297 Change-Id: Ie85b5c37f39170e0d11f8fc1bb70c175db6ee334 Reviewed-on: https://chromium-review.googlesource.com/323610 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
Frank Henigman a3d333c2 2016-03-22T22:09:14 Don't enable/disable sRGB on GLES. glEnable/glDisable GL_FRAMEBUFFER_SRGB isn't meaningful on GLES. BUG=angleproject:1300 Change-Id: I0afd697ed9770e2eb1cdcc851884b90de1a4583c Reviewed-on: https://chromium-review.googlesource.com/334490 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
Corentin Wallez 5051eee5 2016-03-23T01:35:01 Revert "Program::getUniformInternal: return only one array element" It breaks compilation on GPU Builder This reverts commit 3ea54ba890f25fcce9213d8ab7c7f8a9fdf10cad. Change-Id: Ie18f876b1db353d75cbd5a612f0a433cfc552ef2 Reviewed-on: https://chromium-review.googlesource.com/334405 Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 3ea54ba8 2016-03-17T17:26:58 Program::getUniformInternal: return only one array element When getUniformInternal detected a mismatch between the glGetUniform type and the uniform type, it entered a code path where it wrongly wrote the whole array instead of a single element, causing a buffer overflow. Adds a regression test. BUG=595836 Change-Id: Id7372faece276d28363a30bf3183497d97357c76 Reviewed-on: https://chromium-review.googlesource.com/333771 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Olli Etuaho 1a4523f3 2016-03-18T15:33:55 Avoid copying of texture format info structures Use const pointers to the statically allocated structures instead of copying them in TextureStorage11. This avoids the cost of copying and saves a little bit of memory. BUG=angleproject:1244 TEST=angle_end2end_tests Change-Id: Ib59fddd68ba9bc53e491d55683416c0661f26e0e Reviewed-on: https://chromium-review.googlesource.com/333930 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Geoff Lang 90a96efc 2016-01-27T14:53:36 Allow BufferGL to function without being able to map buffers for read. Reading back buffer data is required for index range validation but without glMapBufferRange it is not possible to read back buffer data on OpenGL ES. To work around this, keep a shadow copy of the buffer data when this function is not available. BUG=angleproject:1145 Change-Id: I8e9b3b174574316d3af0022bd29c7d9c96d168c3 Reviewed-on: https://chromium-review.googlesource.com/324092 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Olli Etuaho 356f5165 2016-03-18T14:19:41 Add a texture data fill helper function to tests Several tests need to initialize arrays of RGBA texture data. Add a helper function for this to reduce duplication and to make the code more readable. BUG=angleproject:596 TEST=angle_end2end_tests Change-Id: Id4a35b34a8fad25c2dc263ad8635dd43355a4f17 Reviewed-on: https://chromium-review.googlesource.com/333911 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho 41997e76 2016-03-10T13:38:39 Improve validation of Gen/Delete calls Add checks for negative count to GenTransformFeedbacks and DeleteTransformFeedbacks, and check for active transform feedbacks in DeleteTransformFeedbacks. Unify validation and error messages of all other Gen/Delete calls. BUG=angleproject:1101 TEST=dEQP-GLES3.functional.negative_api.* (two more tests pass) Change-Id: I128063fab3db27a25e282a10c916c53646d68b9c Reviewed-on: https://chromium-review.googlesource.com/332142 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Jacek Caban f26ada3b 2016-03-16T18:05:48 Minor mingw cross compilation fix. Change-Id: I380fa56e9f65e5982e77d2b0cd5af70777cc24be Reviewed-on: https://chromium-review.googlesource.com/332951 Reviewed-by: Geoff Lang <geofflang@chromium.org>
Corentin Wallez 00f394ec 2016-03-16T12:09:11 Revert Dirty bits for VertexArray11 This is a combination of two reverts: Revert "D3D11: Remove unused mRenderer from VertexArray11." Revert "D3D11: Implement dirty bits for VertexArray11." Reverting only the first commit would trigger warnings on the Windows clang bot. BUG=594509 BUG=angleproject:1327 This reverts commit fc4712b5ed270436f2993bfda9e916d4f92684a4. This reverts commit 7d8585b802b7eb741b380bd0d05769281d9507c9. Change-Id: I612dbba0816d6144f71ce815701c13a798585bc7 Reviewed-on: https://chromium-review.googlesource.com/332989 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Olli Etuaho a0fc18d9 2016-02-29T11:17:16 Fix D3D11 DXGI format info tables - Treat red/green views into depth/stencil formats as being red/green. - Sort all AddDXGIFormat calls in a similar way and remove duplicate AddDXGIFormat calls. - Add info on typeless formats. These changes are needed to make it possible to change integer texture DXGI formats. Native mipmap generation support will still be determined by querying the DXGI format info table with the texture storage format, so the TYPELESS formats will need entries there. The changes to format info used for depth/stencil formats will not affect existing uses of GetDXGIFormatInfo: - In Clear11.cpp, info is queried for rtvFormat and dsvFormat. Info for possible values of rtvFormat and dsvFormat is not changed. - In Renderer11::blitRenderbufferRect, info is queried for rtvFormat and dsvFormat. - In Renderer11::packPixels, GetDXGIFormaInfo is used to get a fast-copy function. The function only exists for conversion from BGRA to RGBA, so the changes do not affect this. - In Renderer11::getVertexComponentType, the component type is queried for vertex formats. The formats that might be queried here are SINT, SNORM, UINT, UNORM, or FLOAT formats with regular RGBA fields. Info is not changed for these. - In TextureStorage11_Cube::createSRV, the SRV or blitSRV format is queried for whether it has integer on unsigned integer channels. This will not be affected by the changes done to the format table. This change does not enable native mipmap generation for any new formats to avoid any possible regressions. BUG=angleproject:1244 TEST=angle_end2end_tests, dEQP-GLES3.functional.texture.mipmap.* (no regressions), dEQP-GLES3.functional.fbo.* (no regressions) Change-Id: Ic5ed731ddf153ae97bce631b1634347f8d9ae75c Reviewed-on: https://chromium-review.googlesource.com/329690 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Jamie Madill 022315de 2016-03-13T08:18:03 D3D: Add perf test for dynamic buffer promotion. Drawing with a DYNAMIC usage array or element array buffer should eventually lead to internally switching to a static usage, if the app doesn't modify the data very often. This perf test simply renders a bunch of random indexed triangles where both buffers are specified as DYNAMIC. It should perform just as well as the static usage after a warm-up period. BUG=angleproject:1334 Change-Id: Ibe432d2122feaefc82d3c11cdf227f93ada82eda Reviewed-on: https://chromium-review.googlesource.com/332578 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill acea5015 2016-03-14T17:34:00 Add dEQP-EGL test expectations. This will allow us to put these tests on the bots. BUG=angleproject:1340 Change-Id: Ic91423414c06210a97f9fbeeda4b7a0796c490f7 Reviewed-on: https://chromium-review.googlesource.com/332219 Reviewed-by: Geoff Lang <geofflang@chromium.org>
Olli Etuaho 7b591905 2016-02-26T14:37:57 D3D11: Use blit SRV format for blits blitSRVFormat stores the format that is used with ANGLE's internal blit shaders. By default, it is the same as the normal SRV format. For integer textures with a red channel, the RTV format is used instead. This makes it possible to change the storage format and the SRV format for the integer textures without affecting the blit format. The blitSRVFormat is used when doing blits in Blit11::copyTexture(). An exception is made for depth/stencil renderbuffer blit - in these cases it is okay to assume that the regular SRV format works for blitting. In the future the regular SRV format for integer textures will be changed to be different from their blit SRV format. TEST=angle_end2end_tests dEQP-GLES3.functional.fbo.blit.* (no regression) dEQP-GLES3.functional.texture.swizzle.* (no regression) BUG=angleproject:1244 Change-Id: Ie0e790e58ec054b64ef5983a09dbfc7754f269ca Reviewed-on: https://chromium-review.googlesource.com/327104 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho 84c9f593 2016-03-09T14:37:25 Fix framebuffer attachment enum validation In GLES 3.0, GL_COLOR_ATTACHMENTi enums run all the way up to i=31, and don't stop at i=15 which the validation was previously checking against. It's acceptable to use this new enum range also for EXT_draw_buffers, since an error will still be generated if an enum is outside the range of maximum supported attachments. Also, generate INVALID_ENUM when dEQP tests expect it to be generated for color attachment number that's outside the supported range. This is not in line with the published 3.0 spec, but that's just an oversight in the spec document. Also fix incorrect INVALID_VALUE error in the validation of renderbufferStorageMultisample to INVALID_OPERATION. BUG=angleproject:1101 TEST=dEQP-GLES3.functional.negative_api.buffer.* (all pass) Change-Id: Ib8cf92651d29ef8fe8da0ce4bfa456cbc4d48850 Reviewed-on: https://chromium-review.googlesource.com/332140 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Jamie Madill c979aabf 2016-03-12T00:26:44 Revert "Validate that attrib offsets don't overflow buffers." Seems to fail the Windows 8 bots in FL9_3 for some reason. https://build.chromium.org/p/chromium.gpu.fyi/builders/Win8%20Release%20%28NVIDIA%29/builds/20703 VertexAttributeTest.ShortNormalized_ES2_D3D11_9_3 VertexAttributeTest.ShortUnnormalized_ES2_D3D11_9_3 BUG=angleproject:1339 This reverts commit fb57c04c781df708a432f0e90acf2e431b7983bb. Change-Id: I4c678ff6b337e9a3e0a1fc809f96f6b89407ea33 Reviewed-on: https://chromium-review.googlesource.com/332442 Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill fb57c04c 2016-03-10T11:35:17 Validate that attrib offsets don't overflow buffers. During draw calls, we wouldn't add the current attrib offset to the required draw call size when checking attributes. This could lead to us producing warnings in the D3D11 runtime, and miss returning some errors. BUG=angleproject:1339 Change-Id: I03555be396df46f83d96dfb34fbcb145169625e8 Reviewed-on: https://chromium-review.googlesource.com/331807 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill fc4712b5 2016-03-10T11:31:25 D3D11: Remove unused mRenderer from VertexArray11. This was uncovered by the Clang-win bot, which uses a different set of warnings from MSVS. BUG=angleproject:1327 Change-Id: Id298fee2df92752b77bf6e2b93307fa5311cf1fc Reviewed-on: https://chromium-review.googlesource.com/332035 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Olli Etuaho 19d1dc99 2016-03-08T17:18:46 Add option to limit the number of function parameters Trying to compile user-defined functions that have thousands of parameters introduces some instability in native compilers, so it is better to reject shaders with large numbers of function parameters in ANGLE. The check is only enabled if the SH_LIMIT_EXPRESSION_COMPLEXITY flag is turned on. The default limit for the number of parameters is 1024, but it can also be configured. BUG=angleproject:1338 TEST=angle_unittests Change-Id: I5c9b7a4e97e67f36e77f969368336fa8fffba1c3 Reviewed-on: https://chromium-review.googlesource.com/331970 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Corentin Wallez bd382711 2016-03-09T10:38:26 dEQP GLES3 expectations: better suppression for flaky Linux trybot BUG=angleproject:1323 Change-Id: I6d559db0e72e8efc37b447d15244465835a6f310 Reviewed-on: https://chromium-review.googlesource.com/331398 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>