[Bug 104602] [apitrace] Graphical artifacts in Civilization VI on RX Vega

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Comment # 17 on bug 104602 from
After talking this over with Marek here is a summary of the problem.

LLVM's VGPR indexing code on gfx9+ is broken for immediate arrays. Usually this
is not a problem as GLSL IR in mesa will lower these to Uniforms via
lower_const_arrays_to_uniforms(). However this does not work for the shaders in
Civ6 because these arrays are not actually defined as constant arrays for
example the original shader looks like this:

        vec4 x0[3];
        vec4 x1[6];
        vec4 x2[6];
        vec4 x3[6];

        x0[0].xy = vec2(0.031250, 0.500000);
        x0[1].xy = vec2(0.968750, 0.031250);
        x0[2].xy = vec2(0.968750, 0.968750);
        x1[0].xy = vec2(1.000000, 1.000000);
        x1[1].xy = vec2(0.000000, 1.000000);
        x1[2].xy = vec2(-1.000000, 0.000000);
        x1[3].xy = vec2(-1.000000, -1.000000);
        x1[4].xy = vec2(0.000000, -1.000000);
        x1[5].xy = vec2(1.000000, 0.000000);
        x2[0].xy = vec2(1.000000, -1.000000);
        x2[1].xy = vec2(2.000000, 1.000000);
        x2[2].xy = vec2(1.000000, 2.000000);
        x2[3].xy = vec2(-1.000000, 1.000000);
        x2[4].xy = vec2(-2.000000, -1.000000);
        x2[5].xy = vec2(-1.000000, -2.000000);

Without SSA I don't see any way for GLSL IR to easily recognise this as a
constant array. Unfortunately by the time LLVM is done it is recognised and is
exposed to the buggy indexing support.


You are receiving this mail because:
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel

[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux