Shader Model 3.0 is a big promise to make to the state-tracker, and
for instance mobile hardware might support vertex-shader saturate 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>
case PIPE_CAP_FRAGMENT_SHADER_TEXTURE_LOD:
case PIPE_CAP_FRAGMENT_SHADER_DERIVATIVES:
+ case PIPE_CAP_VERTEX_SHADER_SATURATE:
return pscreen->get_param(pscreen, PIPE_CAP_SM3);
default:
explicit LOD is supported in the fragment shader.
* ``PIPE_CAP_FRAGMENT_SHADER_DERIVATIVES``: True if the driver supports
derivatives in fragment shaders.
+* ``PIPE_CAP_VERTEX_SHADER_SATURATE``: True if the driver supports saturate
+ modifiers in the vertex shader.
.. _pipe_capf:
PIPE_CAP_TGSI_DIV,
PIPE_CAP_FRAGMENT_SHADER_TEXTURE_LOD,
PIPE_CAP_FRAGMENT_SHADER_DERIVATIVES,
+ PIPE_CAP_VERTEX_SHADER_SATURATE,
};
/**
* is not supported
*/
ctx->Const.ShaderCompilerOptions[MESA_SHADER_VERTEX].EmitNoSat =
- !screen->get_param(screen, PIPE_CAP_SM3);
+ !screen->get_param(screen, PIPE_CAP_VERTEX_SHADER_SATURATE);
if (ctx->Const.GLSLVersion < 400) {
for (i = 0; i < MESA_SHADER_STAGES; i++)