Skip to content

Commit

Permalink
Fixed crash and fp16 detection
Browse files Browse the repository at this point in the history
  • Loading branch information
JuanDiegoMontoya committed May 24, 2023
1 parent 4fdeb6f commit 69a7c91
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ffx-fsr2-api/gl/ffx_fsr2_gl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ FfxErrorCode GetDeviceCapabilitiesGL(FfxFsr2Interface* backendInterface, FfxDevi
subgroupSupported = true;
}
}
if (strcmp(extensionString, "NV_gpu_shader5") == 0 || strcmp(extensionString, "AMD_gpu_shader_half_float") == 0)
if (strcmp(extensionString, "GL_NV_gpu_shader5") == 0 || strcmp(extensionString, "GL_AMD_gpu_shader_half_float") == 0)
{
deviceCapabilities->fp16Supported = true;
}
Expand All @@ -638,14 +638,14 @@ FfxErrorCode CreateBackendContextGL(FfxFsr2Interface* backendInterface, FfxDevic
// set up some internal resources we need (space for resource views and constant buffers)
BackendContext_GL* backendContext = (BackendContext_GL*)backendInterface->scratchBuffer;

FFX_VALIDATE(GetDeviceCapabilitiesGL(backendInterface, &backendContext->capabilities, nullptr));

backendContext->nextStaticResource = 0;
backendContext->nextDynamicResource = FSR2_MAX_RESOURCE_COUNT - 1;

// load OpenGL functions
loadGLFunctions(backendContext, backendContext->glFunctionTable.glGetProcAddress);

FFX_VALIDATE(GetDeviceCapabilitiesGL(backendInterface, &backendContext->capabilities, nullptr));

// create samplers
backendContext->glFunctionTable.glCreateSamplers(1, &backendContext->pointSampler.id);
backendContext->glFunctionTable.glSamplerParameteri(backendContext->pointSampler.id, GL_TEXTURE_MIN_FILTER, GL_NEAREST_MIPMAP_NEAREST);
Expand Down

0 comments on commit 69a7c91

Please sign in to comment.