gallium: give fragment-shader derivatives its own cap
Shader Model 3.0 is a big promise to make to the state-tracker, and for instance mobile hardware might support fragment-shader derivatives but not some of the other features of SM3. So let's give this its own cap for simplicity. Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
parent
66ee6661e9
commit
681fa03e8d
|
@ -371,6 +371,7 @@ u_pipe_screen_get_param_defaults(struct pipe_screen *pscreen,
|
|||
#endif
|
||||
|
||||
case PIPE_CAP_FRAGMENT_SHADER_TEXTURE_LOD:
|
||||
case PIPE_CAP_FRAGMENT_SHADER_DERIVATIVES:
|
||||
return pscreen->get_param(pscreen, PIPE_CAP_SM3);
|
||||
|
||||
default:
|
||||
|
|
|
@ -536,6 +536,8 @@ The integer capabilities:
|
|||
* ``PIPE_CAP_TGSI_DIV``: Whether opcode DIV is supported
|
||||
* ``PIPE_CAP_FRAGMENT_SHADER_TEXTURE_LOD``: Whether texture lookups with
|
||||
explicit LOD is supported in the fragment shader.
|
||||
* ``PIPE_CAP_FRAGMENT_SHADER_DERIVATIVES``: True if the driver supports
|
||||
derivatives in fragment shaders.
|
||||
|
||||
.. _pipe_capf:
|
||||
|
||||
|
|
|
@ -889,6 +889,7 @@ enum pipe_cap
|
|||
PIPE_CAP_ATOMIC_FLOAT_MINMAX,
|
||||
PIPE_CAP_TGSI_DIV,
|
||||
PIPE_CAP_FRAGMENT_SHADER_TEXTURE_LOD,
|
||||
PIPE_CAP_FRAGMENT_SHADER_DERIVATIVES,
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -776,7 +776,7 @@ void st_init_extensions(struct pipe_screen *screen,
|
|||
/* GL_NV_point_sprite is not supported by gallium because we don't
|
||||
* support the GL_POINT_SPRITE_R_MODE_NV option. */
|
||||
|
||||
{ o(OES_standard_derivatives), PIPE_CAP_SM3 },
|
||||
{ o(OES_standard_derivatives), PIPE_CAP_FRAGMENT_SHADER_DERIVATIVES },
|
||||
{ o(OES_texture_float_linear), PIPE_CAP_TEXTURE_FLOAT_LINEAR },
|
||||
{ o(OES_texture_half_float_linear), PIPE_CAP_TEXTURE_HALF_FLOAT_LINEAR },
|
||||
{ o(OES_texture_view), PIPE_CAP_SAMPLER_VIEW_TARGET },
|
||||
|
|
Loading…
Reference in New Issue