1. 21 Apr, 2016 1 commit
  2. 20 Apr, 2016 1 commit
    • Clean up MipmapTest · b97a3e77
      Olli Etuaho authored
      This refactoring is done to prepare for adding more mipmap tests for
      ES3 where base level / max level is changed from 0.
      
      1. Reuse drawQuad() from ANGLETest instead of having completely custom
      quad drawing code, and reuse the same clear+draw function for both 2D
      and cube map texture tests.
      
      2. Add a helper function for clearing texture level 0 with glClear.
      
      3. Remove a few redundant texture binding and useProgram calls.
      
      4. Rely on sampler uniforms being set to 0 by default and texture unit
      0 being active by default.
      
      5. Remove "Offscreen" from variable names.
      
      6. Split SetUp functions to helper functions.
      
      7. Reuse FillWithRGBA from TextureTest also in MipmapTest.
      
      BUG=angleproject:596
      TEST=angle_end2end_tests
      
      Change-Id: I9fd738f4b8b0a19c7aa1d267f7dbaa40a6935631
      Reviewed-on: https://chromium-review.googlesource.com/338791Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
      Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
  3. 18 Apr, 2016 2 commits
  4. 15 Apr, 2016 3 commits
  5. 14 Apr, 2016 3 commits
    • Takes principal component analysis to improve the endpoint in ETC transcode. · 6684007a
      Minmin Gong authored
      Insteading of getting the BC1 endpoints from the max and min intensity, a PCA
      on pixels might give us better quality results, with limited costs.
      
      Change-Id: I7638d78c666c2580a6b0c267470bf4a0f7082e05
      Reviewed-on: https://chromium-review.googlesource.com/332871
      Commit-Queue: Corentin Wallez <cwallez@chromium.org>
      Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org>
      Commit-Queue: Geoff Lang <geofflang@chromium.org>
    • Defer global initializers when necessary · 3d932d83
      Olli Etuaho authored
      Move global variable initializers that are not constant expressions to
      a function that gets called at the start of main(). This is done
      with an AST transformation. This needs to be done because global
      variable initializers must be constant in native GL, but ANGLE is more
      lenient with what can be put into ESSL 1.00 global initializers to
      remain compatible with legacy WebGL content.
      
      Non-constant global variable initializers also caused issues in HLSL
      output, since in HLSL output some types of expressions get unfolded
      into multiple statements. These include short-circuiting operators and
      array initialization. To make sure that these cases are covered, any
      initializers that can't be constant folded are deferred, even if they
      have the const qualifier.
      
      The old deferring mechanism in OutputHLSL is removed in favor of this
      new AST transformation based approach.
      
      BUG=angleproject:819
      BUG=angleproject:1205
      BUG=angleproject:1350
      BUG=596616
      TEST=WebGL conformance test
           conformance/glsl/misc/global-variable-init.html
      
      Change-Id: I039cc05d6b8c284baeefbdf7f10062cae4bc5716
      Reviewed-on: https://chromium-review.googlesource.com/338291Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org>
      Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
    • Wrap integer textures with correct wrap mode in HLSL · b079c7af
      Olli Etuaho authored
      The wrap mode information for all three dimensions is packed to a
      single integer in order to conserve sampler metadata space. Only one
      int4 vector is used for the metadata for a single sampler.
      
      The sampler metadata is now packed into a struct instead of an array
      of integers in order to make the code more readable and maintainable.
      The internalFormatBits field is not removed in this patch. It's better
      to remove it in a separate patch, so restoring it is easier in case it
      will be used for optimizing some of the texture sampling functions.
      
      The wrap mode passed in sampler metadata is used to wrap the texture
      coordinates in the code generated to implement ESSL 3.00 integer
      texture sampling built-ins.
      
      Those dEQP-GLES3.functional.texture.units.* tests that sample from
      integer cube maps still fail on Intel D3D after this change,
      presumably due to driver issues.
      
      BUG=angleproject:1244
      BUG=angleproject:1095
      BUG=angleproject:1092
      TEST=dEQP-GLES3.functional.texture.units.* (all pass on NVIDIA),
           dEQP-GLES3.functional.shaders.texture_functions.* (no regressions)
      
      Change-Id: I4e31e5796086f9cc290c6f1f8c4380a768758d71
      Reviewed-on: https://chromium-review.googlesource.com/336638Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
      Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org>
      Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
  6. 13 Apr, 2016 1 commit
  7. 12 Apr, 2016 7 commits
  8. 11 Apr, 2016 2 commits
  9. 08 Apr, 2016 3 commits
  10. 07 Apr, 2016 1 commit
  11. 06 Apr, 2016 5 commits
  12. 05 Apr, 2016 2 commits
    • Fix buffer mapping validation and refactor entry points · 4f66748d
      Olli Etuaho authored
      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/336164Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
      Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org>
      Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
    • Support ESSL structs containing samplers on D3D · 9696316d
      Olli Etuaho authored
      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/333743Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
      Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org>
      Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
  13. 03 Apr, 2016 1 commit
  14. 01 Apr, 2016 2 commits
    • Revert "Gyp build support for Chrome OS." · 0c0d8006
      Frank Henigman authored
      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 b5aa26bd.
      
      Change-Id: Icf3bd84df4493e66e78f8351b1a3879893ae9d0e
      Reviewed-on: https://chromium-review.googlesource.com/336849Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
    • Re-land "D3D11: Implement dirty bits for VertexArray11."" · 3477f3a6
      Jamie Madill authored
      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/334225Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org>
      Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
      Commit-Queue: Jamie Madill <jmadill@chromium.org>
  15. 31 Mar, 2016 6 commits