Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
virgl-es
mesa
Commits
dd93bc4f
Commit
dd93bc4f
authored
May 23, 2018
by
Marek Olšák
2
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
st/mesa: use PIPE_CAP_GLSL_FEATURE_LEVEL_COMPATIBILITY
Reviewed-by:
Timothy Arceri
<
tarceri@itsqueeze.com
>
parent
34ea55d8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
10 deletions
+15
-10
src/mesa/state_tracker/st_extensions.c
src/mesa/state_tracker/st_extensions.c
+15
-10
No files found.
src/mesa/state_tracker/st_extensions.c
View file @
dd93bc4f
...
...
@@ -936,12 +936,17 @@ void st_init_extensions(struct pipe_screen *screen,
/* Figure out GLSL support and set GLSLVersion to it. */
consts
->
GLSLVersion
=
screen
->
get_param
(
screen
,
PIPE_CAP_GLSL_FEATURE_LEVEL
);
consts
->
GLSLVersionCompat
=
_min
(
consts
->
GLSLVersion
,
140
);
consts
->
GLSLVersionCompat
=
screen
->
get_param
(
screen
,
PIPE_CAP_GLSL_FEATURE_LEVEL_COMPATIBILITY
);
const
unsigned
GLSLVersion
=
api
==
API_OPENGL_COMPAT
?
consts
->
GLSLVersionCompat
:
consts
->
GLSLVersion
;
_mesa_override_glsl_version
(
consts
);
if
(
options
->
force_glsl_version
>
0
&&
options
->
force_glsl_version
<=
consts
->
GLSLVersion
)
{
options
->
force_glsl_version
<=
GLSLVersion
)
{
consts
->
ForceGLSLVersion
=
options
->
force_glsl_version
;
}
...
...
@@ -955,24 +960,24 @@ void st_init_extensions(struct pipe_screen *screen,
consts
->
AllowGLSLCrossStageInterpolationMismatch
=
options
->
allow_glsl_cross_stage_interpolation_mismatch
;
if
(
consts
->
GLSLVersion
>=
400
)
if
(
GLSLVersion
>=
400
)
extensions
->
ARB_gpu_shader5
=
GL_TRUE
;
if
(
consts
->
GLSLVersion
>=
410
)
if
(
GLSLVersion
>=
410
)
extensions
->
ARB_shader_precision
=
GL_TRUE
;
/* This extension needs full OpenGL 3.2, but we don't know if that's
* supported at this point. Only check the GLSL version. */
if
(
consts
->
GLSLVersion
>=
150
&&
if
(
GLSLVersion
>=
150
&&
screen
->
get_param
(
screen
,
PIPE_CAP_TGSI_VS_LAYER_VIEWPORT
))
{
extensions
->
AMD_vertex_shader_layer
=
GL_TRUE
;
}
if
(
consts
->
GLSLVersion
>=
140
)
{
if
(
GLSLVersion
>=
140
)
{
if
(
screen
->
get_param
(
screen
,
PIPE_CAP_TGSI_ARRAY_COMPONENTS
))
extensions
->
ARB_enhanced_layouts
=
GL_TRUE
;
}
if
(
consts
->
GLSLVersion
>=
130
)
{
if
(
GLSLVersion
>=
130
)
{
consts
->
NativeIntegers
=
GL_TRUE
;
consts
->
MaxClipPlanes
=
8
;
...
...
@@ -1024,7 +1029,7 @@ void st_init_extensions(struct pipe_screen *screen,
* invocations of a geometry shader. There is no separate cap for that, so
* we check the GLSLVersion.
*/
if
(
consts
->
GLSLVersion
>=
400
&&
if
(
GLSLVersion
>=
400
&&
screen
->
get_shader_param
(
screen
,
PIPE_SHADER_GEOMETRY
,
PIPE_SHADER_CAP_MAX_INSTRUCTIONS
)
>
0
)
{
extensions
->
OES_geometry_shader
=
GL_TRUE
;
...
...
@@ -1171,7 +1176,7 @@ void st_init_extensions(struct pipe_screen *screen,
consts
->
MaxViewports
=
screen
->
get_param
(
screen
,
PIPE_CAP_MAX_VIEWPORTS
);
if
(
consts
->
MaxViewports
>=
16
)
{
if
(
consts
->
GLSLVersion
>=
400
)
{
if
(
GLSLVersion
>=
400
)
{
consts
->
ViewportBounds
.
Min
=
-
32768
.
0
;
consts
->
ViewportBounds
.
Max
=
32767
.
0
;
}
else
{
...
...
@@ -1201,7 +1206,7 @@ void st_init_extensions(struct pipe_screen *screen,
* Assume that ES3 is supported if GLSL 3.30 is supported.
* (OpenGL 3.3 is a requirement for that extension.)
*/
if
(
consts
->
GLSLVersion
>=
330
&&
if
(
GLSLVersion
>=
330
&&
/* Requirements for ETC2 emulation. */
screen
->
is_format_supported
(
screen
,
PIPE_FORMAT_R8G8B8A8_UNORM
,
PIPE_TEXTURE_2D
,
0
,
...
...
Jakob Bornecrantz
@jakob
mentioned in commit
3860f5be
·
May 30, 2018
mentioned in commit
3860f5be
mentioned in commit 3860f5becba4e0a9bcfd780fd4a37c9607ddbcd8
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment