bugfix request
1) text input error %%s to %s%s, geometry shader output is strange. 2) texname variable is applied wrong type index. example[ declaration : texture2dms tex; , implementation : sampler2d(tex, ..) ]
This commit is contained in:
Родитель
467d0a193a
Коммит
3520fe9963
|
@ -4315,7 +4315,7 @@ void ToGLSL::TranslateInstruction(Instruction* psInst, bool isEmbedded /* = fals
|
|||
{
|
||||
std::string vulkanSamplerName = GetVulkanDummySamplerName();
|
||||
|
||||
const RESOURCE_DIMENSION eResDim = psContext->psShader->aeResourceDims[psInst->asOperands[2].ui32RegisterNumber];
|
||||
const RESOURCE_DIMENSION eResDim = psContext->psShader->aeResourceDims[psInst->asOperands[1].ui32RegisterNumber];
|
||||
std::string smpType = GetSamplerType(psContext, eResDim, psInst->asOperands[2].ui32RegisterNumber);
|
||||
std::ostringstream oss;
|
||||
oss << smpType;
|
||||
|
|
|
@ -1164,7 +1164,7 @@ void ToGLSL::TranslateVariableNameWithMask(bstring glsl, const Operand* psOperan
|
|||
if (((psVarType->Class == SVC_MATRIX_COLUMNS) || (psVarType->Class == SVC_MATRIX_ROWS)) && (psVarType->Elements > 1) && ((psContext->flags & HLSLCC_FLAG_TRANSLATE_MATRICES) == 0))
|
||||
{
|
||||
// Special handling for old matrix arrays
|
||||
bformata(glsl, "%%s / 4%s", squareBrackets[squareBracketType][0], fullIndexOss.str().c_str(), squareBrackets[squareBracketType][1]);
|
||||
bformata(glsl, "%s%s / 4%s", squareBrackets[squareBracketType][0], fullIndexOss.str().c_str(), squareBrackets[squareBracketType][1]);
|
||||
bformata(glsl, "%s%s %% 4%s", squareBrackets[squareBracketType][0], fullIndexOss.str().c_str(), squareBrackets[squareBracketType][1]);
|
||||
}
|
||||
else // This path is atm the default
|
||||
|
|
Загрузка…
Ссылка в новой задаче