1. 22 Feb, 2016 4 commits
    • Replace GetDXGIFormatInfo with a GetDXGIFormatSizeInfo where possible · 8a854d68
      Olli Etuaho authored
      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/328230Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
      Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org>
      Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
    • Corrections to GLES sRGB formats. · 8322cb91
      Frank Henigman authored
      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: 's avatarJamie Madill <jmadill@chromium.org>
      Commit-Queue: Geoff Lang <geofflang@chromium.org>
    • Mark sampler metadata clean when it is updated · 6253415f
      Olli Etuaho authored
      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: 's avatarJamie Madill <jmadill@chromium.org>
      Commit-Queue: Jamie Madill <jmadill@chromium.org>
    • Add initializer function to more texture formats · 6ee394a1
      Olli Etuaho authored
      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/328253Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
      Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
  2. 19 Feb, 2016 1 commit
  3. 18 Feb, 2016 5 commits
  4. 17 Feb, 2016 1 commit
  5. 15 Feb, 2016 2 commits
    • Use texture base level to implement textureSize on D3D11 HLSL · bce743ab
      Olli Etuaho authored
      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/322123Reviewed-by: 's avatarZhenyao Mo <zmo@chromium.org>
      Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
    • Pass texture base level to shaders on D3D11 · 618bebcd
      Olli Etuaho authored
      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/326290Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org>
      Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
  6. 13 Feb, 2016 1 commit
  7. 12 Feb, 2016 2 commits
  8. 11 Feb, 2016 5 commits
  9. 10 Feb, 2016 1 commit
  10. 09 Feb, 2016 9 commits
  11. 08 Feb, 2016 5 commits
    • Replace '> >' with '>>' · 1eabcf41
      Corentin Wallez authored
      BUG=angleproject:1308
      
      Change-Id: I00bd2ea939b633817662205eb7879efb7f99965f
      Reviewed-on: https://chromium-review.googlesource.com/326400Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
      Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org>
    • Re-land "Implement EGL_experimental_present_path_angle" · 2a63b3f8
      Austin Kinross authored
      - 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: 's avatarCorentin Wallez <cwallez@chromium.org>
      Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org>
    • D3D11: Refactor RenderTarget apply into StateManager11. · c9bdeff4
      Jamie Madill authored
      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/325423Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org>
      Commit-Queue: Jamie Madill <jmadill@chromium.org>
    • Download GN in the gclient hooks. · 570f67d7
      Corentin Wallez authored
      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/326420Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
      Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org>
      Commit-Queue: Corentin Wallez <cwallez@chromium.org>
    • Revert "Implement EGL_experimental_present_path_angle" · d1c46228
      Jamie Madill authored
      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 6b3c1db5.
      
      Change-Id: Ia67ab82dd13295dc03235d57fa417c73f20a49e6
      Reviewed-on: https://chromium-review.googlesource.com/326680Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
  12. 06 Feb, 2016 2 commits
    • Refactor InputLayoutCache::applyVertexBuffers. · c674abeb
      Jamie Madill authored
      The redesigned code places the internal buffers and input elements for
      instance point sprite emulation (FL9_3) at the start of the arrays,
      instead of swapping with the first non-instanced element. This makes
      the tracking logic of the caching somewhat cleaner.
      
      This facilitates the work of implementing instancing-on-instancing for
      FL9_3 conformance.
      
      BUG=angleproject:1279
      
      Change-Id: Ifb030816a313b1e8b916c57ef05915914443312a
      Reviewed-on: https://chromium-review.googlesource.com/325090Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org>
      Commit-Queue: Jamie Madill <jmadill@chromium.org>
    • Revert "Avoid a copy in TextureStorage11::setData" · 3a913264
      Jamie Madill authored
      Fails on the Windows builders:
      
      https://build.chromium.org/p/chromium.gpu.fyi/builders/GPU%20Win%20Builder/builds/42201
      
      e:\b\build\slave\gpu_win_builder\build\src\third_party\angle\src\libangle\renderer\d3d\d3d11\load_functions_table_autogen.cpp(787) : error C2440: 'return' : cannot convert from 'const std::map<GLenum,rx::LoadImageFunction,std::less<_Kty>,std::allocator<std::pair<const _Kty,_Ty>>>' to 'const std::map<GLenum,rx::d3d11::LoadImageFunctionInfo,std::less<_Kty>,std::allocator<std::pair<const _Kty,_Ty>>> &'
              with
              [
                  _Kty=GLuint
      ,            _Ty=rx::LoadImageFunction
              ]
              and
              [
                  _Kty=GLuint
      ,            _Ty=rx::d3d11::LoadImageFunctionInfo
              ]
              Reason: cannot convert from 'const std::map<GLenum,rx::LoadImageFunction,std::less<_Kty>,std::allocator<std::pair<const _Kty,_Ty>>>' to 'const std::map<GLenum,rx::d3d11::LoadImageFunctionInfo,std::less<_Kty>,std::allocator<std::pair<const _Kty,_Ty>>>'
              with
              [
                  _Kty=GLuint
      ,            _Ty=rx::LoadImageFunction
              ]
              and
              [
                  _Kty=GLuint
      ,            _Ty=rx::d3d11::LoadImageFunctionInfo
              ]
              No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
      
      This reverts commit 52d3e43b.
      
      Change-Id: I83774ea09ccbb2b92ff609714e1c7201beb775bc
      Reviewed-on: https://chromium-review.googlesource.com/326540Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
  13. 05 Feb, 2016 2 commits