glsl: make compiler options per-target

This allows us to specify different options, especially useful for chips
without unified shaders.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
Luca Barbieri
2010-09-05 18:49:54 +02:00
committed by Ian Romanick
parent ede4205b24
commit 6d3a2c97f4
8 changed files with 64 additions and 25 deletions

View File

@@ -68,6 +68,7 @@ void st_init_limits(struct st_context *st)
struct pipe_screen *screen = st->pipe->screen;
struct gl_constants *c = &st->ctx->Const;
struct gl_program_constants *pc;
unsigned i;
c->MaxTextureLevels
= _min(screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_2D_LEVELS),
@@ -136,8 +137,9 @@ void st_init_limits(struct st_context *st)
/* Is TGSI_OPCODE_CONT supported? */
/* XXX separate query for early function return? */
st->ctx->Shader.EmitContReturn =
screen->get_param(screen, PIPE_CAP_TGSI_CONT_SUPPORTED);
for(i = 0; i < MESA_SHADER_TYPES; ++i)
st->ctx->ShaderCompilerOptions[i].EmitContReturn =
screen->get_param(screen, PIPE_CAP_TGSI_CONT_SUPPORTED);
/* Quads always follow GL provoking rules. */
c->QuadsFollowProvokingVertexConvention = GL_FALSE;