renderer: move glsl ver and processor to iterator prolog

for shaders with no declerations these were never happening.

fixes: tests/spec/glsl-1.50/execution/geometry/clip-distance-out-values.shader_test
macos/master
Dave Airlie 10 years ago
parent bdbf734fa2
commit 00850485f6
  1. 16
      src/vrend_shader.c

@ -211,13 +211,6 @@ iter_declaration(struct tgsi_iterate_context *iter,
char *name_prefix = ""; char *name_prefix = "";
bool add_two_side = false; bool add_two_side = false;
if (ctx->prog_type == -1)
ctx->prog_type = iter->processor.Processor;
if (iter->processor.Processor == TGSI_PROCESSOR_VERTEX &&
ctx->key->gs_present && ctx->key->clip_plane_enable)
ctx->glsl_ver_required = 150;
switch (decl->Declaration.File) { switch (decl->Declaration.File) {
case TGSI_FILE_INPUT: case TGSI_FILE_INPUT:
i = ctx->num_inputs++; i = ctx->num_inputs++;
@ -1820,6 +1813,15 @@ iter_instruction(struct tgsi_iterate_context *iter,
static boolean static boolean
prolog(struct tgsi_iterate_context *iter) prolog(struct tgsi_iterate_context *iter)
{ {
struct dump_ctx *ctx = (struct dump_ctx *)iter;
if (ctx->prog_type == -1)
ctx->prog_type = iter->processor.Processor;
if (iter->processor.Processor == TGSI_PROCESSOR_VERTEX &&
ctx->key->gs_present)
ctx->glsl_ver_required = 150;
return TRUE; return TRUE;
} }

Loading…
Cancel
Save