diff options
author | Emil Velikov <[email protected]> | 2014-02-23 22:03:48 +0000 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2014-08-15 17:35:37 +0100 |
commit | 87d3ae0b45b6b6bb50b583dafa55eb109449a005 (patch) | |
tree | c0cdeb3076801180dac1334766274f3b0d837e59 /src/mesa/drivers/dri/common/utils.c | |
parent | 679c2ef8a058824615fbc4c5aba40d65d1ed9170 (diff) |
dri/common: Move __DRI2_RENDERER_PREFFERED_PROFILE handling to driQueryRendererIntegerCommon
Essentially all drivers would like to use to opengl core profile if
available, so avoid duplication by moving the code to a common fallback
within driQueryRendererIntegerCommon.
If a driver uses different approach they can handle it separately.
Signed-off-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/common/utils.c')
-rw-r--r-- | src/mesa/drivers/dri/common/utils.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/common/utils.c b/src/mesa/drivers/dri/common/utils.c index eee77ec690c..e0b3db8cf14 100644 --- a/src/mesa/drivers/dri/common/utils.c +++ b/src/mesa/drivers/dri/common/utils.c @@ -519,6 +519,10 @@ driQueryRendererIntegerCommon(__DRIscreen *psp, int param, unsigned int *value) value[2] = v[2]; return 0; } + case __DRI2_RENDERER_PREFERRED_PROFILE: + value[0] = (psp->max_gl_core_version != 0) + ? (1U << __DRI_API_OPENGL_CORE) : (1U << __DRI_API_OPENGL); + return 0; case __DRI2_RENDERER_OPENGL_CORE_PROFILE_VERSION: value[0] = psp->max_gl_core_version / 10; value[1] = psp->max_gl_core_version % 10; |