Commit c98406ab by Nicolas Capens Committed by Shannon Woods

Use the simpler form of GetDimensions.

TRAC #23485 Signed-off-by: Jamie Madill Signed-off-by: Shannon Woods Author: Nicolas Capens
parent b70e5f7c
...@@ -987,19 +987,19 @@ void OutputHLSL::header() ...@@ -987,19 +987,19 @@ void OutputHLSL::header()
{ {
if (IsSamplerArray(textureFunction->sampler)) if (IsSamplerArray(textureFunction->sampler))
{ {
out << " uint width; uint height; uint layers; uint numberOfLevels;\n" out << " float width; float height; float layers;\n"
" x.GetDimensions(0, width, height, layers, numberOfLevels);\n"; " x.GetDimensions(width, height, layers);\n";
} }
else else
{ {
out << " uint width; uint height; uint numberOfLevels;\n" out << " float width; float height;\n"
" x.GetDimensions(0, width, height, numberOfLevels);\n"; " x.GetDimensions(width, height);\n";
} }
} }
else if (IsSampler3D(textureFunction->sampler)) else if (IsSampler3D(textureFunction->sampler))
{ {
out << " uint width; uint height; uint depth; uint numberOfLevels;\n" out << " float width; float height; float depth;\n"
" x.GetDimensions(0, width, height, depth, numberOfLevels);\n"; " x.GetDimensions(width, height, depth);\n";
} }
else UNREACHABLE(); else UNREACHABLE();
} }
...@@ -1060,8 +1060,8 @@ void OutputHLSL::header() ...@@ -1060,8 +1060,8 @@ void OutputHLSL::header()
default: UNREACHABLE(); default: UNREACHABLE();
} }
addressx = "int(floor(float(width) * frac(("; addressx = "int(floor(width * frac((";
addressy = "int(floor(float(height) * frac(("; addressy = "int(floor(height * frac((";
if (IsSamplerArray(textureFunction->sampler)) if (IsSamplerArray(textureFunction->sampler))
{ {
...@@ -1069,7 +1069,7 @@ void OutputHLSL::header() ...@@ -1069,7 +1069,7 @@ void OutputHLSL::header()
} }
else else
{ {
addressz = "int(floor(float(depth) * frac(("; addressz = "int(floor(depth * frac((";
} }
close = "))))"; close = "))))";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment