1. 28 Apr, 2021 1 commit
  2. 08 Apr, 2021 1 commit
    • chadversary's avatar
      vulkan: Track dependencies of Python imports · 0845cabc
      chadversary authored
      
      
      The meson.build was unaware of transitive dependencies introduced by
      Python imports.
      
      Android still needs fixing. But I did not update the Android files lest
      I break the build.
      
      Ideally, we would fix this by using a Python runner that generates
      a depfile, similar to how meson creates depfiles for C files by passing
      flags -MD -MQ -MF to gcc. But this patch gets the job done, without
      stalling on the ideal general solution, by manually tracking the Python
      imports in new 'foo_depend_files' variables.
      
      CC: mesa-stable@lists.freedesktop.org
      Reviewed-by: Jason Ekstrand's avatarJason Ekstrand <jason@jlekstrand.net>
      Part-of: <!1466>
      0845cabc
  3. 17 Mar, 2021 1 commit
  4. 01 Feb, 2021 2 commits
  5. 25 Nov, 2020 1 commit
  6. 11 Nov, 2020 1 commit
    • Steven Houston's avatar
      v3dv: VK_KHR_display extension support · d6a8a6ed
      Steven Houston authored
      
      
      When VK_KHR_display is enabled it needs to open the primary
      node on the vc4/vc5 display device, so pass it to
      physical_device_init().
      Extension functions call through to the wsi_common_display.c
      implementations.
      
      v2: Follow Mesa conventions for comments and char *
          Refer to vc4 display device in comments.
      v3: Added Copyright © 2020 Raspberry Pi
      v4: Test device has primary node when using simulator.
      v5: Assert that we have a primary device. Fix trailing blank space.
      Reviewed-by: Iago Toral's avatarIago Toral Quiroga <itoral@igalia.com>
      Closes: #3692
      Part-of: <!7515>
      d6a8a6ed
  7. 13 Oct, 2020 22 commits
    • Alejandro Piñeiro's avatar
      v3dv: add v3dv_limits file · 947fa703
      Alejandro Piñeiro authored
      There are several definitions for hw limits on v3dv_image that we want
      to share, but v3dv_private was already growing bigger and messier.
      
      So let's move them to a specific header. Note that there is already a
      broadcom/common/v3d_limits.h. We are not putting them there because
      right now they are only used by the Vulkan driver, but are candidates
      to be moved.
      
      Part-of: <!6766>
      947fa703
    • Alejandro Piñeiro's avatar
      v3dv/device: proper pipeline cache uuid · fd70e8e0
      Alejandro Piñeiro authored
      Part-of: <!6766>
      fd70e8e0
    • Iago Toral's avatar
      v3dv: implement occlusion queries · 53657b0c
      Iago Toral authored
      The design for queries in Vulkan requires that some commands execute
      in the GPU as part of a command buffer. Unfortunately, V3D doesn't
      really have supprt for this, which means that we need to execute them
      in the CPU but we still need to make it look as if they happened
      inside the comamnd buffer from the point of view of the user, which
      adds certain hassle.
      
      The above means that in some cases we need to do CPU waits for certain
      parts of the command buffer to execute so we can then run the CPU
      code. For exmaple, we need to wait before executing a query resets
      just in case the GPU is using them, and we have to do a CPU wait wait
      for previous GPU jobs to complete before copying query results if the
      user has asked us to do that. In the future, we may want to have
      submission thread instead so we don't block the main thread in these
      scenarios.
      
      Because we now need to execute some tasks in the CPU as part of a
      command buffer, this introduces the concept of job types, there is one
      type for all GPU jobs, and then we have one type for each kind of job
      that needs to execute in the CPU. CPU jobs are executed by the queue
      in order just like GPU jobs, only that they are exclusively CPU tasks.
      
      Part-of: <!6766>
      53657b0c
    • Iago Toral's avatar
      v3dv: implement vkCmdClearAttachments · f4878889
      Iago Toral authored
      For now this only implements a fast path using the tile buffer, so it
      can only be used when clearing full images, but this is good enough
      for VkRunner.
      
      The implementation is a bit tricky because this command executes
      inside a render pass, and yet, since we are using the tile buffer to
      clear, this needs to go in its own job. This means that with this, we
      need to be able to split a subpass into multiple jobs which creates
      some issues.
      
      For example, certain operations, such as the subpass load operation
      (particularly if it is a clear) should only happen on the first job of
      the subpass and subsequent jobs in the same subpass should always
      load.
      
      Similarly, we should not discard the last store on an attachment
      unless we know it is the last job for the last subpass that uses the
      attachment.
      
      To handle these cases we add two new flags to the job, one to know if
      the job is not the first in a subpass (is_subpass_continue) and
      another one to know if a job is the last in a subpass
      (is_subpass_finish).
      
      Part-of: <!6766>
      f4878889
    • Alejandro Piñeiro's avatar
      v3dv: stubs for Create/DestroyPipelineCache · 6cac991d
      Alejandro Piñeiro authored
      Good enough to avoid vkrunner crashing.
      
      Part-of: <!6766>
      6cac991d
    • Iago Toral's avatar
      v3dv: hook up WSI support · 6ab4c51d
      Iago Toral authored
      Part-of: <!6766>
      6ab4c51d
    • Alejandro Piñeiro's avatar
      v3dv: add v3dv_write_uniforms · 2b02117e
      Alejandro Piñeiro authored
      Initial port of the equivalent v3d_write_uniforms, to be used by the
      cmd_buffer when emitting the drawing packets.
      
      Initially doesn't include all the quniform types, only those needed by
      the initial basic vulkan tests.
      
      Part-of: <!6766>
      2b02117e
    • Alejandro Piñeiro's avatar
      v3dv: clif format dumping support · e252e536
      Alejandro Piñeiro authored
      Add support for V3D_DEBUG=clif. Useful to compare clif_dumps from
      vulkan small-programs and the equivalent opengl ones.
      
      As we are here we expand clif_dump_packet wrapper to use
      v3d42_clif_dump_packet if needed, as the vulkan driver would use that
      packet version.
      
      Part-of: <!6766>
      e252e536
    • Alejandro Piñeiro's avatar
      v3dv: initial CreateGraphicsPipeline/DestroyPipeline implementation · 60145629
      Alejandro Piñeiro authored
      The basic to get the spirv built to nir, including calling some common
      nir passes. Pending deep review if all those are needed or if we miss
      some, but for that it would be better to be able to run existing
      tests.
      
      Enough to get assembly generated for simple tests.
      
      Part-of: <!6766>
      60145629
    • Iago Toral's avatar
      v3dv: add a few more API stubs · 52d9b8c0
      Iago Toral authored
      Part-of: <!6766>
      52d9b8c0
    • Iago Toral's avatar
      v3dv: add a concept of a command list · 9ac32610
      Iago Toral authored
      Just barebones for now, will expand as necessary as we start emitting
      actual commands into command lists.
      
      Part-of: <!6766>
      9ac32610
    • Iago Toral's avatar
      v3dv: create a v3dv_bo struct and reference it from v3dv_device_memory · dc005f26
      Iago Toral authored
      So we have a lower level representation of a buffer object that we can
      manipulate that is not tied to a Vulkan representation of memory. This
      will be useful as we start allocating driver internal buffers, such as
      command lists.
      
      Part-of: <!6766>
      dc005f26
    • Iago Toral's avatar
      v3dv: implement vkCreateCommandPool · 1d8d8c06
      Iago Toral authored
      Part-of: <!6766>
      1d8d8c06
    • Iago Toral's avatar
      v3dv: implement vkCreateRenderPass · cdba5361
      Iago Toral authored
      Part-of: <!6766>
      cdba5361
    • Alejandro Piñeiro's avatar
      v3dv: stubs for graphics pipeline methods · a201c450
      Alejandro Piñeiro authored
      Part-of: <!6766>
      a201c450
    • Alejandro Piñeiro's avatar
      v3dv/debug: add v3dv_debug · 46fa01f4
      Alejandro Piñeiro authored
      Note that for the Vulkan driver we are also reusing v3d_debug.h. This
      file is for debug utilities exclusive to the Vulkan driver.
      
      Part-of: <!6766>
      46fa01f4
    • Iago Toral's avatar
      v3dv: implement vkCreateImage · 0fcce6c3
      Iago Toral authored
      This relies heavily in infrastructure taken from the v3d driver. We should
      probably look for ways to share the code between both drivers by creating
      a surface layout library that we can use from both, or at least moving
      parts of the v3d driver to broadcom/common. Specifically:
      
      We take v3d_tiling.c, which requires gallium's pipe_box type for some
      helper functions that we don't quite need yet.
      
      We copied and adapted bits of v3d_resource.c into v3dv_image.c, however,
      it should be possible to look for ways to reuse the code instead of
      duplicating it.
      
      Pre-compute UIF padding into the slice setup. This is different from
      what we do in v3d (we do this at cerate_surface time), but it is
      more convenient for us to pre-calculate it here for all mipmap
      slices.
      
      Part-of: <!6766>
      0fcce6c3
    • Iago Toral's avatar
    • Alejandro Piñeiro's avatar
      v3dv: add support to use v3d simulator · 4e88e2d4
      Alejandro Piñeiro authored
      v2: use spaces on both sides of ':'
      
      Part-of: <!6766>
      4e88e2d4
    • Iago Toral's avatar
      v3dv: implement vkCreateInstance · be1575c6
      Iago Toral authored
      Part-of: <!6766>
      be1575c6
    • Iago Toral's avatar
      v3dv: add support for valgrind macros · 20363b0b
      Iago Toral authored
      Part-of: <!6766>
      20363b0b
    • Alejandro Piñeiro's avatar
      v3dv: add v3d vulkan driver skeleton · e5034f0d
      Alejandro Piñeiro authored
      
      
      Initial commit, mostly a import of the minimum from anv/radv to get a
      skeleton to start to work with.
      
      In includes:
       * meson files
       * Copy & adapt entrypoints ane extensions scripts from anv (that were
         later used on radv)
      
      This is a firt approach, but is is likely that we can remove/simplify
      some things.
      
      v2: fix copyright character at broadcom/vulkan/meson.build (Eric)
      v3: no spaces inside arrays (Dylan)
      v4: add gnu_symbol_visibility (detected by CI on first Merge attemp)
      Reviewed-by: Emma Anholt's avatarEric Anholt <eric@anholt.net>
      
      squash! v3dv: add v3d vulkan driver skeleton
      
      Part-of: <!6766>
      e5034f0d