SPV: RelaxedPrecision: use the result precision for texture sampling.
Fix #2298. The AST has two precisions, an operation precision and a result precision. Actual use of GLSL with mediump samplers wants the result precision, so pick that up instead of the operation precision.
This commit is contained in:
parent
90f1d6ab58
commit
12c155f303
5 changed files with 147 additions and 2 deletions
|
|
@ -1295,7 +1295,7 @@ TIntermTyped* TParseContext::handleBuiltInFunctionCall(TSourceLoc loc, TIntermNo
|
|||
TIntermTyped *result = intermediate.addBuiltInFunctionCall(loc, function.getBuiltInOp(),
|
||||
function.getParamCount() == 1,
|
||||
arguments, function.getType());
|
||||
if (obeyPrecisionQualifiers())
|
||||
if (result != nullptr && obeyPrecisionQualifiers())
|
||||
computeBuiltinPrecisions(*result, function);
|
||||
|
||||
if (result == nullptr) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue