Closed lbavoil closed 10 years ago
A fix has been pushed, Could you verify it fixes your problem?
Thanks! Would it be possible for you to also solve issue #23? Right now I am not able to test with the latest version from main because my shaders produce corruption due to issue #23.
I have tried the latest version (which includes your fix) and this particular DXASM instruction is now compiled differently, but still incorrectly. I am now getting this:
" Temp_int[0].xyw = floatBitsToInt(texelFetch(g_t1, ivec2((Temp_int[3]).xy), int(0x0)).xywz.xyz);\n"
But the output should be:
" Temp_int[0].xyw = floatBitsToInt(texelFetch(g_t1, ivec2((Temp_int[3]).xy), int(0x0)).xywz.xyw);\n"
FYI, here is what the instruction is in the HLSL:
"float3 N = Texture.Load(int3(IN.pos.xy, 0)).xyz;"
The dest mask controls which components in the dest are updated and in this case it wants to update xyw not xyz. So r0.xyw, r3.xyzw, t1.xywz means r0.xyw = vec3( sample(t1, r3.xy).xywz).xyw ) ignoring zw on r3 because this a 2D texture Fix pushed.
I have verified that the issue is now fixed. Closing.
This DXASM instruction: ld_indexable(texture2d)(float,float,float,float) r0.xyw, r3.xyzw, t1.xywz
is getting compiled incorrectly to this GLSL (ignoring the .xywz swizzling of "t1.xywz"): " Temp[0].xyw = texelFetch(g_t1, ivec2((Temp_int[3]).xy), 0).xyw;\n"
… which I think should be:
" Temp[0].xyw = texelFetch(g_t1, ivec2((Temp_int[3]).xy), 0).xyz;\n"
See http://msdn.microsoft.com/en-us/library/windows/desktop/hh447172(v=vs.85).aspx "The swizzle on srcResource determines how to swizzle the 4-component result coming back from the texture load, after which .mask on dest determines which components in dest get updated."