protonscr

test_advanced_cbv_layout failing on Intel/Anv

vkd3dclosed
HansKristian-Work/vkd3d-proton#1560 · opened 2023-05-17 by djdeath · updated 2023-05-19 · 4 comments · github
Ddjdeath 2023-05-17 github

vkd3d-proton upstream (17-05-2023)

Just using the test suite, test_advanced_cbv_layout is failing on Intel.
It seems the failing is in d3d12_device_validate_shader_meta on this line :

    if ((meta->flags & VKD3D_SHADER_META_FLAG_USES_FP64) && !device->d3d12_caps.options.DoublePrecisionFloatShaderOps)
    {
        WARN("Attempting to use FP64 operations in shader %016"PRIx64", but this is not supported.", meta->hash);
        return false;
    }

Now the shader being compiled doesn't seem to have any FP64 values/types :

cbuffer Cbuf : register(b0)
{
    uint64_t4 values_root[8];
};

cbuffer Cbuf : register(b0, space1)
{
    uint64_t4 values_table[8];
};

RWStructuredBuffer<uint> RWBuf : register(u0);

uint pack4(uint4 v)
{
    return v.x | (v.y << 8) | (v.z << 16) | (v.w << 24);
}

[numthreads(8, 1, 1)]
void main(uint thr : SV_DispatchThreadID)
{
    uint64_t4 v = values_root[thr] + values_table[thr];
    uint4 lo = uint4(v);
    uint4 hi = uint4(v >> 32);
    RWBuf[2 * thr + 0] = pack4(lo);
    RWBuf[2 * thr + 1] = pack4(hi);
}

Is the dxil/dxc compiler introducing fp64 operations?

System information

  • GPU: Intel DG2 A750
  • Driver: Upstream Mesa/Anv
  • Wine version: N/A
  • VKD3D-Proton version: ff665a37352a477a780619e196706576484220bd
Ddjdeath 2023-05-17 github

Intel GPUs between Icelake & DG2 don't have FP64 support.

FP64 is coming back with Meteorlake.

Sshadeslayer 2023-05-18 github

Looks like test_denorm_behavior_dxbc exercises similar functionality and fails to create the compute queue on my Tigerlake machine

HHansKristian-Work maintainer 2023-05-19 github

Bug seems to be that dxil-spirv emits float aliases instead of uint aliases for 16-bit/64-bit, so the uint becomes double, and ends up falsely requiring Float64.

HHansKristian-Work maintainer 2023-05-19 github

The denorm failure is a bogus check where it should have checked for FP64 support, not Int64 support.

Launch options