protonscr

Loss of ROV information from Dxvk to SPIRV

dxvkclosed invalid
doitsujin/dxvk#3232 · opened 2023-02-01 by ecoling · updated 2023-02-09 · 1 comments · github
Eecoling 2023-02-01 github

shader is as follow, when compile to SPIRV, the ROV info is loss.

RasterizerOrderedStructuredBuffer rovBuffer : register(u1);
struct PSIn
{
float4 pos : SV_Position;
float4 clr : COLOR;
};

struct PSOut
{
float4 c0 : color;
};

PSOut main(PSIn input)
{
PSOut output;
uint x = floor(input.pos.x);
uint y = floor(input.pos.y);
uint addr = x * 64 + y;

for(int i = 0; i < 1; ++i)
{
    uint value = rovBuffer[addr];
    rovBuffer[addr] = value + 1;
}

output.c0.r=1.0f;
output.c0.g=1.0f;
output.c0.b=0.5f;
output.c0.a=1.0f;
return output;

}

Ddoitsujin maintainer 2023-02-01 github

I'm not really sure what you mean with "is lost". Assuming you're using DXVK 2.0 or newer, we emit shader interlock instructions around the entire main function (which isn't optimal, but is a valid way to implement this feature).

Nothing extracted yet.