Skip to content
Permalink
Branch: master
Commits on Dec 5, 2018
  1. radv: Flush before vkCmdWriteTimestamp() if needed

    aejsmith committed Dec 5, 2018
    As done for vkCmdBeginQuery() already. Prevents timestamps from being
    overwritten by previous vkCmdResetQueryPool() calls if the shader path
    was used to do the reset.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108925
    Fixes: a41e2e9 ("radv: allow to use a compute shader for resetting the query pool")
    Signed-off-by: Alex Smith <asmith@feralinteractive.com>
    Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Commits on Oct 26, 2018
  1. anv: Fix sanitization of stencil state when the depth test is disabled

    aejsmith committed Oct 25, 2018
    When depth testing is disabled, we shouldn't pay attention to the
    specified depthCompareOp, and just treat it as always passing. Before,
    if the depth test is disabled, but depthCompareOp is VK_COMPARE_OP_NEVER
    (e.g. from the app having zero-initialized the structure), then
    sanitize_stencil_face() would have incorrectly changed passOp to
    VK_STENCIL_OP_KEEP.
    
    v2: Roll the depthTestEnable check into the ds_aspect check below since
        they now both do the same thing.
    
    Fixes: 028e113 "anv/pipeline: Be smarter about depth/stencil state"
    Signed-off-by: Alex Smith <asmith@feralinteractive.com>
    Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Commits on Oct 24, 2018
  1. anv: Allow presenting via a different GPU

    aejsmith committed Oct 18, 2018
    anv_GetPhysicalDeviceSurfaceSupportKHR will already return success for
    this, but anv_GetPhysicalDevice{Xcb,Xlib}PresentationSupportKHR do not.
    Apps which check for presentation support via the latter (all Feral
    Vulkan games at least) will therefore fail.
    
    This allows me to render on an Intel GPU and present to a display
    connected to an AMD card (tested HD 530 + Vega 64).
    
    v2: Rebase on current master.
    
    Signed-off-by: Alex Smith <asmith@feralinteractive.com>
    Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Commits on Oct 16, 2018
  1. ac/nir: Use context-specific LLVM types

    aejsmith committed Oct 15, 2018
    LLVMInt*Type() return types from the global context and therefore are
    not safe for use in other contexts. Use types from our own context
    instead.
    
    Fixes frequent crashes seen when doing multithreaded pipeline creation.
    
    Fixes: 4d0b02b "ac: add support for 16bit load_push_constant"
    Fixes: 7e7ee82 "ac: add support for 16bit buffer loads"
    Cc: "18.2" <mesa-stable@lists.freedesktop.org>
    Signed-off-by: Alex Smith <asmith@feralinteractive.com>
    Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
    Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Commits on Jul 23, 2018
  1. anv: Pay attention to VK_ACCESS_MEMORY_(READ|WRITE)_BIT

    aejsmith committed Jul 20, 2018
    According to the spec, these should apply to all read/write access
    types (so would be equivalent to specifying all other access types
    individually). Currently, they were doing nothing.
    
    v2: Handle VK_ACCESS_MEMORY_WRITE_BIT in dstAccessMask.
    
    Signed-off-by: Alex Smith <asmith@feralinteractive.com>
    Cc: mesa-stable@lists.freedesktop.org
    Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
    Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Commits on Jun 1, 2018
  1. radeonsi: Fix crash on shaders using MSAA image load/store

    aejsmith committed May 30, 2018
    The value returned by tgsi_util_get_texture_coord_dim() does not
    account for the sample index. This means image_fetch_coords() will not
    fetch it, leading to a null deref in ac_build_image_opcode() which
    expects it to be present (the return value of ac_num_coords() *does*
    include the sample index).
    
    Signed-off-by: Alex Smith <asmith@feralinteractive.com>
    Cc: "18.1" <mesa-stable@lists.freedesktop.org>
    Reviewed-by: Marek Olšák <marek.olsak@amd.com>
  2. radv: Handle GFX9 merged shaders in radv_flush_constants()

    aejsmith committed May 31, 2018
    This was not previously handled correctly. For example,
    push_constant_stages might only contain MESA_SHADER_VERTEX because
    only that stage was changed by CmdPushConstants or
    CmdBindDescriptorSets.
    
    In that case, if vertex has been merged with tess control, then the
    push constant address wouldn't be updated since
    pipeline->shaders[MESA_SHADER_VERTEX] would be NULL.
    
    Use radv_get_shader() instead of getting the shader directly so that
    we get the right shader if merged. Also, skip emitting the address
    redundantly - if two merged stages are set in push_constant_stages
    this change would have made the address get emitted twice.
    
    Signed-off-by: Alex Smith <asmith@feralinteractive.com>
    Cc: "18.1" <mesa-stable@lists.freedesktop.org>
    Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
  3. radv: Consolidate GFX9 merged shader lookup logic

    aejsmith committed May 31, 2018
    This was being handled in a few different places, consolidate it into a
    single radv_get_shader() function.
    
    Signed-off-by: Alex Smith <asmith@feralinteractive.com>
    Cc: "18.1" <mesa-stable@lists.freedesktop.org>
    Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
  4. radv: Set active_stages the same whether or not shaders were cached

    aejsmith committed May 31, 2018
    With GFX9 merged shaders, active_stages would be set to the original
    stages specified if shaders were not cached, but to the stages still
    present after merging if they were.
    
    Be consistent and use the original stages.
    
    Signed-off-by: Alex Smith <asmith@feralinteractive.com>
    Cc: "18.1" <mesa-stable@lists.freedesktop.org>
    Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Commits on Mar 14, 2018
  1. radv: Fix CmdCopyImage between uncompressed and compressed images

    aejsmith committed Mar 12, 2018
    From the spec:
    
        "When copying between compressed and uncompressed formats the
         extent members represent the texel dimensions of the source
         image and not the destination."
    
    However, as per 7b890a3, we must still use the destination image type
    when clamping the extent so that we copy the correct number of layers
    for 2D to 3D copies.
    
    Fixes: 7b890a3 "radv: Fix vkCmdCopyImage for 2d slices into 3d Images"
    Cc: <mesa-stable@lists.freedesktop.org>
    Signed-off-by: Alex Smith <asmith@feralinteractive.com>
    Reviewed-by: Dave Airlie <airlied@redhat.com>
Commits on Jan 11, 2018
  1. anv: Make sure state on primary is correct after CmdExecuteCommands

    aejsmith committed Jan 9, 2018
    After executing a secondary command buffer, we need to update certain
    state on the primary command buffer to reflect changes by the secondary.
    Otherwise subsequent commands may not have the correct state set.
    
    This fixes various issues (rendering errors, GPU hangs) seen after
    executing secondary command buffers in some cases.
    
    v2 (Jason Ekstrand):
     - Reset to invalid values instead of pulling from the secondary
     - Change the comment to be more descriptive
    
    Signed-off-by: Alex Smith <asmith@feralinteractive.com>
    Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
    Cc: mesa-stable@lists.freedesktop.org
Commits on Jan 8, 2018
  1. anv: Allow PMA optimization to be enabled in secondary command buffers

    aejsmith committed Jan 5, 2018
    This was never enabled in secondary buffers because hiz_enabled was
    never set to true for those.
    
    If the app provides a framebuffer in the inheritance info when beginning
    a secondary buffer, we can determine if HiZ is enabled and therefore
    allow the PMA optimization to be enabled within the command buffer.
    
    This improves performance by ~13% on an internal benchmark on Skylake.
    
    v2: Use anv_cmd_buffer_get_depth_stencil_view().
    
    Signed-off-by: Alex Smith <asmith@feralinteractive.com>
    Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
    Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Commits on Jan 5, 2018
  1. anv: Take write mask into account in has_color_buffer_write_enabled

    aejsmith committed Jan 4, 2018
    If we have a color attachment, but its writes are masked, this would
    have still returned true. This is inconsistent with how HasWriteableRT
    in 3DSTATE_PS_BLEND is set, which does take the mask into account.
    
    This could lead to PixelShaderHasUAV not being set in 3DSTATE_PS_EXTRA
    if the fragment shader does use UAVs, meaning the fragment shader may
    not be invoked because HasWriteableRT is false. Specifically, this was
    seen to occur when the shader also enables early fragment tests: the
    fragment shader was not invoked despite passing depth/stencil.
    
    Fix by taking the color write mask into account in this function. This
    is consistent with how things are done on i965.
    
    Signed-off-by: Alex Smith <asmith@feralinteractive.com>
    Cc: mesa-stable@lists.freedesktop.org
    Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
    Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Commits on Jan 4, 2018
  1. anv: Add missing unlock in anv_scratch_pool_alloc

    aejsmith committed Jan 4, 2018
    Fixes hangs seen due to the lock not being released here.
    
    Signed-off-by: Alex Smith <asmith@feralinteractive.com>
    Cc: mesa-stable@lists.freedesktop.org
    Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
    Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Commits on Dec 7, 2017
  1. radv: Add LLVM version to the device name string

    aejsmith committed Dec 6, 2017
    Allows apps to determine the LLVM version so that they can decide
    whether or not to enable workarounds for LLVM issues.
    
    Signed-off-by: Alex Smith <asmith@feralinteractive.com>
    Cc: "17.2 17.3" <mesa-stable@lists.freedesktop.org>
    Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
    Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Commits on Nov 13, 2017
  1. nir/spirv: tg4 requires a sampler

    aejsmith committed Nov 7, 2017
    Gather operations in both GLSL and SPIR-V require a sampler. Fixes
    gathers returning garbage when using separate texture/samplers (on AMD,
    was using an invalid sampler descriptor).
    
    Signed-off-by: Alex Smith <asmith@feralinteractive.com>
    Cc: "17.2 17.3" <mesa-stable@lists.freedesktop.org>
    Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
  2. spirv: Use correct type for sampled images

    aejsmith committed Nov 6, 2017
    We should use the result type of the OpSampledImage opcode, rather than
    the type of the underlying image/samplers.
    
    This resolves an issue when using separate images and shadow samplers
    with glslang. Example:
    
        layout (...) uniform samplerShadow s0;
        layout (...) uniform texture2D res0;
        ...
        float result = textureLod(sampler2DShadow(res0, s0), uv, 0);
    
    For this, for the combined OpSampledImage, the type of the base image
    was being used (which does not have the Depth flag set, whereas the
    result type does), therefore it was not being recognised as a shadow
    sampler. This led to the wrong LLVM intrinsics being emitted by RADV.
    
    Signed-off-by: Alex Smith <asmith@feralinteractive.com>
    Cc: "17.2 17.3" <mesa-stable@lists.freedesktop.org>
    Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Commits on Oct 30, 2017
  1. radv: Fix -Wformat-security issue

    aejsmith authored and hakzsam committed Oct 30, 2017
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103513
    Fixes: de88979 ("radv: Implement VK_AMD_shader_info")
    Signed-off-by: Alex Smith <asmith@feralinteractive.com>
    Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
    Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Commits on Oct 28, 2017
  1. radv: Implement VK_AMD_shader_info

    aejsmith authored and BNieuwenhuizen committed Oct 27, 2017
    This allows an app to query shader statistics and get a disassembly of
    a shader. RenderDoc git has support for it, so this allows you to view
    shader disassembly from a capture.
    
    When this extension is enabled on a device (or when tracing), we now
    disable pipeline caching, since we don't get the shader debug info when
    we retrieve cached shaders.
    
    v2: Improvements to resource usage reporting
    v3: Disassembly string must be null terminated (string_buffer's length
        does not include the terminator)
    v4: Fixed LDS reporting. (Bas)
    
    Signed-off-by: Alex Smith <asmith@feralinteractive.com>
    Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Commits on Oct 25, 2017
  1. vulkan: Update headers and registry to 1.0.64

    aejsmith authored and airlied committed Oct 25, 2017
    Acked-by: Dave Airlie <airlied@redhat.com>
    Signed-off-by: Alex Smith <asmith@feralinteractive.com>
Commits on Oct 23, 2017
  1. radv: Update code pointer correctly if a variant is already created

    aejsmith authored and BNieuwenhuizen committed Oct 23, 2017
    This was the actual cause of GPU hangs fixed by 0fdd531 ("radv:
    Fix pipeline cache locking issues"), since multiple threads would end
    up trying to create the variants for a single entry.
    
    Now that we're locking around the whole of this function, this isn't
    really necessary (we either create all or none of the variants), but
    fix this anyway in case things change later.
    
    Signed-off-by: Alex Smith <asmith@feralinteractive.com>
    Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
    CC: 17.3 <mesa-stable@lists.freedesktop.org>
Commits on Oct 21, 2017
  1. radv: Fix pipeline cache locking issues

    aejsmith authored and BNieuwenhuizen committed Oct 19, 2017
    Need to lock around the whole process of retrieving cached shaders, and
    around GetPipelineCacheData.
    
    This fixes GPU hangs observed when creating multiple pipelines in
    parallel, which appeared to be due to invalid shader code being pulled
    from the cache.
    
    Signed-off-by: Alex Smith <asmith@feralinteractive.com>
    Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Commits on Oct 18, 2017
  1. radv: Set active_stages after getting cached shaders

    aejsmith authored and BNieuwenhuizen committed Oct 18, 2017
    Fixes: 7d45d22 ("radv: switch to using radv_create_shaders()")
    Signed-off-by: Alex Smith <asmith@feralinteractive.com>
    Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
  2. radv: Don't free NIR shaders if tracing

    aejsmith authored and BNieuwenhuizen committed Oct 18, 2017
    Fixes a crash while generating a hang report.
    
    Fixes: 7d45d22 ("radv: switch to using radv_create_shaders()")
    Signed-off-by: Alex Smith <asmith@feralinteractive.com>
    Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
    Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Commits on Oct 10, 2017
  1. radv: Add R16G16B16A16_SNORM fast clear support

    aejsmith authored and airlied committed Oct 10, 2017
    Signed-off-by: Alex Smith <asmith@feralinteractive.com>
    Cc: "17.2" <mesa-stable@lists.freedesktop.org>
    Signed-off-by: Dave Airlie <airlied@redhat.com>
Commits on Aug 7, 2017
  1. radv: Fix decompression on multisampled depth buffers

    aejsmith authored and BNieuwenhuizen committed Aug 3, 2017
    Need to take the sample count into account in the depth decompress and
    resummarize pipelines and render pass.
    
    Fixes: f4e499e ("radv: add initial non-conformant radv vulkan driver")
    Signed-off-by: Alex Smith <asmith@feralinteractive.com>
    Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
    Cc: "17.2" <mesa-stable@lists.freedesktop.org>
Commits on Jul 21, 2017
  1. radv: Generate storage image descriptors unconditionally

    aejsmith authored and airlied committed Jul 21, 2017
    We can also use storage images internally for resolves, which don't
    require TRANSFER_DST usage on the image, so currently we may not create
    the needed descriptors.
    
    Just create these descriptors unconditionally.
    
    Fixes: 0e1886e ("radv: Fix descriptors for cube images with VK_IMAGE_USAGE_STORAGE_BIT")
    Reported-by: Grazvydas Ignotas <notasas@gmail.com>
    Signed-off-by: Alex Smith <asmith@feralinteractive.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>
Commits on Jul 18, 2017
  1. radv: Set the RADEON_SURF_OPTIMIZE_FOR_SPACE flag for images

    aejsmith authored and airlied committed Jul 17, 2017
    This looks like a regression from df30123 ("radv: use
    ac_compute_surface"). Before that, the opt4Space addrlib flag was set
    to true unless the image has FMASK (ac_compute_surface will similarly
    only set that flag for images without FMASK).
    
    This saves multiple gigabytes of VRAM on one of our games, and brings
    its VRAM utilisation on RADV in line with AMDGPU-PRO and NVIDIA.
    
    Signed-off-by: Alex Smith <asmith@feralinteractive.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>
Commits on Jul 12, 2017
  1. radv: Fix descriptors for cube images with VK_IMAGE_USAGE_STORAGE_BIT

    aejsmith authored and BNieuwenhuizen committed Jul 12, 2017
    If a cube image has VK_IMAGE_USAGE_STORAGE_BIT set, the type in an image
    view's descriptor was set to a 2D array (and a few other fields adjusted
    accordingly). This is correct when the image view is actually bound as a
    storage image, but not when bound as a sampled image. In that case the
    type should be set as a cube.
    
    Fix by generating 2 sets of descriptors at view creation time for both
    storage and non-storage usage, and then choose between them based on
    descriptor type when writing descriptor sets.
    
    v2: Generate storage descriptors for images with TRANSFER_DST, since
        those may be used as storage images internally.
    
    Signed-off-by: Alex Smith <asmith@feralinteractive.com>
    Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
  2. radv: Fix possible invalid free of dynamic descriptors

    aejsmith authored and BNieuwenhuizen committed Jul 12, 2017
    This free was left in after dynamic descriptors were changed to not be
    allocated separately from the descriptor set, and can cause a crash.
    
    Fixes: 39644fa ("radv: Don't allocate dynamic descriptors separately")
    Signed-off-by: Alex Smith <asmith@feralinteractive.com>
    Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Commits on Jul 6, 2017
  1. ac/nir: Fix ordering of parameters for image atomic cmpswap intrinsics

    aejsmith authored and BNieuwenhuizen committed Jun 30, 2017
    The NIR parameters are ordered "compare, data", matching GLSL, but both
    the image and buffer LLVM intrinsics take them the other way around.
    This is already handled correctly for SSBO atomics.
    
    Signed-off-by: Alex Smith <asmith@feralinteractive.com>
    Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
    Fixes: f4e499e "radv: add initial non-conformant radv vulkan driver"
Commits on Jun 28, 2017
  1. ac/nir: Use correct LLVM intrinsics for atomic ops on imageBuffers

    aejsmith authored and BNieuwenhuizen committed Jun 26, 2017
    The buffer intrinsics should be used instead of the image ones.
    
    Signed-off-by: Alex Smith <asmith@feralinteractive.com>
    Cc: <mesa-stable@lists.freedesktop.org>
    Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Commits on Jun 6, 2017
  1. anv: Set better descriptor set limits

    aejsmith authored and jekstrand committed Jun 5, 2017
    Based on discussions with Jason, Ivy Bridge and Bay Trail only actually
    support 16 samplers, while newer hardware can support more than the
    current limit of 64. Therefore set the lower limit where needed, and
    bump up to 128 for everything else. There is also a limit on the total
    number of other resources of around 250.
    
    This allows Dawn of War III to render correctly on ANV.
    
    Signed-off-by: Alex Smith <asmith@feralinteractive.com>
    Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
  2. anv: Set driver version to Mesa version

    aejsmith authored and jekstrand committed Jun 6, 2017
    As already done by RADV.
    
    v2: Move version calculation function to src/vulkan/util to share with
        RADV.
    
    Signed-off-by: Alex Smith <asmith@feralinteractive.com>
    Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
    Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
    Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
  3. radv/vulkan: Move radv_get_driver_version to src/vulkan/util

    aejsmith authored and jekstrand committed Jun 6, 2017
    This means it can be reused for other Vulkan drivers. Also fix up a
    typo, need to search for '.' in the version string rather than ','.
    
    v2: Remove unneeded temporary version variable (Emil, Eric)
    
    Signed-off-by: Alex Smith <asmith@feralinteractive.com>
    Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
    Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
    Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Older
You can’t perform that action at this time.