Fix last compile errors with gcc

Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
This commit is contained in:
TheJackiMonster 2022-09-30 14:53:50 +02:00
parent a5e08514d4
commit 902e61d5bb
No known key found for this signature in database
GPG Key ID: D850A5F772E880F9

View File

@ -27,6 +27,7 @@
#include <math.h>
#include <stdlib.h>
#include <codecvt>
#include <locale>
// prototypes for functions in the interface
FfxErrorCode GetDeviceCapabilitiesVK(FfxFsr2Interface* backendInterface, FfxDeviceCapabilities* deviceCapabilities, FfxDevice device);
@ -551,7 +552,7 @@ FfxResource ffxGetTextureResourceVK(FfxFsr2Context* context, VkImage imgVk, VkIm
#ifdef _DEBUG
if (name) {
wcscpy_s(resource.name, name);
wcscpy(resource.name, name);
}
#endif
@ -575,7 +576,7 @@ FfxResource ffxGetBufferResourceVK(FfxFsr2Context* context, VkBuffer bufVk, uint
#ifdef _DEBUG
if (name) {
wcscpy_s(resource.name, name);
wcscpy(resource.name, name);
}
#endif
@ -1298,17 +1299,17 @@ FfxErrorCode CreatePipelineVK(FfxFsr2Interface* backendInterface, FfxFsr2Pass pa
for (uint32_t srvIndex = 0; srvIndex < outPipeline->srvCount; ++srvIndex)
{
outPipeline->srvResourceBindings[srvIndex].slotIndex = shaderBlob.boundSampledImageBindings[srvIndex];
wcscpy_s(outPipeline->srvResourceBindings[srvIndex].name, converter.from_bytes(shaderBlob.boundSampledImageNames[srvIndex]).c_str());
wcscpy(outPipeline->srvResourceBindings[srvIndex].name, converter.from_bytes(shaderBlob.boundSampledImageNames[srvIndex]).c_str());
}
for (uint32_t uavIndex = 0; uavIndex < outPipeline->uavCount; ++uavIndex)
{
outPipeline->uavResourceBindings[uavIndex].slotIndex = shaderBlob.boundStorageImageBindings[uavIndex];
wcscpy_s(outPipeline->uavResourceBindings[uavIndex].name, converter.from_bytes(shaderBlob.boundStorageImageNames[uavIndex]).c_str());
wcscpy(outPipeline->uavResourceBindings[uavIndex].name, converter.from_bytes(shaderBlob.boundStorageImageNames[uavIndex]).c_str());
}
for (uint32_t cbIndex = 0; cbIndex < outPipeline->constCount; ++cbIndex)
{
outPipeline->cbResourceBindings[cbIndex].slotIndex = shaderBlob.boundUniformBufferBindings[cbIndex];
wcscpy_s(outPipeline->cbResourceBindings[cbIndex].name, converter.from_bytes(shaderBlob.boundUniformBufferNames[cbIndex]).c_str());
wcscpy(outPipeline->cbResourceBindings[cbIndex].name, converter.from_bytes(shaderBlob.boundUniformBufferNames[cbIndex]).c_str());
}
// create descriptor set layout
@ -1913,4 +1914,4 @@ FfxErrorCode DestroyPipelineVK(FfxFsr2Interface* backendInterface, FfxPipelineSt
}
return FFX_OK;
}
}