diff options
author | Jordan Justen <[email protected]> | 2017-11-07 00:21:33 -0800 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2017-12-08 16:59:25 +1100 |
commit | 64ad804e596075c06f5a1f2bdc0d45b5d2f2ead2 (patch) | |
tree | 710a6476e6a2b19ab5a44fcc730d92f734694eaf /src/mesa/main/get.c | |
parent | fb077d603bcc46ad915e9863ebf53b75f4662f16 (diff) |
main: Support 1 Mesa format with get for GL_PROGRAM_BINARY_FORMATS
Mesa supports either 0 or 1 formats. If 1 format is supported, it is
GL_PROGRAM_BINARY_FORMAT_MESA as defined in the
GL_MESA_program_binary_formats extension spec.
Signed-off-by: Jordan Justen <[email protected]>
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/mesa/main/get.c')
-rw-r--r-- | src/mesa/main/get.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c index ea8d932b182..c1b1a89ee05 100644 --- a/src/mesa/main/get.c +++ b/src/mesa/main/get.c @@ -1151,6 +1151,15 @@ find_custom_value(struct gl_context *ctx, const struct value_desc *d, union valu } } break; + + /* GL_ARB_get_program_binary */ + case GL_PROGRAM_BINARY_FORMATS: + assert(ctx->Const.NumProgramBinaryFormats <= 1); + v->value_int_n.n = MIN2(ctx->Const.NumProgramBinaryFormats, 1); + if (ctx->Const.NumProgramBinaryFormats > 0) { + v->value_int_n.ints[0] = GL_PROGRAM_BINARY_FORMAT_MESA; + } + break; } } |