mirror of
https://bitbucket.org/CPMADevs/cnq3
synced 2024-11-23 04:12:42 +00:00
fixed the D3D11 back-end sometimes colorizing mip level 0 with r_gpuMipGen 1 and r_colorMipLevels 0
it happened because the color channels for blendColor weren't initialized, that memory could have at least one channel initialized as a NaN value and throwing a NaN in the shader logic would break it
This commit is contained in:
parent
a5e28eb08f
commit
a59875200c
1 changed files with 1 additions and 1 deletions
|
@ -2152,13 +2152,13 @@ static void GAL_CreateTextureEx(image_t* image, int mipCount, int mipOffset, int
|
|||
LinearToGammaCSData dataL2G;
|
||||
dataL2G.intensity = r_intensity->value;
|
||||
dataL2G.invGamma = 1.0f / r_mipGenGamma->value;
|
||||
dataL2G.blendColor[3] = 0.0f;
|
||||
|
||||
// copy to destination mip 0 now if needed
|
||||
if(mipOffset == 0)
|
||||
{
|
||||
readIndex = 0;
|
||||
writeIndex = 2;
|
||||
memcpy(dataL2G.blendColor, r_mipBlendColors[0], sizeof(dataL2G.blendColor));
|
||||
ResetShaderData(d3d.mipLinearToGammaConstBuffer, &dataL2G, sizeof(dataL2G));
|
||||
d3ds.context->CSSetShader(d3d.mipLinearToGammaComputeShader, NULL, 0);
|
||||
d3ds.context->CSSetConstantBuffers(0, 1, &bufferNull);
|
||||
|
|
Loading…
Reference in a new issue