Log

Author Commit Date CI Message
Jamie Madill 3be43be0 2016-03-09T20:05:08 Fix crash in IndexDataManagerPerfTest. Using a mock BufferFactory would sometimes leave us with a nullptr in the VertexBufferInterface class. This would lead to a null deref in the perf tests only. Fix this by adding a null check. BUG=593541 Change-Id: I98685a9990124f521cd26ed81a26aeb11aafaf0d Reviewed-on: https://chromium-review.googlesource.com/331768 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 4e25a0d6 2016-03-08T13:53:03 Use std::unordered_map in ResourceManager. The hashed query performs significantly faster than std::map. This improves performance in applications which use Bind* often. Also use the same scheme for the Context-managed resources. BUG=angleproject:1333 Change-Id: I8a1f25d80e060c62dab1f86005e1bc4df1c06dba Reviewed-on: https://chromium-review.googlesource.com/331387 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 0e49e6b5 2016-03-08T13:53:04 D3D: Fix static promotion of dynamic index data. The static promotion somehow slipped into the direct usage check, meaning we would never promote dynamic index data to static, even if unchanged for many frames. Fix this by putting the update back in the correct place. BUG=angleproject:1334 Change-Id: I90897fcd2f6a2b231ccef9f1fa044d276b238b56 Reviewed-on: https://chromium-review.googlesource.com/331388 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 3f01e6c2 2016-03-08T13:53:02 Return pointers from check*Allocation. This avoids the need to consult the resource maps twice per bind. It improves performance in applications which call Bind* often. BUG=angleproject:1333 Change-Id: I7b733cc89e50e24a2e38a2eb2dc7fd658d612e27 Reviewed-on: https://chromium-review.googlesource.com/331386 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Zhenyao Mo <zmo@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 7d8585b8 2016-03-09T15:53:12 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. BUG=angleproject:1327 Change-Id: I7fb944d32ea7e6c78b9e478406bdb7e10a7fc05b Reviewed-on: https://chromium-review.googlesource.com/330173 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Frank Henigman aa57aa4c 2016-01-27T00:02:13 Correct GLES depth 32 format. GL_OES_depth32 is required for DEPTH_COMPONENT32_OES render buffers. This stops Mesa from complaining when using GLES in the back end. BUG=angleproject:1301 Change-Id: I8c6ce6a5ce0cb5bf26157e3bb414f391a41d15c4 Reviewed-on: https://chromium-review.googlesource.com/331359 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
Jamie Madill b5abec33 2016-03-08T11:21:20 D3D11: Remove unused field in InputLayoutCache. The mCounter field became exposed as unused after it was initialied in the constructor initializer list. Previously this was hidden because it was initialized in the body of the constructor. BUG=angleproject:1327 Change-Id: I18d9aa8a377d234f4c161ace845edfb9fc7f226c Reviewed-on: https://chromium-review.googlesource.com/331385 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Olli Etuaho 7828c521 2016-02-26T14:05:12 D3D11: Check packPixels memcpy support based on ANGLEFormat Instead of querying DXGI format info to determine whether framebuffer data can be copied to packPixels target memory with memcpy, compare the internal format information from the ANGLE format to the packing format. This makes it possible to change some of the DXGI formats used for integer textures without breaking packPixels. This makes it possible to entirely remove the DXGI format to GL internal format mapping from the DXGI format info table. BUG=angleproject:1244 TEST=angle_end2end_tests, dEQP-GLES3.functional.fbo.* (no regressions), dEQP-GLES3.functional.pbo.* (no regressions), Change-Id: Id5ffd581349e7afe39872d69cb05381f3e78d352 Reviewed-on: https://chromium-review.googlesource.com/329214 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho 67946766 2016-03-08T15:43:55 Improve info log length checks Extend the info log length checks to shader_utils used by tests, and treat info log with length 1 as empty, since it can only include the null terminator. At least the Intel GL driver may generate "\0" as info log in some situations, for example when compiling a user-defined function with 50000 parameters. BUG=angleproject:1323 Change-Id: I00f2965539ec235cb949c80c2a9e1d063d32fa15 Reviewed-on: https://chromium-review.googlesource.com/331461 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Frank Henigman 9a7e8cab 2016-01-27T00:02:13 Disallow GLES BGRA render buffers. This stops Mesa from complaining when using GLES in the back end. BUG=angleproject:1301 Change-Id: I0b8cb78efea97c1ea0d21cd6b9f656e53b9b6cc2 Reviewed-on: https://chromium-review.googlesource.com/331395 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
Olli Etuaho 114d129d 2016-02-26T12:33:00 D3D11: Get color read function from ANGLE format This is done to make it possible to change some of the DXGI formats of integer textures without affecting their color read function associations. The packPixels function gets the ANGLE format from the texture helper, which now requires the ANGLE format to be passed in at the time of creation. BUG=angleproject:1244 TEST=angle_end2end_tests, dEQP-GLES3.functional.fbo.* (no regressions), dEQP-GLES3.functional.pbo.* (all pass) Change-Id: I368337cfe5f8c86ff3292009ccf29e9d01409a07 Reviewed-on: https://chromium-review.googlesource.com/329213 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Corentin Wallez 3b3657be 2016-03-07T18:37:22 FBConfigCompatibility.md: fix rendering with gittiles BUG= Change-Id: I17d691b1e0ebdc766e2d3cb8363ce1c2b1ba26cf Reviewed-on: https://chromium-review.googlesource.com/331362 Reviewed-by: Jamie Madill <jmadill@chromium.org>
Olli Etuaho be59c2fb 2016-03-07T11:32:34 Fix ambiguous function call issues in HLSL output D3D compiler can't resolve between these overloaded functions: float4 vec4(float2x2 x0); float4 vec4(float4 x0); Include the parameter types in the function name to disambiguate between overloaded user-defined functions and constructors, like this: float4 vec4_float2x2(float2x2 x0); float4 vec4_float4(float4 x0); This is only done for float2x2 and float4 parameters, other parameter types like float2x3 vs. float3x2 don't need this. BUG=angleproject:1099 BUG=angleproject:1030 TEST=angle_end2end_tests, dEQP-GLES3.functional.attribute_location.* (10 more tests pass), dEQP-GLES2.functional.attribute_location.* Change-Id: Ief047d41b0adbc238393c3c13cb29771cbb83d58 Reviewed-on: https://chromium-review.googlesource.com/329882 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho 2b3cc815 2016-03-04T13:57:51 Fix state query for DEPTH_STENCIL attachment properties Add missing negation to validate the existence of a DEPTH_STENCIL attachment correctly. BUG=angleproject:1101 TEST=dEQP-GLES3.functional.state_query.fbo.framebuffer_attachment_x_size_rbo, dEQP-GLES3.functional.negative_api.state.get_framebuffer_attachment_parameteriv Change-Id: I278875684fdff562d16faba9a7eca0aa83bf80e9 Reviewed-on: https://chromium-review.googlesource.com/329867 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Corentin Wallez f945dc8f 2016-03-07T16:22:11 Skip the dEQP GLES3 functional.ubo tests on Linux. We previously marked them as failing but they are causing a crash so we skip them until they are fixed. BUG=angleproject:1323 Change-Id: I717e402d56ea88ef93da50d10803d0a62aa58fdf Reviewed-on: https://chromium-review.googlesource.com/331281 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 8047c0d2 2016-03-07T13:02:12 D3D11: Clean up InputLayoutCache. This change does a couple things. First, it uses the 'active attribs' mask in the gl::Program to sort the translated attributes, instead of checking the translated attribute themselves. This means we don't have to consult the 'active' field of the translated attributes, which in turns means we don't have to update the active field in the attributes, which breaks the dependency of the attributes on the gl::Program. Second, use a dynamically sized array for storing the cached vertex attributes in the InputLayoutCache. This is nice because it means we don't have to store the size of the array separately. Also some other refactoring cleanups. Refactoring change only. BUG=angleproject:1327 Change-Id: Iab22de92840b30674b92eca72e450673ed9f6d6d Reviewed-on: https://chromium-review.googlesource.com/330172 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill e9e15349 2016-03-04T15:16:42 D3D11: Remove RTV and DSV cache vars from Renderer11. These were only referenced by the StateManager11. Instead of using these cache variables, ensure the StateManager11 marks the RT as dirty and apply the RenderTarget state. Also remove the RenderTarget setters from Renderer11, and don't unapply RTs after a one-time set operation. The StateManager11 should take care of updating the necessary changes itself. BUG=angleproject:1321 Change-Id: Idc8d22ea9e92ac8d07392ab10d067df6084403bb Reviewed-on: https://chromium-review.googlesource.com/330462 Reviewed-by: John Bauman <jbauman@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Olli Etuaho 4b66f055 2016-02-25T16:53:38 Make copyDepthStencil more robust to texture format table changes This will make it easier to verify changes to integer texture DXGI formats. Currently the DXGI format info table contains some values that wouldn't make sense after the integer formats are changed, such as R32_TYPELESS being recorded as a depth format, and we need to make sure no code relies on this kind of information to make changing the table safe. Includes cleaning up unused depth/stencil offset fields from DXGIFormatInfo. BUG=angleproject:1244 TEST=dEQP-GLES3.functional.fbo.blit.*depth* Change-Id: I0149f28e4c6f961af99ac2f5a656f3fbfe13aee6 Reviewed-on: https://chromium-review.googlesource.com/328964 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho 86821db3 2016-03-04T12:05:47 Add support for READ_BUFFER and SAMPLER_BINDING queries BUG=angleproject:1101 TEST=dEQP-GLES3.functional.state_query.integers.* (all pass) Change-Id: I3a70335eeaef39822700ff639443a59849ed53fa Reviewed-on: https://chromium-review.googlesource.com/329866 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho 586bc55c 2016-03-04T11:46:03 Return the correct count from getAttachedShaders The count should be the total amount of shader ids written. Before this patch the code used to write the amount of attached shaders to count regardless of the value of maxCount. BUG=angleproject:1101 TEST=dEQP-GLES3.functional.state_query.shader.* Change-Id: I5ae729748c7809f03fd496c927a76f60398d2b42 Reviewed-on: https://chromium-review.googlesource.com/329865 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill e18eb970 2016-03-04T15:46:59 D3D: Refactor VertexDataManager attribute storage. Instead of splitting attributes into 'active enabled' and 'active disabled', split them into static/dynamic/direct/current value, and handle each group invidually. This also will allow the dirty bits code to call in to the VertexDataManager separately for each type of necessary vertex data translation, and skip it entirely for direct buffer storage. Should be a refactoring patch only. BUG=angleproject:1327 Change-Id: I53cb5672054d99ae68e9aa2e5a3c046a002e360d Reviewed-on: https://chromium-review.googlesource.com/330171 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill e36b92d4 2016-03-04T15:46:58 D3D: Use a single D3D buffer per static vertex attribute. The current caching logic stores multiple static attributes in a single buffer if the attributes share a D3D buffer - sometimes. If a buffer is 'committed' (has been used in a draw) then we would make a new D3D buffer for the next set of static attributes. Instead use a simpler scheme of a single D3D buffer for each static attribute. Also change rx::VertexBuffer to a reference counted class. This simplifies the caching logic for static vertex buffers (translated attributes) considerably. We only need to release the buffers when the ref count is zero, and ensure we track the ref count correctly when bound to D3D. This leads the way towards using a simpler dirty bit scheme for intelligent state updates, and less overhead doing work with buffer state updates. BUG=angleproject:1327 Change-Id: I99461d50b9663024eaa654cd56b42a63f1416d08 Reviewed-on: https://chromium-review.googlesource.com/330170 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Ian Ewell c52a4026 2016-03-04T13:12:43 Update eglext.h to latest. The new header contains EGL_NV_stream_consumer_gltexture_yuv, which will be implemented in the future for video rendering purposes. BUG=angleproject:1332 Change-Id: Ia35ee7360b8f09703ad2800c641c67f0f243e927 Reviewed-on: https://chromium-review.googlesource.com/330278 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Ian Ewell <ewell@google.com>
Corentin Wallez 01ad6445 2016-03-03T13:53:45 Program/ShaderGL: handle empty info logs The GL driver can sometimes have an empty info log and return an info log length of 0. This would cause a vector to be initialized with a length of 0 just before it's .data() pointer was used, causing a segfault. BUG=angleproject:1323 Change-Id: Iaf9b569ec64a90c714a213562e427fb7cc8daa6b Reviewed-on: https://chromium-review.googlesource.com/330197 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Olli Etuaho 9cb1df4f 2016-02-25T16:16:41 D3D11: Get mip generation function from ANGLE format This is done to make it possible to change some of the DXGI formats of integer textures without affecting their mip generation function associations. BUG=angleproject:1244 TEST=angle_end2end_tests, dEQP-GLES3.functional.texture.mipmap.*generate* (all pass) Change-Id: Ie83dd0e1883e9d8e267fbd4bf54b1e466fb0b210 Reviewed-on: https://chromium-review.googlesource.com/328963 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho 99cdca03 2016-02-24T14:45:06 Remove getDXGIFormat() function from RenderTarget11 This query would return either the RTV format, the DSV format or the texture format depending on the render target. This made the code hard to understand. getDXGIFormat() calls are replaced by querying the ANGLE format, and explicitly choosing which associated DXGI format to query info for (RTV format or DSV format). This refactoring makes changing some format associations for integer texture formats easier in the future. BUG=angleproject:1244 TEST=angle_end2end_tests, dEQP-GLES3.functional.fbo.blit.* (no regressions) Change-Id: Ibe3c03fc6b7768af1a131d4df3909a1e20a71228 Reviewed-on: https://chromium-review.googlesource.com/329102 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho f706901e 2016-02-24T15:14:01 D3D11: Associate ANGLE formats with GL internal formats Add a corresponding GL internal format to ANGLE format set. This is one step on the way to removing the problematic DXGI format to GL format mapping. This will also make it possible to stop storing the DXGIFormat field in RenderTarget11. The DXGIFormat field in RenderTarget11 can currently carry either the DSV format, the RTV format or the texture storage format of the resource it is managing, which makes code using it hard to understand. Also fills in missing componentType for some compressed ANGLE formats in texture_format_data.json. BUG=angleproject:1244 TEST=angle_end2end_tests Change-Id: I87eedca8736aeface3fa6a0ec3c9d355cf006b24 Reviewed-on: https://chromium-review.googlesource.com/328961 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho 6ad07236 2016-03-03T17:15:49 Fix texture and sampler state queries Round MAX_LOD / MIN_LOD values correctly according to section 6.1.2 of GLES 3.0.4, and add code for COMPARE_MODE and COMPARE_FUNC. BUG=angleproject:1101 TEST=dEQP-GLES3.functional.state_query.texture.* (all pass), dEQP-GLES3.functional.state_query.sampler.* (all pass) Change-Id: I6043c308c23997513d5de70510a0267419dd1868 Reviewed-on: https://chromium-review.googlesource.com/330112 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho b1853096 2016-02-24T16:07:39 D3D11: Don't use DXGI to GL format map in copy functions The swizzle or copy shader needs to be chosen according to the component type of the source SRV. Before this patch, the component type was obtained by going through the mapping from the SRV DXGI formats to GL formats. This mapping is problematic, because it has entries that don't really make sense, like R16_UNORM and R16_TYPELESS formats being mapped to GL_DEPTH_COMPONENT16. This is an issue particularly because these formats will be used for integer RED textures in the future. For this reason the mapping should be removed. In the case addressed by this specific commit, rather than look up the component type of the SRV indirectly through the GL format table using the GL internal format that corresponds to the DXGI format, just use the component type of the DXGI format. The depth+stencil swizzle cases where the component type is not well defined are handled as a special case. BUG=angleproject:1244 TEST=angle_end2end_tests, dEQP-GLES3.functional.texture.swizzle.* (all pass), dEQP-GLES3.functional.fbo.blit.* (no regressions) Change-Id: I39fb8a14921b89d299e0077b3bea8b4e66ef218d Reviewed-on: https://chromium-review.googlesource.com/329103 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 713e4db7 2016-03-02T16:35:33 D3D11: Fix RGBA32_UNORM integer vertex attribs. This formats were mistakenly listed as having no conversion necessary in the vertex formats table. Fix is to mark them as CPU-converted. This bug would only occur for 'direct' storage attributes, not those that were dynamically streamed. BUG=angleproject:1331 Change-Id: Ifa51b47d75e2f5bc762a718587470950cf195cb4 Reviewed-on: https://chromium-review.googlesource.com/329999 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Jamie Madill bdec2f4e 2016-03-02T16:35:32 D3D11: Fix overlapping vertex shader signatures. For the case of drawing with un-normalized integer vertex attributes, we need to do some dynamic conversion in the VS. However, each attribute can either be signed or unsigned, and our shader signature code would treat both as a match, giving rise to a warning in the D3D11 Debug runtime. It's unclear if this would give incorrect results, but it certainly should not produce a warning. BUG=angleproject:1329 Change-Id: I302d11b44e8a0ef981e89c181aefac5451a899b7 Reviewed-on: https://chromium-review.googlesource.com/329998 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Jamie Madill d8fa9215 2016-03-02T11:51:43 D3D: Refactor VertexBuffer::getSpaceRequired. By making this a virtual call to BufferFactoryD3D (aka RendererD3D), we can also stop having side-effects in the BufferD3D class of creating a static buffer storage when we only want to know the space required for some vertex elements. This refactoring will aid implementation of VertexArray11 dirty bits. BUG=angleproject:1327 Change-Id: I0e34c6e9f5da35edebc179d578ad9392dc0166db Reviewed-on: https://chromium-review.googlesource.com/329741 Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Olli Etuaho 7ec6549d 2016-03-02T16:57:32 Use static_cast instead of reinterpret_cast for nullptr reinterpret_cast should not be used to cast nullptr_t. This should fix clang and also stops IntelliSense from complaining. TEST=build on Windows Change-Id: I4ba342172e36941f6a234fa4ed1369010527a790 Reviewed-on: https://chromium-review.googlesource.com/329901 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill dbfc6c63 2016-02-29T01:08:57 D3D: Make directStoragePossible a local static method. This method doesn't need to call through to the VertexBuffer class, since in only really depends on vertex format caps. This makes the code local to the VertexDataManager, the only place it is used. Refactoring patch only, for VertexArray11 dirty bits. BUG=angleproject:1327 Change-Id: I315313a72a00186930d7f9b1091ccb91f37f9f96 Reviewed-on: https://chromium-review.googlesource.com/329740 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Zhenyao Mo <zmo@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Corentin Wallez 7649fcaa 2016-03-01T15:48:12 Add wildcard suppression for flaky dEQP GLES3 tests on Linux BUG=angleproject:1323 Change-Id: Idcd49f9744db6ea282ccc2b4fbb932642b1c4c49 Reviewed-on: https://chromium-review.googlesource.com/329738 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Jamie Madill e6bcdd24 2016-03-02T11:26:02 Fix a bug in EGLPresentPathD3D11Test This test was releasing a resource created with a queried device after it released the D3D11 device. It is problematic because the error was not caught by the swarming tests on the trybots, but did show up on the Intel bot because it was not a swarming test. BUG=589851 BUG=angleproject:1219 Change-Id: I7383640df9794aaf0e32e0a7c276ae3b22232050 Reviewed-on: https://chromium-review.googlesource.com/330001 Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 518b9fab 2016-03-02T11:26:02 Suppress some failing end2end_tests on Intel. BUG=589851 Change-Id: Ia580cee30e6842aaddb4683025f425166f0f6120 Reviewed-on: https://chromium-review.googlesource.com/329735 Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill f09bf669 2016-03-02T11:26:01 Revert "Suppress some failing end2end_tests on Intel." This reverts commit 7208f6994cf7d810c2226965362aad43d2a66f53. Still some failures on Intel, requires a slightly different solution. BUG=589851 Change-Id: I6ac6599249e9e0f6319c917e04734cd48ca9274d Reviewed-on: https://chromium-review.googlesource.com/329734 Reviewed-by: Jamie Madill <jmadill@chromium.org>
Olli Etuaho bc21e18b 2016-02-23T16:04:57 D3D11 Texture refactoring: Store ANGLEFormat in TextureStorage11 This is needed to enable removing GetDXGIFormatInfo calls, which are difficult to use correctly due to a texture format being associated with multiple DXGI formats. This is done in preparation of changing some of the DXGI formats associated with integer textures. BUG=angleproject:1244 TEST=angle_end2end_tests, dEQP-GLES3.functional.fbo.* (no regressions) Change-Id: I992c4c06189887c1b9de02f9b63dd9a474fcffab Reviewed-on: https://chromium-review.googlesource.com/329094 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
stal 0011bb60 2016-02-29T22:28:06 fix texture size check in WindowSurfaceCGL::swap BUG=angleproject:1233 Change-Id: I92fddf331fe0687b290606fe222863bd0fcbc2da Reviewed-on: https://chromium-review.googlesource.com/329804 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Olli Etuaho c4a96d67 2015-07-23T17:37:39 Names of built-in functions cannot be redeclared as functions With ESSL 3.00, names of built-in functions cannot be redeclared as functions, and therefore an error needs to be generated if a built-in function is overloaded. This is fixed by inserting unmangled built-ins into a special set in the symbol table and checking if function declarations match any of the built-ins in the set. The regular symbol table structures can't be used for storing the unmangled names because that interferes with name hashing in OutputGLSL. Credit goes to Arun Patole, apatole@nvidia.com for initially investigating this issue and developing the first version of the patch. BUG=angleproject:1066 TEST=angle_unittests, dEQP-GLES3.functional.shaders.functions.invalid.overload_builtin_function* (2 tests started passing with this change) Change-Id: I28c8325f5a3a8f4a97226b0dfdbb9762724fa609 Reviewed-on: https://chromium-review.googlesource.com/328994 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Russ Lind eaef7c17 2016-02-15T13:52:28 floating point perf improvement in CopyNativeVertexData In the CopyNativeVertexData template function, in the else clause use memcpy/memset rather than for loops. This is a performance improvment for floating point versions of CopyNativeVertexData, particularly on 32-bit Firefox, where the -arch:IA32 compiler option used cause the compiler to generate fld/fstp operations inside the for loops. Update AUTHORS & CONTRIBUTORS to include AMD. BUG=angleproject:1317 Change-Id: I7133fc476028284f56783f4e2f9e2395f6227514 Reviewed-on: https://chromium-review.googlesource.com/327590 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Ian Ewell d2f02c2a 2016-02-26T13:39:54 Fix a memory leak in the Query11 class. The destructor did not release D3D objects that could be in the mPendingQueries list when the destructor is called. This fix now iterates through the list and releases them. BUG=angleproject:1325 Change-Id: Ia3bd2a8a611f8dbf85051ab5bfea18ab72038af5 Reviewed-on: https://chromium-review.googlesource.com/329426 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Ian Ewell <ewell@google.com>
Olli Etuaho 14ed667f 2016-02-24T15:22:11 Remove a few GetDXGIFormatInfo queries It's needlessly complex to query texture info when determining whether a format is a depth/stencil format. It can be tested simply by checking if the dsvFormat field of the format set is set. BUG=angleproject:1244 TEST=angle_end2end_tests, dEQP-GLES3.functional.texture.specification.*depth* (no regressions) Change-Id: I76d008462564657328dae35d664be5f5e22238fa Reviewed-on: https://chromium-review.googlesource.com/329104 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Jamie Madill 7208f699 2016-02-29T10:47:35 Suppress some failing end2end_tests on Intel. BUG=589851 Change-Id: I91588014784a8a9b75389aeb596923458c30d80a Reviewed-on: https://chromium-review.googlesource.com/329427 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Corentin Wallez eae0c7d4 2016-02-26T14:41:55 Add EGL tests to help troubleshoot environment problems BUG=585132 Change-Id: I9d04ad1705f45280cc608f419dbbd56db44d4d80 Reviewed-on: https://chromium-review.googlesource.com/329324 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 7d32aa5f 2016-02-29T14:45:32 Revert "D3D11 Texture refactoring: Store ANGLEFormat in TextureStorage11" Failing Windows Debug WebGL tests: https://build.chromium.org/p/chromium.gpu.fyi/builders/Win7%20Debug%20%28NVIDIA%29/builds/13587 Seems to fail in and around: [ FAILED ] WebglConformance.conformance_renderbuffers_framebuffer_object_attachment (320392 ms) [ RUN ] WebglConformance.conformance_renderbuffers_framebuffer_state_restoration BUG=angleproject:1244 This reverts commit d72c61c66e75536681c5fb529a92a2ee2134f0f1. Change-Id: Id84d6988bc1a3530d8dde4c36d18b735f3de06fc Reviewed-on: https://chromium-review.googlesource.com/329621 Reviewed-by: Jamie Madill <jmadill@chromium.org>
Olli Etuaho d72c61c6 2016-02-23T16:04:57 D3D11 Texture refactoring: Store ANGLEFormat in TextureStorage11 This is needed to enable removing GetDXGIFormatInfo calls, which are difficult to use correctly due to a texture format being associated with multiple DXGI formats. This is done in preparation of changing some of the DXGI formats associated with integer textures. BUG=angleproject:1244 TEST=angle_end2end_tests, dEQP-GLES3.functional.fbo.* (no regressions) Change-Id: I820b8331e6f9aacfe9979b13118371687c5fca51 Reviewed-on: https://chromium-review.googlesource.com/329075 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Corentin Wallez ff92e1f5 2016-02-24T15:45:20 Add suppressions for dEQP-GLES3 on Linux BUG=angleproject:1323 Change-Id: Id437ecd8c05e151558b66294f4c0946e0fee2df9 Reviewed-on: https://chromium-review.googlesource.com/329049 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Olli Etuaho bc49758c 2016-02-23T14:43:19 Choose D3D11 swizzle formats in gen_texture_format_table.py Making swizzle format data come from the ANGLE format table will make it easier to make changes that affect both swizzle formats and regular texture formats. Swizzle format is now specified manually for some tricky formats, but for most it can be determined automatically from the ANGLE texture format info. The ANGLE texture format info in texture_format_table.json is changed to facilitate this. The componentType field now captures only whether the data is normalized, int or float and its signedness, but not the width of the data type. Bit widths of the individual channels are recorded in a separate "bits" object for each ANGLE format entry. Also, a new 16-bit RGBA UNORM ANGLE format is added to support swizzling 16-bit normalized depth formats. This change is mostly just refactoring, but it fixes swizzling for formats which have less bits for alpha than other channels: - RGB10_A2 - RGB10_A2UI - RGB5_A1 BUG=angleproject:1322 BUG=angleproject:1244 TEST=angle_end2end_tests, dEQP-GLES3.functional.texture.swizzle.* (all pass) Change-Id: I87d8a9cc0b6569191f50c41754d77b20ca6afef9 Reviewed-on: https://chromium-review.googlesource.com/329074 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Jamie Madill 9062b3b7 2016-02-25T13:30:50 dEQP: Mark while 'continue' tests as failing on Linux. These tests seem to be flaky, and now they are showing up in a bunch of CLs as failures. BUG=angleproject:1324 Change-Id: I47c0e0895f8d87fba52084cf571fb453e5d996e0 Reviewed-on: https://chromium-review.googlesource.com/329279 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill cca8bc91 2016-02-25T20:00:09 Revert "dEQP: Mark while 'continue' tests as failing on Linux." Accidentally committed GLES3 suppressions to a GLES2 file. BUG=angleproject:1324 This reverts commit ea9b92f6ad24b8643322e0b5cf03eaccfe9b0e27. Change-Id: I510f05350d397ced8c68c3ea74c8549062835641 Reviewed-on: https://chromium-review.googlesource.com/329335 Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill ea9b92f6 2016-02-25T13:30:50 dEQP: Mark while 'continue' tests as failing on Linux. These tests seem to be flaky, and now they are showing up in a bunch of CLs as failures. BUG=angleproject:1324 Change-Id: Ie7dd70bde1490c8623910c6d319128ca1225990a Reviewed-on: https://chromium-review.googlesource.com/329156 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Olli Etuaho 11505601 2016-02-17T16:41:50 D3D11 Texture refactoring: Add ANGLEFormat enumeration to C++ code Texture formats that are internal to ANGLE can now be uniquely identified using the ANGLEFormat enum. GetANGLEFormatInfo returns a structure with the DXGI texture formats associated with the ANGLE format. For starters, the ANGLEFormat enum is used when building texture info structures queried from GetTextureFormatInfo. BUG=angleproject:1244 TEST=angle_end2end_tests Change-Id: I58a2027a1d9b7a5621f943cc5ceeb88a858009e3 Reviewed-on: https://chromium-review.googlesource.com/328254 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Jamie Madill 1fbc59fe 2016-02-24T15:25:51 D3D11: Enable dirty bits for Framebuffer11. This patch works using a notification scheme - whenever a Texture or Renderbuffer changes in such a way as to recreate its RenderTarget, we pass a signal to the Framebuffer to invalidate some internal state. Everything is entirely tracked in the Renderer11 layer, and the GL layer is left untouched. A RenderTarget11 now tracks points to which it is bound, and the Framebuffer11 is mostly responsible for managing those links. The three locations where we notify a Framebuffer when its bound RenderTargets might be dirty are: 1) RenderTarget11::~RenderTarget 2) EGLImageD3D::copyToLocalRendertarget 3) TextureStorage11_2D::useLevelZeroWorkaroundTexture This patch gives about a 10% score increase in the D3D11 draw call benchmark on my system. BUG=angleproject:1260 Change-Id: Ide38aeadff4a2681bf5bd685e8ca3c9e2612a380 Reviewed-on: https://chromium-review.googlesource.com/327255 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill d834e3dc 2016-02-24T13:44:43 D3D11: Fix Array texture depth-stencil attachments. We were missing support for these layer depth-stencil attachments. This fixes running a WebGL test for this feature. BUG=angleproject:1260 BUG=angleproject:1315 Change-Id: Ida7d44ba1fe65d5da95d2db721e497bfa685db77 Reviewed-on: https://chromium-review.googlesource.com/327402 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Olli Etuaho f434906c 2016-02-22T14:53:26 Group D3D11 DXGI format info under a struct This patch refactors how DXGI format info is stored. The goal is to make it easier to make changes that affect both swizzle formats and regular texture formats, and make it easier to pass the format sets around. BUG=angleproject:1244 TEST=angle_end2end_tests Change-Id: I1cc220bccbbdde9200a41829fdc37c8ec123c6a1 Reviewed-on: https://chromium-review.googlesource.com/329072 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho 6151af8c 2016-02-19T15:22:07 Remove renderFormat from TextureFormat structure The renderFormat is only ever needed in renderer11_utils when determining which multisample sample counts a format supports. Determine the renderFormat in the context where it is needed instead of storing it in the TextureFormat structure. Extra fallbacks can also be removed from the code. The D3D11FormatTablesTest is restructured so that it doesn't need to use the renderFormat field. This refactoring is done to make it simpler to expand usage of the ANGLE format enumeration in the C++ code. BUG=angleproject:1244 TEST=angle_end2end_tests, dEQP-GLES3.functional.fbo.* (no regressions) Change-Id: I980152eb2f3fdaaa1cc5b08e3c9b695c1625e9e5 Reviewed-on: https://chromium-review.googlesource.com/328680 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho 8fd2ca41 2016-02-23T11:14:39 Fix MSVS 2013 build Implicit conversion from int to boolean was generating a warning on MSVS 2013. Still useful to keep support around at least while build instructions recommend using MSVS 2013. Change-Id: I6975198f4bc6740a745454375f422d9c67ffaea5 Reviewed-on: https://chromium-review.googlesource.com/329070 Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Jamie Madill ad9f24e1 2016-02-12T09:27:24 Don't always sync all dirty object state on update. This leads to a problem where we're synching objects out of order. For instance, when we call SetImage, we need to sync the pack state. But SetImage can affect the FBO state, so we need to sync the FBO only after we've finished with SetImage. Fix this by using a mask of dirty objects to sync instead of all of them, always. This also has the side effect of deferring some syncs that don't have to be processed immediately. BUG=angleproject:1260 Change-Id: I5678d8f967930d11b42a4309d209215be2bae963 Reviewed-on: https://chromium-review.googlesource.com/327259 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Tibor den Ouden 662986f2 2016-02-18T18:06:13 Implement dynamic cast to TIntermBranch * on TIntermNode On the TIntermNode class there is no Derived *getAsDerived() for TIntermBranch. This is needed for the shader debugger to determine the node type. BUG=angleproject:1320 Change-Id: I9ce07017ccdb206c06c296b003b31eab6c65653c Reviewed-on: https://chromium-review.googlesource.com/328281 Tryjob-Request: Tibor Ouden, den <tibordenouden@gmail.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
John Bauman 24a504ec 2016-02-18T13:53:00 Clear SRV cache on keyed mutex texture unbind from TextureStorage11 If the calling code releases the keyed mutex after the unbind then D3D will unbind the SRV or RTV from the pipeline without notifying the cache. This allows the SRV to be destroyed, which means that a subsequently-created SRV could have the same address. This would cause the new SRV to not be correctly bound to the pipeline if its slot is the same as the unbound SRV. BUG=588000 Change-Id: I0ad1ba3706a6bcc1fee50745e6148c9b23e578f6 Reviewed-on: https://chromium-review.googlesource.com/328400 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: John Bauman <jbauman@chromium.org>
Jamie Madill 73a84969 2016-02-12T09:27:23 Refactor more Texture entry points to a consistent style. TexImage, SubImage and the Compressed variants were all taking a GL Context as the first parameter, which is a layering violation and also caused problems with reworking how the sync works. Fix this by refactoring them in the same style as the CopyTex* entry points. BUG=angleproject:1260 BUG=angleproject:747 Change-Id: Ibe5e87d0ebc790e2dcadb8ba153cf40fec73d1f6 Reviewed-on: https://chromium-review.googlesource.com/327258 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Corentin Wallez 6ad306cb 2016-02-11T17:06:41 dEQP: search for the data directory relative to the exe path. BUG=580045 Change-Id: I58bfa9ab6766eaae756b3c0f4d28f545e86d543b Reviewed-on: https://chromium-review.googlesource.com/327306 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>
Olli Etuaho 8a854d68 2016-02-17T11:54:04 Replace GetDXGIFormatInfo with a GetDXGIFormatSizeInfo where possible It's not always clear which format should be passed to GetDXGIFormatInfo, since a resource is associated with multiple formats. In some cases, one of the formats is typeless and one of them is typed, which would return different type information depending on which one is used. In some cases, one of the formats may even be a depth format while another is not. GetDXGIFormatSizeInfo will return correct data no matter which format associated with a certain resource is passed to it. Remaining uses of GetDXGIFormatInfo will need to be addressed separately, either making sure that they always use the format that makes sense in a given context, or plumbing in the required information in some other way. BUG=angleproject:1244 TEST=angle_end2end_tests Change-Id: If3cb03ab68d27743b1fdeb539234ec621dfa3c04 Reviewed-on: https://chromium-review.googlesource.com/328230 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Frank Henigman 8322cb91 2016-01-27T00:02:13 Corrections to GLES sRGB formats. This stops Mesa from complaining when using GLES 3.0 in the back end. BUG=angleproject:1301 Change-Id: Ib9c0397586a11c407c6aa9ad1544e12b43dd08a7 Reviewed-on: https://chromium-review.googlesource.com/324031 Tryjob-Request: Frank Henigman <fjhenigman@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Olli Etuaho 6253415f 2016-02-22T12:20:00 Mark sampler metadata clean when it is updated This was accidentally left out of the patch: "Pass texture base level to shaders on D3D11" TEST=angle_end2end_tests angle_perftests on d3d11 BUG=587846 Change-Id: I5d801288303cf0e0a3d52c1314aca95c47f02e25 Reviewed-on: https://chromium-review.googlesource.com/328960 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Olli Etuaho 6ee394a1 2016-02-18T13:30:09 Add initializer function to more texture formats All GL RGB formats that ANGLE stores as RGBA formats under the covers need to have their alpha channel set to 1. See GLES 3.0.4 table 3.24 for the relevant spec. In some cases, this is handled by the dataInitializerFunction associated with the format. Previously, some texture formats had the function set correctly, but not all. Associating formats with the datainitializerFormat is now a responsibility of the gen_texture_format_table.py script. The new automation there makes sure that all GL RGB formats emulated with RGBA formats get a data initializer function. Tests are added in end2end_tests for most of the RGB formats. BUG=angleproject:1318 TEST=angle_end2end_tests Change-Id: Iad860357f33d87c625445ea6c58a53af47e0b547 Reviewed-on: https://chromium-review.googlesource.com/328253 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Nico Weber 7a533f74 2016-01-07T14:12:19 Add a few missing newlines at eof. Change-Id: Ie4b0811be8fe2d075a8854f1b9d318f7cb747cd1 Reviewed-on: https://chromium-review.googlesource.com/320930 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Olli Etuaho ea6b6376 2016-02-17T17:29:52 Remove AnyDevice from gen_texture_format_table This makes the generated code easier to read. BUG=angleproject:1318 BUG=angleproject:1244 TEST=angle_end2end_tests Change-Id: I6f232f3b8959cf8c72efb1e68b3fae6358b7b698 Reviewed-on: https://chromium-review.googlesource.com/328252 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho a615852d 2016-02-17T15:39:34 Split texture_format_data.json into two files After this change, texture_format_map.json maps the GL internal formats to an enumeration of formats that is internal to ANGLE. Each ANGLE format specifies a unique combination of DXGI formats and what type of data the format contains. In the future, the ANGLE format could be used instead of DXGI format inside C++ code to identify which type of data a resource contains. This becomes useful when a GL format is associated with multiple DXGI formats, which may have different type information (for example depth vs. red, integer vs. float). texture_format_data.json is changed to only store data on these ANGLE formats. BUG=angleproject:1318 BUG=angleproject:1244 TEST=gen_texture_format_table.py (no changes in autogenerated file) Change-Id: I729c4a4d6fc66ee61598ef2d879e6785c85d40ab Reviewed-on: https://chromium-review.googlesource.com/328251 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho cbed3f5b 2016-02-17T15:46:32 Sort texture formats in gen_texture_format_table.py better Sort the formats in a meaningful way, so that even if the structure of the source files change, the order can be maintained. This makes it easier to review further changes that affect the autogenerated texture format table. BUG=angleproject:1318 BUG=angleproject:1244 TEST=angle_end2end_tests Change-Id: Id3602a809137da43431144a31e36d4a0ed2e596e Reviewed-on: https://chromium-review.googlesource.com/328250 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho f8bf583b 2016-02-11T16:21:49 Pass integer texture format bit count to shaders on D3D11 This will be needed in the future when integer texture wrap mode support will be added by sampling integer textures through FLOAT/UNORM/SNORM SRVs. The bit count needs to be passed for 8-, 10- and 16-bit textures. 32-bit integer textures are the ones left over. Only passing the bit counts for the absolute minimum number of formats avoids unnecessary driver constant buffer updates. BUG=angleproject:1244 BUG=angleproject:1095 TEST=angle_end2end_tests Change-Id: I28a84588842b2eb9a1661454437d21c22ce794b7 Reviewed-on: https://chromium-review.googlesource.com/326944 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Zhenyao Mo <zmo@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho 72e6606d 2016-02-15T11:52:54 Add more const qualifiers in TextureStorage11 This makes the code easier to follow. BUG=angleproject:1244 TEST=angle_end2end_tests Change-Id: I7787b04217a6771629e69f6f67586f62ce5cfccf Reviewed-on: https://chromium-review.googlesource.com/327053 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Geoff Lang b9ada71d 2016-02-17T11:45:58 Sync the D3D11 rasterizer state if pointDrawMode or multisample changes. When drawing points, culling is disabled to make sure the generated point sprites are not culled. Since there are no dirty bits for pointDrawMode or multiSample, they were not being checked to ensure the rasterizer state was correct. BUG=586531 Change-Id: I8fe60dd8d5bbc79b1bce2c0aa62c40cee560fe24 Reviewed-on: https://chromium-review.googlesource.com/327862 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Olli Etuaho bce743ab 2016-01-15T17:18:28 Use texture base level to implement textureSize on D3D11 HLSL HLSL GetDimensions call doesn't take the texture base level into account, so ANGLE needs to use the texture base level passed in uniforms to emulate ESSL textureSize() which does take it into account. After this change the relevant dEQP tests pass on NVIDIA, Intel is still suffering from an issue where a wrong value is returned when the lod is > 0 (tested on Intel HD Graphics 4600). AMD is also suffering from an unknown issue. BUG=angleproject:596 TEST=dEQP-GLES3.functional.shaders.texture_functions.texturesize.* (all pass on NVIDIA now), angle_end2end_tests Change-Id: I13e33d126008ecdf2b89461a3fb5040949cf19e2 Reviewed-on: https://chromium-review.googlesource.com/322123 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho 618bebcd 2016-01-15T16:40:00 Pass texture base level to shaders on D3D11 The base level is passed to shaders in an array included in the driver uniform block. This is done on feature levels above 9_3, which treat samplers as indices to sampler arrays in shaders. A separate uniform block couldn't be used for the sampler metadata, since that would bring the number of available uniform blocks down to below minimum level defined by GLES 3.0. BUG=angleproject:596 TEST=angle_end2end_tests Change-Id: Ie040521402f9996d51a978aeeba9222e9dd761ce Reviewed-on: https://chromium-review.googlesource.com/326290 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Jamie Madill d14e3c45 2016-02-12T10:08:19 Initialize TextureState::usage. This was probably omittted some time ago, and was showing up as garbage in the debugger in some cases. BUG=angleproject:1260 Change-Id: Ifca5243d0c94e7659a2245e327a72eed9dd918ab Reviewed-on: https://chromium-review.googlesource.com/327401 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Ian Ewell 89f2845c 2016-02-10T11:33:07 Context virtualization for D3D11 queries Queries in D3D11 are now virtualized such that they work as expected with multiple contexts. Timer queries now only time the operations that their context is responsible for and the operations of other contexts are ignored. BUG=angleproject:657 Change-Id: I667de594bdb5831d126d5801c0e692ded4c88bf4 Reviewed-on: https://chromium-review.googlesource.com/327150 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Ian Ewell <ewell@google.com>
Jamie Madill dc107978 2016-02-12T09:27:23 Clean up the style in TextureStorage11. This is a pure refactoring change, and should behave identically. BUG=angleproject:1260 Change-Id: I44f5ef2f1444ffd8f8dd6ce55c266ec95781a6d8 Reviewed-on: https://chromium-review.googlesource.com/327266 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Cooper Partin 8613f494 2016-02-11T10:28:05 Fixed clang build for InputLayoutCache. Change-Id: I0757874fad5f665cf4629092ad2d0d5982ca4856 Reviewed-on: https://chromium-review.googlesource.com/327301 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Cooper Partin 534bf87b 2016-02-09T11:33:29 Implemented instanced rendering for emulated point sprites Non-instanced PointSprite emulation for lower feature levels is implemented using D3D DrawIndexedInstanced and an instanced vertex buffer containing a pointsprite quad. GL instanced rendering using glDrawArraysInstanced and glDrawElementsInstanced with pointsprite emulation is performed using a for-loop. The loop iterates over each instance to render and adjusts the buffer offsets accordingly. This is not performant and is only used and required by this chosen pointsprite emulation method. Indexed instanced (glDrawElementsInstanced), uses the same offset loop because the vertex buffer containing the data to be rendered has already been expanded using getEmulatedIndexedBuffer(). Expanding the buffer makes the two rendering operations similar enough to share code. BUG=angleproject:1279 TEST=angle_end2end_tests Change-Id: If46cc9f158e29f5518c70ad630b3228f474a9f8b Reviewed-on: https://chromium-review.googlesource.com/321407 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jamie Madill cfd6b2b6 2016-02-08T12:50:38 D3D11: Add a test to cover a clear RTV driver bug. See dEQP-GLES3.functional.fbo.color.repeated_clear.sample.tex2d.rgba8 This test uses ClearRenderTargetView to clear various FBO textures, but it does not seem to work correctly on my Nvidia configuration. It has been reported to Nvidia. It also seems to fail on Intel. Current GPU: NVIDIA GeForce GTX 660 Current Driver: 10.18.13.5598 (9-13-2015) Works on Desktop OpenGL back-end, also on AMD R5230 BUG=angleproject:1305 Change-Id: I4b53b7376faf71f234d05c90f4fb55462de23e36 Reviewed-on: https://chromium-review.googlesource.com/314304 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Olli Etuaho ee991799 2016-02-10T18:25:40 Fix texture swizzle cache initialization Texture swizzle cache needs to be initialized so that the keys do not represent a valid swizzle state before any swizzled textures have been cached. BUG=angleproject:1095 TEST=dEQP-GLES3.functional.texture.swizzle.* (all pass) Change-Id: I66c10ed49134875d29b07852488a41a776e8fb67 Reviewed-on: https://chromium-review.googlesource.com/326971 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
John Bauman 0ecb18b9 2016-02-03T13:40:37 Avoid a copy in TextureStorage11::setData This is essentially a reland of 9cf9bcbecaa1e54a47a92eb784e7f591f7b65c57 This code always allocates a new memory buffer for the texture memory, picks a load function to copy/convert the input data into it, and the uploads. In the case where the input format matches the upload format we should be able to skip the allocation and copy and be much happier. Change-Id: If4281aeb4cd7bbbebba60122a10610a916833052 Reviewed-on: https://chromium-review.googlesource.com/326852 Tryjob-Request: John Bauman <jbauman@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: John Bauman <jbauman@chromium.org>
Kenneth Russell 0dcaaf77 2016-02-10T10:58:59 Re-enable win_angle_x64_dbg_ng as a trybot target. BUG=chromium:585270 Change-Id: I94b78d21aa700fbc7549f9f30534ba9f414780a3 Reviewed-on: https://chromium-review.googlesource.com/326924 Reviewed-by: Jamie Madill <jmadill@chromium.org>
Kenneth Russell 3271328c 2016-02-09T23:52:21 Revert "Re-enable win_angle_x64_dbg_ng as a trybot target." This reverts commit b36b491c00924acfc03c71453833c442b7a22be6. Forgot to restart the tryserver.chromium.angle waterfall to add this bot, and now waterfall restarts are broken: http://crbug.com/585632 . Change-Id: Id25ac99a54013a9dd1406d4680717bef12a75940 Reviewed-on: https://chromium-review.googlesource.com/327033 Reviewed-by: Kenneth Russell <kbr@chromium.org>
Kenneth Russell b36b491c 2016-02-08T15:55:49 Re-enable win_angle_x64_dbg_ng as a trybot target. BUG=chromium:585270 Change-Id: I9d95667d676f54bfe8901a428a6cb5eddf927819 Reviewed-on: https://chromium-review.googlesource.com/326830 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Ian Ewell 536ebf4d 2016-02-09T13:20:12 Increase the timeout on Timer queries tests. On Mac, the timer queries tests have flakiness as the tests may timeout before the query result is available. The time to wait before throwing a timeout error in the tests was therefore increased by a factor of 20. BUG=585498 Change-Id: I55047ee7759e6d2dde69294df451202dfb498034 Reviewed-on: https://chromium-review.googlesource.com/327031 Commit-Queue: Ian Ewell <ewell@google.com> Reviewed-by: Ian Ewell <ewell@google.com>
Ian Ewell 292f005f 2016-02-04T10:37:32 Fix context virtualization for timer queries In the current implementation of query virtualization, queries are paused/resumed during draw calls. Timer queries however are affected by every OpenGL call, so virtualization and context switches for timer queries must happen every time there is a context switch. Thus the logic for context-switching queries was moved to a new function in the GL state manager that is called everytime a makeCurrent call on the context is made. Since queries may be made after a context is made current, the state manager needs to keep track of any new queries that are started in a context, so an additional delegate function was added to the state manager that is called every time a glBeginQuery() call is made that adds the query object to a set. All the queries in that set are paused when a context switch is made and the queries in the new context are then loaded and resumed. BUG=angleproject:1307 Change-Id: I4e596d83739274cb2e14152a39e86e0e51b0f95c Reviewed-on: https://chromium-review.googlesource.com/325811 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Ian Ewell <ewell@google.com>
Corentin Wallez a78d12c5 2016-02-08T14:02:52 Make the dEQP GTEST initialization failures red on swarming. On swarming the dEQP GTEST initialization failures would show as green because the FAIL GTEST macro was called outside of a test. Use exit(-1) instead that shows up as red on the bots. BUG=580045 Change-Id: Icf82a8593a11fe7e992778ffd8c682f6738c39a6 Reviewed-on: https://chromium-review.googlesource.com/326690 Reviewed-by: Geoff Lang <geofflang@chromium.org>
Corentin Wallez 3f16afd3 2016-02-05T10:20:59 Add in GN the data dependencies required by the dEQP tests. BUG=580045 Change-Id: I3424568c6b200d6b6eb9921c6c09a3b3c974d710 Reviewed-on: https://chromium-review.googlesource.com/326320 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 39046169 2016-02-08T15:05:17 CollectVariables: Don't include block name in field name. The spec mandates that the instance name of a block determines how the active uniform name for this field is reported. However, our handling of this was a bit bugged. We would include the proper prefix on the compiler-side, but this mangled the hashing, and was also not strictly needed. We now also expose the instance name, so we can determine the proper prefix for variable linking on the GL-side of things. This also is consistent with how we handle other spec issues, where the GL-side handles the GL-API specific functionality. This also allows us to fix name hashing of instanced uniform blocks, which was previously broken because we would hash the full name of the active uniform, instead of just the field. BUG=angleproject:1306 Change-Id: I06ace6dbc3f75fdd8129677360dcc142aa89136e Reviewed-on: https://chromium-review.googlesource.com/326681 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Olli Etuaho 15e890e6 2016-02-08T16:06:11 Remove unused texture format source files These files are not included in the build, they have been replaced by autogenerated files. TEST=build on Windows Change-Id: I6b8448d6f2426bc05c01b7ec6db605e6047ee207 Reviewed-on: https://chromium-review.googlesource.com/326660 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Geoff Lang ded2e2ee 2016-02-08T19:32:19 Remove unreferenced member of Renderer11, mDepthStencilInitialized. BUG=angleproject:1260 Change-Id: I3773297a4e517e2fca7072f56f3bdbec0a561d9a Reviewed-on: https://chromium-review.googlesource.com/326851 Reviewed-by: Geoff Lang <geofflang@chromium.org>
Corentin Wallez 1eabcf41 2016-02-02T13:54:00 Replace '> >' with '>>' BUG=angleproject:1308 Change-Id: I00bd2ea939b633817662205eb7879efb7f99965f Reviewed-on: https://chromium-review.googlesource.com/326400 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Austin Kinross 2a63b3f8 2016-02-08T12:29:08 Re-land "Implement EGL_experimental_present_path_angle" - Re-land with clang fix. This allows ANGLE to render directly onto a D3D swapchain in the correct orientation when using the D3D11 renderer. The trick is to add an extra uniform to each shader which takes either the value +1.0 or -1.0. When rendering to a texture, ANGLE sets this value to -1.0. When rendering to the default framebuffer, ANGLE sets this value to +1.0. ANGLE multiplies vertex positions by this value in the VS to invert rendering when appropriate. It also corrects other state (e.g. viewport/scissor rect) and shader built-in values (e.g. gl_FragCoord). This saves a substantial amount of GPU time and lowers power consumption. For example, the old method (where ANGLE renders all content onto an offscreen texture, and then copies/inverts this onto the swapchain at eglSwapBuffers() time) uses about 20% of the GPU each frame on a Lumia 630. Verification: + dEQP GL ES2 tests pass when "present path fast" is enabled + all ANGLE_end2end_tests pass when "present path fast" is enabled BUG=angleproject:1219 Change-Id: I56b339897828753a616d7bae837a2f354dba9c63 Reviewed-on: https://chromium-review.googlesource.com/326730 Tryjob-Request: Austin Kinross <aukinros@microsoft.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@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>
Corentin Wallez 570f67d7 2016-02-05T15:28:24 Download GN in the gclient hooks. Recently git cl format has started requiring GN and would fail when run in the ANGLE standalone repository because the binary was not present. BUG= Change-Id: I0482db6fd6a868dc02ef6e395e6ff4817623c291 Reviewed-on: https://chromium-review.googlesource.com/326420 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Jamie Madill d1c46228 2016-02-08T14:51:18 Revert "Implement EGL_experimental_present_path_angle" Compile failure on Clang/Win: The reason for reverting is: FAILED: ninja -t msvc -e environment.x86 -- "..\..\third_party/llvm-build/Release+Asserts/bin/clang-cl" -m32 /nologo /showIncludes /FC @obj\third_party\angle\src\tests\egl_tests\angle_end2end_tests.EGLPresentPathD3D11Test.obj.rsp /c ..\..\third_party\angle\src\tests\egl_tests\EGLPresentPathD3D11Test.cpp /Foobj\third_party\angle\src\tests\egl_tests\angle_end2end_tests.EGLPresentPathD3D11Test.obj /Fdobj\gpu\angle_end2end_tests.cc.pdb In file included from ..\..\third_party\angle\src\tests\egl_tests\EGLPresentPathD3D11Test.cpp:7: In file included from ..\..\third_party\angle\src\tests\test_utils/ANGLETest.h:13: ..\..\testing\gtest\include\gtest/gtest.h(1392,16) : error: comparison of integers of different signs: 'const int' and 'const unsigned int' [-Werror,-Wsign-compare] if (expected == actual) { ~~~~~~~~ ^ ~~~~~~ ..\..\testing\gtest\include\gtest/gtest.h(1422,12) : note: in instantiation of function template specialization 'testing::internal::CmpHelperEQ<int, unsigned int>' requested here return CmpHelperEQ(expected_expression, actual_expression, expected, ^ ..\..\third_party\angle\src\tests\egl_tests\EGLPresentPathD3D11Test.cpp(281,9) : note: in instantiation of function template specialization 'testing::internal::EqHelper<false>::Compare<int, unsigned int>' requested here ASSERT_EQ(mWindowWidth * 4, mappedSubresource.RowPitch); ^ ..\..\testing\gtest\include\gtest/gtest.h(1960,32) : note: expanded from macro 'ASSERT_EQ' # define ASSERT_EQ(val1, val2) GTEST_ASSERT_EQ(val1, val2) ^ ..\..\testing\gtest\include\gtest/gtest.h(1943,67) : note: expanded from macro 'GTEST_ASSERT_EQ' EqHelper<GTEST_IS_NULL_LITERAL_(expected)>::Compare, \ ^ BUG=angleproject:1219 This reverts commit 6b3c1db5170450bbc4946d8f18ba0d8619da43a0. Change-Id: Ia67ab82dd13295dc03235d57fa417c73f20a49e6 Reviewed-on: https://chromium-review.googlesource.com/326680 Reviewed-by: Jamie Madill <jmadill@chromium.org>