diff options
author | Timothy Arceri <[email protected]> | 2017-11-27 17:01:01 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2018-01-17 23:43:28 +1100 |
commit | a20016d8277f9cd68620784417a57ae227783a04 (patch) | |
tree | a42cc195c097c31f33b8e997de5eb1e05bff625f /src/mesa/state_tracker/st_context.c | |
parent | a34262aed77dc358c29b492139796a9847dd37d1 (diff) |
st/glsl_to_tgsi: add ARB_get_program_binary support using TGSI
This resolves a game bug in Dead Island. The game doesn't properly
handle ARB_get_program_binary with 0 supported formats, and ends up
crashing.
This will enable ARB_get_program_binary binary support for any
driver that currently enables the on-disk shader cache.
Tested-by: Dieter Nützel <[email protected]>
Reviewed-by: Nicolai Hähnle <[email protected]>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=85564
Diffstat (limited to 'src/mesa/state_tracker/st_context.c')
-rw-r--r-- | src/mesa/state_tracker/st_context.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c index 7564a530352..a7b2cfc12ba 100644 --- a/src/mesa/state_tracker/st_context.c +++ b/src/mesa/state_tracker/st_context.c @@ -74,6 +74,7 @@ #include "st_pbo.h" #include "st_program.h" #include "st_sampler_view.h" +#include "st_shader_cache.h" #include "st_vdpau.h" #include "st_texture.h" #include "pipe/p_context.h" @@ -760,4 +761,9 @@ st_init_driver_functions(struct pipe_screen *screen, functions->SetBackgroundContext = st_set_background_context; functions->GetDriverUuid = st_get_device_uuid; functions->GetDeviceUuid = st_get_driver_uuid; + + /* GL_ARB_get_program_binary */ + functions->GetProgramBinaryDriverSHA1 = st_get_program_binary_driver_sha1; + functions->ProgramBinarySerializeDriverBlob = st_serialise_tgsi_program; + functions->ProgramBinaryDeserializeDriverBlob = st_deserialise_tgsi_program; } |