Skip to content
Snippets Groups Projects
  1. Mar 15, 2025
  2. Mar 05, 2025
    • James Hogan's avatar
      OVR_multiview: Add GLSL 1.30 test · 708a9e36
      James Hogan authored and Marge Bot's avatar Marge Bot committed
      
      Since the OVR_multiview tests have been bumped to use GLSL 3.3 for the
      sake of running on NVIDIA's proprietary driver, add a test that
      multiview vertex shaders which use gl_ViewID_OVR can be compiled back to
      GLSL-1.30 (#version 130).
      
      Signed-off-by: default avatarJames Hogan <james@albanarts.com>
      Acked-by: default avatarMarek Olšák <marek.olsak@amd.com>
      Part-of: <!987>
      708a9e36
    • James Hogan's avatar
      OVR_multiview[2]: Use GLSL 3.3 (NVIDIA) · 6feef5d2
      James Hogan authored and Marge Bot's avatar Marge Bot committed
      
      In order to allow the OVR_multiview tests to run on NVIDIA's proprietary
      driver for sanity checking, bump all OVR_multiview shaders to GLSL 3.3.
      
      Signed-off-by: default avatarJames Hogan <james@albanarts.com>
      Acked-by: default avatarMarek Olšák <marek.olsak@amd.com>
      Part-of: <!987>
      6feef5d2
    • James Hogan's avatar
      OVR_multiview: Add fb_blit_first_view test · f5a5b8b7
      James Hogan authored and Marge Bot's avatar Marge Bot committed
      
      Add test that blits to multiview framebuffers only blit to the first
      view in the framebuffer.
      
      A normal 2D read framebuffer containing green is blitted to a multiview
      draw framebuffer containing red, either as a single full blit or two
      half blits, and the multiview framebuffer is read to confirm that only
      the first view is changed to green and the others remain red.
      
      This test is called with different arguments to control whether full
      blits or partial blits are performed, and the base view layer index.
      
      Signed-off-by: default avatarJames Hogan <james@albanarts.com>
      Acked-by: default avatarMarek Olšák <marek.olsak@amd.com>
      Part-of: <!987>
      f5a5b8b7
    • James Hogan's avatar
      OVR_multiview: Add fb_shader_mismatch_draw_errors test · 1726b7de
      James Hogan authored and Marge Bot's avatar Marge Bot committed
      
      Add test that mismatches between multiview framebuffers and the
      num_views declared in shaders result in the appropriate errors after
      draw commands.
      
      The test takes 2 arguments, the number of framebuffer views and the
      number of views declared in the vertex shader. A glClear, triangle draw,
      and glFinish are performed, and the appropriate error is checked for.
      
      The test is run with a variety of arguments between 0 (non-multiview)
      and 3 (3 views).
      
      Tests between non-multiview and single multiview are omitted due to
      uncertainty or abiguity over whether a non multiview FB/shader counts as
      having 1 view or none?
      
      Signed-off-by: default avatarJames Hogan <james@albanarts.com>
      Acked-by: default avatarMarek Olšák <marek.olsak@amd.com>
      Part-of: <!987>
      1726b7de
    • James Hogan's avatar
      OVR_multiview: Add fb_read_errors test · 8fdd4b20
      James Hogan authored and Marge Bot's avatar Marge Bot committed
      
      Add a test that reading from a multiview framebuffer with multiple views
      produces an GL_INVALID_FRAMEBUFFER_OPERATION error as specified in the
      OVR_multiview spec, and that reading from a multiview framebuffer with
      only a single view does not produce an error.
      
      The cases tested are only those explicitly mentioned in the spec, namely
      glBlitFramebuffer, glReadPixels, glCopyTexImage2D, and
      glCopyTexSubImage2D.
      
      Signed-off-by: default avatarJames Hogan <james@albanarts.com>
      Acked-by: default avatarMarek Olšák <marek.olsak@amd.com>
      Part-of: <!987>
      8fdd4b20
    • James Hogan's avatar
      OVR_multiview[2]: Add triangle comparison test · 8a55cede
      James Hogan authored and Marge Bot's avatar Marge Bot committed
      
      Add a test to render a triangle to multiple layers of two textures,
      first using separate passes with glFramebufferTextureLayer() to the
      first texture, and then using a single multiview pass with
      glFramebufferTextureMultiviewOVR() to the second texture.
      
      The resulting texture layers are read back with glGetTexImage() and
      compared to verify that the multiview drawing gives the same result as
      equivalent separate passes.
      
      This tests the values of gl_ViewID_OVR when used for various things
      (including both OVR_multiview and OVR_multiview2 cases), baseViewIndex
      multiview draw behaviour, the use of multiview depth attachments, and
      display lists with multiview.
      
      The test is called with different arguments in order to test single
      view, stereo views, quad views, and max (GL_MAX_VIEWS_OVR) views, along
      with both zero and non-zero base layer, and one case of more layers
      after the multiview views.
      
      Depth attachment, display lists, and the OVR_multiview2 cases are tested
      with max views and both zero and non-zero base layer.
      
      v2: Add a couple more test cases, triangle_compare_max_base7 to catch
          the issue where views beyond layer 7 wouldn't get drawn to, and
          triangle_compare_max_basemax_layersmax to catch where only the first
          view would get drawn to when baseViewIndex >= 8, and to push the
          concept to the limit by maximising both views and baseViewIndex.
      
      Signed-off-by: default avatarJames Hogan <james@albanarts.com>
      Acked-by: default avatarMarek Olšák <marek.olsak@amd.com>
      Part-of: <!987>
      8a55cede
    • James Hogan's avatar
      OVR_multiview2: Add some basic shader tests · 8ced2cd1
      James Hogan authored and Marge Bot's avatar Marge Bot committed
      
      Add some basic shader tests for OVR_multiview2.
      
      The implied-ovr_multiview.{vert,frag} tests simply check that an
      OVR_multiview2 extension declaration enables the use of OVR_multiview.
      
      The other-static-dependence.vert test checks that a different output
      than gl_Position can statically depend on gl_ViewID_OVR when
      OVR_multiview2 is enabled.
      
      Signed-off-by: default avatarJames Hogan <james@albanarts.com>
      Acked-by: default avatarMarek Olšák <marek.olsak@amd.com>
      Part-of: <!987>
      8ced2cd1
    • James Hogan's avatar
      OVR_multiview: Add fb_attachment_params test · b6496586
      James Hogan authored and Marge Bot's avatar Marge Bot committed
      
      Add a test that reading the framebuffer attachment parameters described
      in the OVR_multiview spec give the appropriate values.
      
      A varied set of framebuffer attachments are configured:
       - COLOR_ATTACHMENT0: non-multiview, 2D
       - COLOR_ATTACHMENT1: non-multiview, 2D array, 1 layer (1)
       - COLOR_ATTACHMENT2: non-multiview, 2D array, all layers (0-3)
       - COLOR_ATTACHMENT3: multiview, 2D array, 1 layer (3)
       - COLOR_ATTACHMENT4: multiview, 2D array, 2 layers (1-2)
       - COLOR_ATTACHMENT5: non-multiview, 3D, 1 layer (3)
      
      Then the following parameters are read back and validated:
       - GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_BASE_VIEW_INDEX_OVR
       - GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_NUM_VIEWS_OVR
       - GL_FRAMEBUFFER_ATTACHMENT_LAYERED (if exists)
       - GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER
      
      Signed-off-by: default avatarJames Hogan <james@albanarts.com>
      Acked-by: default avatarMarek Olšák <marek.olsak@amd.com>
      Part-of: <!987>
      b6496586
    • James Hogan's avatar
      OVR_multiview: Add fb_incomplete_view_targets test · d16972fe
      James Hogan authored and Marge Bot's avatar Marge Bot committed
      
      Add a test for the additional conditions required for multiview
      framebuffer completeness in the OVR_multiview spec, namely that
      the number of views is the same for all populated attachments.
      
      We test completeness for each of a sequence of changes to the
      attachments using the glFramebufferTextureMultiviewOVR() function,
      covering multiple matching and mismatching combinations in depth,
      stencil, and several color attachments.
      
      Signed-off-by: default avatarJames Hogan <james@albanarts.com>
      Acked-by: default avatarMarek Olšák <marek.olsak@amd.com>
      Part-of: <!987>
      d16972fe
    • James Hogan's avatar
      OVR_multiview: Add fb_incomplete_view_range test · b18c2940
      James Hogan authored and Marge Bot's avatar Marge Bot committed
      
      Add a test for the additional conditions required for framebuffer
      multiview attachment completeness in the OVR_multiview spec, namely that
      all the selected layers are less than the layer count of the texture.
      
      We test with a 4 layer texture, and an attachment of layers 3-4 (which
      should be considered an incomplete attachment), and attachments of
      layers 0-2 and 2-3 (which should be considered complete).
      
      Signed-off-by: default avatarJames Hogan <james@albanarts.com>
      Acked-by: default avatarMarek Olšák <marek.olsak@amd.com>
      Part-of: <!987>
      b18c2940
    • James Hogan's avatar
      OVR_multiview: Add fb_texture_errors test · d164824e
      James Hogan authored and Marge Bot's avatar Marge Bot committed
      
      Add test that glFramebufferTextureMultiviewOVR generates the errors
      required by the OVR_multiview spec under the specified conditions, and
      doesn't generate them for several valid cases on the boundary.
      
      Signed-off-by: default avatarJames Hogan <james@albanarts.com>
      Acked-by: default avatarMarek Olšák <marek.olsak@amd.com>
      Part-of: <!987>
      d164824e
    • James Hogan's avatar
      OVR_multiview: Add an additional linker test · dbe5010c
      James Hogan authored and Marge Bot's avatar Marge Bot committed
      
      Add an additional linker test to ensure that multiple shaders with only
      a single num_view declaration will link even if the declaration is in
      the 2nd shader.
      
      Signed-off-by: default avatarJames Hogan <james@albanarts.com>
      Acked-by: default avatarMarek Olšák <marek.olsak@amd.com>
      Part-of: <!987>
      dbe5010c
  3. Feb 27, 2025
  4. Feb 20, 2025
  5. Feb 17, 2025
    • Iago Toral's avatar
      arb_direct_state_access: disable dithering · a8821ad3
      Iago Toral authored
      
      Dithering is enabled by default in OpenGL but the test checks for
      results assuming that no dithering is used.
      
      Fixes gettextureimage-formats with format RGB5A1 on Panfrost when
      the init-by-rendering parameter is used to initialize the texture by
      rendering:
      
      Panfrost uses an internal format with higher bit precision than
      RGB5A1 to represent the framebuffer for the texture. Particularly, it
      has more than 1 alpha bit and it will take advantage of that to apply
      dithering on the writeback when dithering is enabled, causing the alpha
      on the texture to have a dithered pattern and breaking the test
      expectation.
      
      Reviewed-by: default avatarAlejandro Piñeiro <apinheiro@igalia.com>
      Part-of: <!990>
      a8821ad3
  6. Feb 07, 2025
    • Mykhailo Skorokhodov's avatar
      arb_program_interface_query: set vs_input2[1][0] as valid name · efb2b6b4
      Mykhailo Skorokhodov authored
      
      ARB_program_interface_query, question 8:
      
      For GetProgramResourceIndex, what sort of strings can be used to match
      the resource names for arrays of arrays?  For example, let's say a
      shader declares a uniform such as:
      
      uniform vec4 a[3][4][5];
      
      Which one of the following names are accepted?  "a[2][1][0]" to
      identify the base of the bottom-level array?  "a[2][1]", to identify
      the same without the final "[0]"?  "a[2]", equivalent to "a[2][0][0]"?
      Just "a", equivalent to "a[0][0][0]"?
      
      RESOLVED:  We only accept entries of the form "a[2][1][0]" or
      "a[2][1]", which is consistent with the existing rules that only allow
      applications to omit the last index of a bottom-level array that has
      been rolled up.
      
      According to the resolution above, the possible names for
      vec4 vs_input2[2][2]; are:
      
      vs_input2[0]
      vs_input2[0][0]
      vs_input2[1]
      vs_input2[1][0]
      
      Signed-off-by: default avatarMykhailo Skorokhodov <mykhailo.skorokhodov@globallogic.com>
      Part-of: <!988>
      efb2b6b4
  7. Jan 25, 2025
  8. Jan 21, 2025
  9. Jan 17, 2025
  10. Jan 16, 2025
  11. Jan 15, 2025
    • Pierre-Eric Pelloux-Prayer's avatar
      glx: don't expect a glx error · 384d2b35
      Pierre-Eric Pelloux-Prayer authored
      
      The spec says BadMatch should be generated, which is a X error not a GLX one.
      
      The original code was only successful if "glx_error_code != -1" (= there
      was a GLX error) and "validate_glx_error_code(BadMatch, -1)" (= there was
      a X error and no GLX error) which is wrong.
      
      This commit the glx_error_code != -1 test, but still verifies that BadMatch
      is generated.
      
      This fixes this test on radeonsi (and probably other drivers).
      
      Reviewed-by: default avatarMarek Olšák <marek.olsak@amd.com>
      Part-of: <!981>
      384d2b35
  12. Jan 08, 2025
  13. Dec 13, 2024
  14. Dec 09, 2024
  15. Nov 28, 2024
  16. Nov 20, 2024
  17. Nov 13, 2024
  18. Nov 11, 2024
  19. Nov 07, 2024
  20. Nov 06, 2024
  21. Oct 24, 2024
    • Mike Blumenkrantz's avatar
      framework: call destroy directly instead of using atexit · c2b31333
      Mike Blumenkrantz authored
      There are two possible factories:
      * `piglit_fbo_framework_create` has a `destroy` function which is called inline in `run_test` before `piglit_report_result`, so this shouldn't need an atexit
      * `piglit_winsys_framework_init` has no destroy function, so there is nothing to call
      
      by adding a hook to be called directly by `piglit_report_result`, the whole
      atexit thing can be avoided, and instead `piglit_report_result` can just call
      the fbo framework destructor as needed
      
      Part-of: <!966>
      c2b31333
Loading