mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-12-29 11:50:58 +01:00
gl_shader_decompiler: Fix TXQ types
TXQ returns integer types. Shaders usually do: R0 = TXQ(); // => int R0 = static_cast<float>(R0); If we don't treat it as an integer, it will cast a binary float value as float - resulting in a corrupted number.
This commit is contained in:
parent
a6d5ff05dc
commit
88a3c05b7b
1 changed files with 3 additions and 2 deletions
|
@ -1196,11 +1196,12 @@ private:
|
|||
switch (meta->element) {
|
||||
case 0:
|
||||
case 1:
|
||||
return "textureSize(" + sampler + ", " + lod + ')' + GetSwizzle(meta->element);
|
||||
return "itof(int(textureSize(" + sampler + ", " + lod + ')' +
|
||||
GetSwizzle(meta->element) + "))";
|
||||
case 2:
|
||||
return "0";
|
||||
case 3:
|
||||
return "textureQueryLevels(" + sampler + ')';
|
||||
return "itof(textureQueryLevels(" + sampler + "))";
|
||||
}
|
||||
UNREACHABLE();
|
||||
return "0";
|
||||
|
|
Loading…
Reference in a new issue