src/common/angleutils.h


Log

Author Commit Date CI Message
Brian Osman 63d82626 2017-01-06T14:05:18 Fix preprocessor typo for enabling Windows Runtime Library BUG=angleproject:530 Change-Id: Id93bd4f3f82bc0a6a0cbe4b55bc310d11266a2bd Reviewed-on: https://chromium-review.googlesource.com/425938 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 47c0e048 2016-11-30T13:44:45 Use ComPtr references for D3D objects. This is an work-in-progress CL to prototype using ComPtr. It also has a new design for internal errors that doesn't use FormatString, preferring a stream-based approach. One thing to be aware of is that the address operator does not behave as expected with ComPtr - we should use ::AddressOf. BUG=angleproject:530 BUG=angleproject:1644 Change-Id: If5643e9e5726fd9aa5cbd422fca12ae169eb5b1f Reviewed-on: https://chromium-review.googlesource.com/415027 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 054f7ed0 2016-09-20T17:15:59 preprocessor: Miscellaneous cleanups - Use full header paths in includes - Use ASSERT instead of assert - Use angle::NonCopyable instead of PP_DISALLOW_COPY_AND_ASSIGN - Use range-for in a couple places - Remove pp_utils.h BUG=angleproject:1522 Change-Id: If107fef89e8465bca65cf664926d1051c5d1e232 Reviewed-on: https://chromium-review.googlesource.com/387212 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 78a9c733 2016-07-15T11:22:43 D3D11: Implement multisampled stencil resolve. This implements a fairly slow path with readback for stencil blits, and depth/stencil resolve. In a subsequent patch I'll implement the depth blits. BUG=angleproject:1246 Change-Id: I04151d1f49ca404d858172dff8286608eae29864 Reviewed-on: https://chromium-review.googlesource.com/359955 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Sami Väisänen 46eaa946 2016-06-29T10:26:37 Support CHROMIUM_path_rendering fragment operations This brings two new APIs, BindFragmentInputLocation and ProgramPathFragmentInputGen that together dictate how the fragment shader varyings are used. BUG=angleproject:1382 Change-Id: I4b52fd8a3555235a73aecd4f3dba2d500789cbb0 Reviewed-on: https://chromium-review.googlesource.com/357071 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Sami Väisänen <svaisanen@nvidia.com> Commit-Queue: Sami Väisänen <svaisanen@nvidia.com>
Jamie Madill ec0b580d 2016-07-04T13:11:59 Re-land "D3D11: Fix readback of BGRA-backed formats." For some BGRA-backed formats (RGBA4, R5G6B5, RGB5A1), our ReadPixels implementation wasn't aware the BGRA format didn't exactly match the RGBA format. For these it would do the 'fast path' memcpy method, when it should stop and do the slow pixel-by-pixel packing method. Fixes conformance2/reading/read-pixels-from-fbo-test.html. Reland: fix empty format info that was causing us to only see the first pixel in the FBO in a ReadPixels call. Also fix bugs in the unorm 16-bit format readback code, and add ASSERTs to catch bugs in subsequent new formats. BUG=angleproject:1407 BUG=chromium:616176 Change-Id: I9fd55b9e1dd6a306eb4db195d775c02a1eb1f93f Reviewed-on: https://chromium-review.googlesource.com/357132 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
John Bauman 73d417ed 2016-06-17T00:49:40 Revert "D3D11: Fix readback of BGRA-backed formats." This reverts commit 230d95616d1309914a6703e27a797a440806dd02. This broke GLES2ConformTest.GL2Tests_framebuffer_objects_input_run on the NVIDIA Win8 Chromium bots. BUG=chromium:620908 Change-Id: Idf6e3eb51483ff0b6bc758b95c5910863ddfc25f Reviewed-on: https://chromium-review.googlesource.com/353394 Reviewed-by: John Bauman <jbauman@chromium.org> Commit-Queue: John Bauman <jbauman@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 230d9561 2016-06-15T18:11:52 D3D11: Fix readback of BGRA-backed formats. For some BGRA-backed formats (RGBA4, R5G6B5, RGB5A1), our ReadPixels implementation wasn't aware the BGRA format didn't exactly match the RGBA format. For these it would do the 'fast path' memcpy method, when it should stop and do the slow pixel-by-pixel packing method. BUG=angleproject:1407 BUG=chromium:616176 Change-Id: Ie24758513af6f9ef87f0aa503135456c96493701 Reviewed-on: https://chromium-review.googlesource.com/352252 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill e2e406c3 2016-06-02T13:04:10 Add base::numerics for safe math and conversions. This replaces are "IsUnsignedXXXSafe" family of methods. Also add overflow checks to unpack block sizes. BUG=angleproject:1397 Change-Id: Ib47be149b0486c70f795b0d0f8899441faac9340 Reviewed-on: https://chromium-review.googlesource.com/348062 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill c9bdeff4 2016-02-08T12:36:55 D3D11: Refactor RenderTarget apply into StateManager11. This is a refactoring patch only, and doesn't change the behaviour. The intent is to make it easy to turn on the Framebuffer dirty bits in a subsequent patch, once we can cleanly handle textures and renderbuffers getting recreated. BUG=angleproject:1260 Change-Id: Iaa5cfe222b020724e088eee5f1ae909b6f981a08 Reviewed-on: https://chromium-review.googlesource.com/325423 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 4e31ad55 2015-10-29T10:32:57 D3D11: Add dynamic geometry shaders. The geometry shader we want will depend on our current draw mode, and if we're using flat shading in the shader. Without flat shading, we'll still be using them only for point sprites, but for other primitive types with flat shading enabled, we'll be using them to correct the provoking vertex order with D3D11. Note: no new features in this CL, those are turned on in follow-ups. BUG=angleproject:754 Change-Id: Iabf13ffd582f5a7200ee0df5aa9c3671aa7b6ed4 Reviewed-on: https://chromium-review.googlesource.com/309154 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill f0d10f89 2015-03-31T12:56:52 Replace non-copyable macro with a helper class. This class provides a simpler scheme for blocking default copy and assignment operators. It also reduces the amount of code needed since it's inherited to child classes. This also fixes the conflict between our macro and the same-named macro in Chromium code. BUG=angleproject:956 Change-Id: If0dc72aa3f63fbc7b8fa34907418821c64c39e2f Reviewed-on: https://chromium-review.googlesource.com/263257 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org>
Geoff Lang 7825f619 2014-11-26T16:19:41 Update ANGLE_platform_angle_d3d to use a device type enum instead of WARP bool. BUG=angle:490 Change-Id: I1555e7f09b23138753e52ddf720d088587f7cadb Reviewed-on: https://chromium-review.googlesource.com/232104 Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 9d294c33 2015-01-30T19:58:39 Revert "Compile the D3D11 VS and PS on separate threads at GL link time" Failing compile on Chromium bots: FAILED: ninja -t msvc -e environment.x86 -- C:\b\build\goma/gomacc "C:\b\depot_tools\win_toolchain\vs2013_files\VC\bin\amd64_x86\cl.exe" /nologo /showIncludes /FC @obj\third_party\angle\src\libANGLE\renderer\d3d\libANGLE.ProgramD3D.obj.rsp /c ..\..\third_party\angle\src\libANGLE\renderer\d3d\ProgramD3D.cpp /Foobj\third_party\angle\src\libANGLE\renderer\d3d\libANGLE.ProgramD3D.obj /Fdobj\third_party\angle\src\libANGLE.cc.pdb c:\b\depot_tools\win_toolchain\vs2013_files\vc\include\concrt.h(4774) : error C3861: '__uncaught_exception': identifier not found ninja: build stopped: subcommand failed. This reverts commit 6d51f2629a8118f7afd450ea832c93143a84c330. Change-Id: Iebb2843dfbc3795290fbb33e1a111ddad59c3126 Reviewed-on: https://chromium-review.googlesource.com/244792 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Austin Kinross 6d51f262 2015-01-26T16:34:48 Compile the D3D11 VS and PS on separate threads at GL link time BUG=angle:900 Change-Id: Iad5dbbcc676e2a2b6dfc3d7bc6ab5957154de33e Reviewed-on: https://chromium-review.googlesource.com/240490 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Austin Kinross <aukinros@microsoft.com>
Jamie Madill 55573e13 2014-11-25T11:21:13 Use cross-platform enum for Vendor ID. BUG=angle:795 Change-Id: Ibe9bbb79b92730ba80ca7275528c8b61d5d44c59 Reviewed-on: https://chromium-review.googlesource.com/228914 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang e371f1d7 2014-11-21T11:25:22 Update the DISALLOW_COPY_AND_ASSIGN macro to use c++ operator deletion. Also remove the TSymbol copy constructor which is not used. BUG=angle:836 Change-Id: I4f35f554c90d01dc2132d244a1974d9a8dc89bbd Reviewed-on: https://chromium-review.googlesource.com/231231 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang df8fafef 2014-11-11T11:11:33 Fix compilation failure with Visual Studio 14. Change-Id: If009cec928318c90a2f6d445ea8b4b06c4e45209 Reviewed-on: https://chromium-review.googlesource.com/228919 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Austin Kinross 922a9fb3 2014-10-21T14:26:33 Use D3D11 Debug Annotations when D3D9 is unavailable Change-Id: I37ac5fe7f0b2fe5e71bd7f0afca55e9894f3463c Reviewed-on: https://chromium-review.googlesource.com/224512 Tested-by: Austin Kinross <aukinros@microsoft.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tibor den Ouden 2221f47b 2014-10-22T15:07:05 Compiler flags and macros added to shader debug report The list of D3D compiler flags and macros used if compilation of a shader succeeds is added to the shader debug output. BUG=angle:751 Change-Id: Ie84a586010787fe8d9c0dedfe9208f881058a588 Reviewed-on: https://chromium-review.googlesource.com/224970 Tested-by: Tibor Ouden, den <tibordenouden@gmail.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Shannon Woods 8e7d7a30 2014-09-02T17:09:08 Fix use of references with va_start BUG=angle:736 va_start behavior is undefined if the second parameter is a function, array, or reference type. clang produces a warning for this, while MSVC does not. Change-Id: I0bc2805e312e3542aac816f10a257e2f1cfad128 Reviewed-on: https://chromium-review.googlesource.com/216010 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Nico Weber <thakis@chromium.org> Tested-by: Nico Weber <thakis@chromium.org>
Jamie Madill 33ea2f97 2014-08-29T15:15:01 Added BufferSubData benchmark. BUG=angle:705 Change-Id: I65d557f35e4c9f1d94853a775330a92b7d428847 Reviewed-on: https://chromium-review.googlesource.com/213810 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang da5777cf 2014-07-11T09:52:58 Create an Error object to represent GL errors. BUG=angle:520 Change-Id: I1a54e6f308b5b0f310c725a7771af737a77ecd42 Reviewed-on: https://chromium-review.googlesource.com/209619 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang bfdea66b 2014-07-23T14:16:32 Remove try-catch blocks from entry points. BUG=angle:700 Change-Id: I036901c397053a75677923304d7e1ed697c82aa2 Reviewed-on: https://chromium-review.googlesource.com/209570 Reviewed-by: <ehsan@mozilla.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 93455ebe 2014-07-08T15:22:50 Add missing limits include to angleutils.h This missing include was breaking the build on Linux. BUG=angle:692 Change-Id: Id502f477d6e3373519b011e75c144782e9101944 Reviewed-on: https://chromium-review.googlesource.com/206633 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 53cb14dc 2014-07-08T15:02:35 Share ArrayString and Str helper methods. Placing these string helper methods allows us to re-use them in the relevant place of the shader translator. BUG=angle:466 Change-Id: Idd638542027d3b1035bc79fc941e80bf436c82af Reviewed-on: https://chromium-review.googlesource.com/206567 Reviewed-by: Nicolas Capens <capn@chromium.org> Reviewed-by: Zhenyao Mo <zmo@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Ehsan Akhgari 10530c34 2014-07-02T20:37:53 Add ANGLE_NO_EXCEPTIONS macro This macro allows us to hide angle's usage of try/catch so that we can properly hide them from compilers that do not support exceptions properly (such as clang-cl and gcc/clang with -fno-exceptions). Change-Id: I75f466a5322e5840e007711ea851f444bd6ca299 Reviewed-on: https://chromium-review.googlesource.com/206562 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: <ehsan@mozilla.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shannon Woods 3dc8020a 2014-06-16T13:29:52 Fix dependent typename build error on non-MSVC compilers BUG=angle:677 Change-Id: Ic0d257ef41e8c80baeddd664eb6c2cc5db94ee43 Reviewed-on: https://chromium-review.googlesource.com/203428 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Shannon Woods <shannonwoods@chromium.org>
Geoff Lang 04fb89ad 2014-06-09T15:05:36 Generate pixel shader output to match the bound framebuffer. Only generate pixel shader output variables for render targets that are currently bound. Fixes some performance issues with D3D10 cards that were slow to discard unused outputs. Fixed memory leaks in ProgramBinary by refactoring the freeing of the current state into a reset function. BUG=angle:670 Change-Id: I40f83e15724fb9a1a9ae61363a056999f1fa26d2 Reviewed-on: https://chromium-review.googlesource.com/202977 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang cec3590a 2014-04-16T10:52:36 Use a Caps structure to store extension and texture format support. Removes support for fallbacks in D3D9 texture formats. The fallback formats did not work properly anyways. BUG=angle:658 Change-Id: Idfa5183bf71fd8ebf4608f940f9d93177b9eff08 Reviewed-on: https://chromium-review.googlesource.com/200813 Tested-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 44fa7594 2014-05-30T11:50:07 Refactor platform related functionality into platform.h and tls.h. Since libGLESv2 and libEGL will eventually be cross platform, it will be useful to have platform defines and TLS functions that work everywhere. BUG=angle:664 Change-Id: Ia357925a0992d82e8b446d88d32a1984d319e6e8 Reviewed-on: https://chromium-review.googlesource.com/202133 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill d3f0f1ec 2013-09-20T13:31:08 Expose and generalize Clear11's CompareStates function, and add methods for equality test and initialization. TRAC #23841 Signed-off-by: Geoff Lang Signed-off-by: Shannon Woods
Jamie Madill 28167c62 2013-08-30T13:21:10 Add support for struct varyings, and more robust varying link validation. TRAC #23749 Signed-off-by: Geoff Lang Signed-off-by: Nicolas Capens
Geoff Lang ea228635 2013-07-30T15:17:12 Use SafeRelease and SafeDelete to make sure released objects are NULL and will cause proper errors if referenced again. TRAC #23617 Signed-off-by: Nicolas Capens Signed-off-by: Shannon Woods Author: Geoff Lang
Jamie Madill 0fda9868 2013-07-19T16:36:55 Added Context::getInteger64v for 64-bit integer state queries. TRAC #23082 Signed-off-by: Geoff Lang Signed-off-by: Shannon Woods Authored-by: Jamie Madill
Jamie Madill f386bf76 2013-07-08T14:02:41 Include stddef.h so NULL is defined. Review URL: https://codereview.appspot.com/10025043 git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@2422 736b8ea6-26fd-11df-bfd4-992fa37f6226 TRAC #23333 Authored-by: alokp@chromium.org Signed-off-by: Shannon Woods Signed-off-by Nicolas Capens Merged-by: Jamie Madill
shannon.woods%transgaming.com@gtempaccount.com 96224771 2013-04-13T03:30:18 Add helper functions to safely release Windows COM resources, and arrays of COM resources. TRAC #22656 Signed-off-by: Nicolas Capens Signed-off-by: Shannon Woods Author: Jamie Madill git-svn-id: https://angleproject.googlecode.com/svn/branches/es3proto@2076 736b8ea6-26fd-11df-bfd4-992fa37f6226
shannon.woods@transgaming.com 6d79257d 2013-02-28T23:07:25 Added a utility function for determining the size of an array. TRAC #22502 Signed-off-by: Jamie Madill Signed-off-by: Nicolas Capens Author: Geoff Lang git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1877 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com 106e1f7b 2012-10-31T18:38:36 Removes D3D types from the Config class TRAC #21819 Signed-off-by: Daniel Koch Author: Shannon Woods git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1347 736b8ea6-26fd-11df-bfd4-992fa37f6226
apatrick@chromium.org 85e4419f 2012-08-17T20:58:01 Only round back buffer to 64 pixels when vendor ID in Intel. This is actually to fix AMD / Intel switchable systems when using integrated Intel where the source rectangle to Present is not respected. Review URL: https://codereview.appspot.com/6459101 git-svn-id: https://angleproject.googlecode.com/svn/trunk@1254 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org 79fb1019 2012-04-26T21:07:39 Ugly hack to fix compile error on windows. VC++ does not support C99 and hence snprintf. BUG=308 Review URL: https://codereview.appspot.com/6120055 git-svn-id: https://angleproject.googlecode.com/svn/trunk@1057 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com bbf56f75 2010-04-20T18:52:13 Use directory qualified #include files Trac #11408 Signed-off-by: Andrew Lewycky Signed-off-by: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@165 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org ea0e1af4 2010-03-22T19:33:14 Minor reshuffling of directory structure in preparation of ESSL to GLSL compiler work. 1. Added include/GLSLANG which includes compiler API 2. Deleted src/include and moved the header files to the same directory as the corresponding source files 3. Modied include path to be relative to src/. I have only fixed paths for files I moved. We should fix it for all new files at least. It is much easier to see where an included file is coming from. I noticed that a few libGLESv2 source files include headers from libEGL project, which seems wrong. I think we should address this issue. Next step: move compiler source files to compiler/frontend and create two new projects compiler/glsl_backend and compiler/hlsl_backend. Review URL: http://codereview.appspot.com/662042 git-svn-id: https://angleproject.googlecode.com/svn/trunk@62 736b8ea6-26fd-11df-bfd4-992fa37f6226