Log

Author Commit Date CI Message
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>
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>