1. 12 Jul, 2017 7 commits
  2. 11 Jul, 2017 7 commits
    • D3D11: Clip copy rect to the source framebuffer for copyTexImage3D. · bc5d7add
      Geoff Lang authored
      TEST=conformance2/textures/misc/copy-texture-image-webgl-specific.html
      
      BUG=angleproject:1815
      
      Change-Id: I146fcf97a9c90f07d6270672c5e44e05602eecf8
    • Add entry points for EGL_ANGLE_program_cache_control. · 315ecd20
      Jamie Madill authored
      This instruments the plumbing for the extension without adding any
      functionality or exposing the extensions string.
      
      The extension text is also updated to reflect the new entry point
      design and naming. Also this corrects a few mistakes.
      
      This will be followed up by the tests (which won't run) and then
      the extension functionality in ANGLE.
      
      BUG=angleproject:1897
      
      Change-Id: I5b009e23bc27da06b067375525bd6fc574027702
    • Fix Clear validation assert for default FBOs · 59c41597
      Corentin Wallez authored
      The validation was iterating over maxDrawBuffers attachments when
      default framebuffers only have one attachment. Use the framebuffer's
      drawBufferCount instead.
      
      Also adds a regression test in the form of a WebGLComptibility test for
      glClearBuffer with the default framebuffer.
      
      BUG=angleproject:2091
      
      Change-Id: I07ee524db1fcb8a99dab4043248c0885100fd216
    • Select viewport index in the GLSL/ESSL vertex shader · c39a19aa
      Martin Radev authored
      The patch enables viewport selection for multiview rendering in the
      GLSL/ESSL vertex shader through the use of the GL_NV_viewport_array2
      extension. The AST is modified only for GLSL and ESSL to include the
      viewport selection expression after ViewID_OVR's initialization.
      
      BUG=angleproject:2062
      TEST=angle_unittests
      
      Change-Id: Iee05bb5a4b687ed53ddbdd466f1572227b1f0cde
    • Fix accepting arrays as array indices · 37d96cce
      Olli Etuaho authored
      Previously, arrays were being incorrectly accepted as array indices.
      This was because the isScalar() check only checked that the type was
      not a vector or matrix, but still returned true for scalar arrays.
      
      This patch changes the isScalar() check so that it returns false for
      arrays. This makes usage of the term "scalar" more consistent in the
      shader translator. Most of the code using isScalar() was compatible
      with this change. Code in util.cpp that used to assume that isScalar()
      doesn't care about arrayness is refactored to work with the new
      behavior.
      
      BUG=angleproject:2102
      TEST=angle_unittests
      
      Change-Id: I2a7f4c30fca7917d1099d0400efe3de859338b2a
    • Remove TIntermediate::addConstantUnion · 56229f1b
      Olli Etuaho authored
      This includes asserts in TConstantUnion to reveal incorrect usage of
      union - reading a different field of an union that has last been set
      is undefined behavior in C++.
      
      Existing issues with accessing incorrect fields of constant unions
      are fixed.
      
      BUG=angleproject:1490
      TEST=angle_unittests
      
      Change-Id: Idd6b7a871d73e2928f117a9348c92043612fab82
  3. 10 Jul, 2017 4 commits
    • Remove simple Intermediate.h functions · eb7f90fd
      Olli Etuaho authored
      Most of the functions were just simple wrappers around node
      constructors. Dropping this extra redirection makes the code simpler.
      
      The fold() functions of node types are simplified, so that if the node
      can't be folded the pointer to the node itself is returned. This makes
      the code in ParseContext more straightforward.
      
      The few remaining functions in Intermediate are a bit more complex so
      they should be handled separately, but they'll be removed eventually
      as well.
      
      BUG=angleproject:1490
      TEST=angle_unittests
      
      Change-Id: I85e11919d1f62358cfba9c011b841e32bc25402f
      Reviewed-on: https://chromium-review.googlesource.com/563393Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org>
      Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
    • Add support for new internalformats in copyTextureCHROMIUM · 340b7b8b
      Brandon Jones authored
      This adds support in blit11::copyTexture for LUMA, LUMA_ALPHA, and ALPHA
      formats as destinations. Added is handling for each case to match up
      the corresponding shader. This required new premultiply and
      unmultiply D3D11 shaders for some cases.
      
      Changed copyTextureCHROMIUM validation to allow new formats.
      
      Tests have been created to demonstrate using copyTextureCHROMIUM with
      the new formats with default parameters, as well as with the
      unpackPremultiply and unpackUnmultiply parameters.
      
      BUG=:angleproject:2101
      
      Change-Id: Id8cd303a46fe70710bc18172fc938552a6e4cfaf
    • Add function in MatchOutputCodeTest to find occurrence of a string · 70c95fa6
      Martin Radev authored
      The patch adds a function in MatchOutputCodeTest to get the position
      of the first occurrence of an expression in the translated output code.
      This can help design more complicated tests like a test which checks
      for the order of simple expressions.
      
      BUG=angleproject:2062
      TEST=angle_unittests
      
      Change-Id: I1249d4762c247848c4eec64ecb8c1357b5e8d40a
      Reviewed-on: https://chromium-review.googlesource.com/563659Reviewed-by: 's avatarOlli Etuaho <oetuaho@nvidia.com>
      Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org>
      Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
    • Fall back to CPU copies for srgb textures in copy_texture_CHROMIUM. · 88318b44
      Geoff Lang authored
      The copied data is not supposed to have sRGB conversions applied to it
      when written to the destination texture but an sRGB SRV is used by Blit11.
      Instead of creating multiple sRGB and non-sRGB SRVs for textures, simply
      fall back to the CPU copy path for this format for now.
      
      Clip color channels that should not exist in the destination texture
      formats in Image11::CopyImage.  This works around issues with texture
      formats with emulated channels.
      
      TEST=conformance2/textures/image_bitmap_from_canvas/tex-2d-srgb8-rgb-unsigned_byte
      TEST=conformance2/textures/image_bitmap_from_canvas/tex-2d-srgb8_alpha8-rgba-unsigned_byte
      
      BUG=angleproject:1932
      
      Change-Id: Ieeda3569f80d016fda781e7eb498acd3b97568d0
      Reviewed-on: https://chromium-review.googlesource.com/559857Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org>
      Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
      Commit-Queue: Geoff Lang <geofflang@chromium.org>
  4. 09 Jul, 2017 1 commit
  5. 07 Jul, 2017 5 commits
  6. 06 Jul, 2017 7 commits
  7. 05 Jul, 2017 9 commits
    • Clip TextureGL::copyImage to framebuffer. · 1cbe9203
      Frank Henigman authored
      Ensure the underlying GL does not modify areas of the texture that
      correspond to areas outside the framebuffer, as required for WebGL.
      Also zero out the texture in WebGL mode because CopyTexImage must return
      zeroes for areas outside the framebuffer.
      
      Enable corresponding test.
      
      BUG=angleproject:1815
      
      Change-Id: I51b1221dbf0dda0952e2ae89ee6ac925b5d1d4a4
      Reviewed-on: https://chromium-review.googlesource.com/551535
      Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
      Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org>
    • Do not propagate OVR_multiview extension directive · 0cdf3683
      Martin Radev authored
      The patch fixes the bug of having the OVR_multiview extension directive
      being outputted by the ESSL translator whenever the
      SH_INITIALIZE_BUILTINS_FOR_INSTANCED_MULTIVIEW option is enabled. The
      directive should not be outputted because the extension is emulated
      through that option.
      
      BUG=angleproject:2062
      TEST=angle_unittests
      
      Change-Id: I95d0a651ace6db42d496de08e774ec7ceca4c197
      Reviewed-on: https://chromium-review.googlesource.com/558981
      Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
      Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
    • Add program binary cache EGL and GL extensions. · 83f0fb4d
      Jamie Madill authored
      The EGL extension will allow for querying the cache and populating it
      with shaders on startup. The GL extension adds some language to the
      spec and allows for querying the program binary cache status of a
      Context.
      
      BUG=angleproject:1897
      
      Change-Id: I7233844e41008f097efbb30cf9fe9c89227085fc
      Reviewed-on: https://chromium-review.googlesource.com/556383
      Commit-Queue: Jamie Madill <jmadill@chromium.org>
      Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org>
    • Update eglext.h. · 88f18d01
      Jamie Madill authored
      Also move the ANGLE modifications to eglext.h to a separate file
      so we can more easily update and maintain the official header.
      
      This is in preparation for adding the new program cache control
      extension.
      
      BUG=angleproject:1897
      
      Change-Id: I3546e0c82f6536381301f62a115b42d580747a08
      Reviewed-on: https://chromium-review.googlesource.com/559917
      Commit-Queue: Jamie Madill <jmadill@chromium.org>
      Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org>
    • Clip TextureD3D_2D::copyImage to framebuffer. · 95ba174e
      Frank Henigman authored
      WebGL CopyTexImage needs to zero the part of the texture corresponding
      to area outside the framebuffer, so we zero the whole texture then clip
      the read area.
      The clipping also avoids problems with code lower down that isn't prepared
      for read areas not entirely within the framebuffer.
      
      Enable corresponding test.
      
      BUG=angleproject:1815
      
      Change-Id: Ia7e0243ca72fa7c8f5bacda4d2022061d6a6d4f0
      Reviewed-on: https://chromium-review.googlesource.com/551056Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org>
      Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
    • Improve Debugging Strings · 6cad5667
      Brandon Jones authored
      This change replaces common string literals used for
      error messages with const string variables mapped in
      a new header file.
      
      Additionally, more validation for WebGL naming scenarios
      has been added, along with unit tests.
      
      BUG=:angleproject:1644
      
      Change-Id: Icff44a456aa78221c6df12b0454a7cc147a7d26e
      Reviewed-on: https://chromium-review.googlesource.com/535974
      Commit-Queue: Brandon1 Jones <brandon1.jones@intel.com>
      Commit-Queue: Jamie Madill <jmadill@chromium.org>
      Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
      Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org>
    • Clip FramebufferGL::readPixels to framebuffer. · fa36c330
      Frank Henigman authored
      In GL, ReadPixels() is allowed to modify memory that corresponds to
      pixels outside the framebuffer.
      In WebGL it must not do that, so clip the read area to the framebuffer.
      
      Enable corresponding test.
      
      BUG=angleproject:1815
      
      Change-Id: I8113ae417dee7834e63498aec8291ce711bd7513
      Reviewed-on: https://chromium-review.googlesource.com/536434
      Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
      Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org>
      Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
    • HLSL: Disambiguate between struct function parameters · 088031e6
      Olli Etuaho authored
      Structs with different names but identical members are treated as
      ambiguous by the native HLSL compiler when looking up user-defined
      functions. Add the struct name to the function name to work around
      this limitation.
      
      BUG=chromium:731324
      TEST=angle_end2end_tests
      
      Change-Id: Ie80ac0f1374bc5ac05dfebef3f94e2da7cdfc581
      Reviewed-on: https://chromium-review.googlesource.com/558929
      Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
      Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
    • Re-land: Don't expose non-conformant multisampling modes on GL · 50c562de
      Olli Etuaho authored
      Re-landing with a fallback for failed internal format queries to work
      around issue seen on Shield TV. Also fixed wrong handling of integer
      RG formats in isRequiredRenderbufferFormat.
      
      Some NVIDIA GL drivers expose non-conformant multisampling modes. The
      conformance of multisampling modes can be queried using the extension
      NV_internalformat_sample_query. Use it to filter out the
      non-conformant modes from the modes that are exposed by ANGLE.
      
      The MAX_SAMPLES value and other similar values stored in caps also
      need to be lowered to match the maximum number of samples exposed
      for required formats.
      
      There seems to be an NVIDIA driver bug related to querying
      STENCIL_INDEX8 multisample format. Work around this by querying
      DEPTH24_STENCIL8 instead.
      
      There's also some confusion around whether RGB9_E5 should be
      renderable. Once the floating point texture extensions got rolled
      into the core GL spec, it was eventually made clear that RGB9_E5
      is intended not to be renderable. The extension specs that predate
      float textures in the core spec do suggest that it would be
      renderable, but in practice drivers that advertise the extension
      strings don't reliably implement RGB9_E5 as renderable. Solve this
      by disabling it as a renderable format and adding an explanatory
      comment.
      
      BUG=chromium:682815
      TEST=angle_end2end_tests,
           dEQP-GLES31.functional.state_query.internal_format.renderbuffer.*
      
      Change-Id: I727f03045a1534d6764b571e6d839243705d25b3
      Reviewed-on: https://chromium-review.googlesource.com/551957Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
      Commit-Queue: Jamie Madill <jmadill@chromium.org>