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 <emil.l.velikov@gmail.com>
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;
case __DRI2_RENDERER_UNIFIED_MEMORY_ARCHITECTURE:
value[0] = 1;
return 0;
- case __DRI2_RENDERER_PREFERRED_PROFILE:
- value[0] = (1U << __DRI_API_OPENGL);
- return 0;
default:
return driQueryRendererIntegerCommon(psp, param, value);
}
case __DRI2_RENDERER_UNIFIED_MEMORY_ARCHITECTURE:
value[0] = 1;
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;
default:
return driQueryRendererIntegerCommon(psp, param, value);
}