diff options
author | marha <marha@users.sourceforge.net> | 2014-02-07 23:28:38 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2014-02-07 23:38:15 +0100 |
commit | 982ac918afe6a1c02d5cf735d7b6c56443a048cc (patch) | |
tree | e737eb3f7bb18d933e14f0967c1c1aa5ce5e06f6 /mesalib/src/glsl/glsl_parser_extras.cpp | |
parent | 30af30b78075159fce477ae99cc72540133714d0 (diff) | |
download | vcxsrv-982ac918afe6a1c02d5cf735d7b6c56443a048cc.tar.gz vcxsrv-982ac918afe6a1c02d5cf735d7b6c56443a048cc.tar.bz2 vcxsrv-982ac918afe6a1c02d5cf735d7b6c56443a048cc.zip |
xkbcomp xkeyboard-config libxcb libxtrans fontconfig libX11 libxcb mesa xserver git update 7 Feb 2014
Update to openssl1.0.1f
xserver commit 83e38eb73fd8c852513aac2da2975b4c01070ec2
libxcb commit d7eb0bdf3b5b11ee9f40ee5e73df8fc0bdfa59f3
xkeyboard-config commit 7596672b96315465df8d8d691e3a567a52f70743
libX11 commit aacf95dacc7c598e7297894580d4d655593813b2
xkbcomp commit 31b90ee4ffc774e0da540277907fc5540c0b012c
libxtrans commit 3f0de269abe59353acbd7a5587d68ce0da91db67
fontconfig commit e310d2fac2d874d5aa76c609df70cc7b871c0b6d
mesa commit dd2229d4c68ed78a50104637aef904f8ab6d7dd3
Diffstat (limited to 'mesalib/src/glsl/glsl_parser_extras.cpp')
-rw-r--r-- | mesalib/src/glsl/glsl_parser_extras.cpp | 58 |
1 files changed, 44 insertions, 14 deletions
diff --git a/mesalib/src/glsl/glsl_parser_extras.cpp b/mesalib/src/glsl/glsl_parser_extras.cpp index 87784ed69..b822d2292 100644 --- a/mesalib/src/glsl/glsl_parser_extras.cpp +++ b/mesalib/src/glsl/glsl_parser_extras.cpp @@ -56,7 +56,8 @@ static unsigned known_desktop_glsl_versions[] = _mesa_glsl_parse_state::_mesa_glsl_parse_state(struct gl_context *_ctx, gl_shader_stage stage, void *mem_ctx) - : ctx(_ctx), switch_state() + : ctx(_ctx), cs_input_local_size_specified(false), cs_input_local_size(), + switch_state() { assert(stage < MESA_SHADER_STAGES); this->stage = stage; @@ -123,6 +124,12 @@ _mesa_glsl_parse_state::_mesa_glsl_parse_state(struct gl_context *_ctx, this->Const.MaxCombinedAtomicCounters = ctx->Const.MaxCombinedAtomicCounters; this->Const.MaxAtomicBufferBindings = ctx->Const.MaxAtomicBufferBindings; + /* Compute shader constants */ + for (unsigned i = 0; i < Elements(this->Const.MaxComputeWorkGroupCount); i++) + this->Const.MaxComputeWorkGroupCount[i] = ctx->Const.MaxComputeWorkGroupCount[i]; + for (unsigned i = 0; i < Elements(this->Const.MaxComputeWorkGroupSize); i++) + this->Const.MaxComputeWorkGroupSize[i] = ctx->Const.MaxComputeWorkGroupSize[i]; + this->current_function = NULL; this->toplevel_ir = NULL; this->found_return = false; @@ -519,6 +526,7 @@ static const _mesa_glsl_extension _mesa_glsl_supported_extensions[] = { EXT(ARB_sample_shading, true, false, ARB_sample_shading), EXT(AMD_shader_trinary_minmax, true, false, dummy_true), EXT(ARB_viewport_array, true, false, ARB_viewport_array), + EXT(ARB_compute_shader, true, false, ARB_compute_shader), }; #undef EXT @@ -1332,23 +1340,45 @@ set_shader_inout_layout(struct gl_shader *shader, /* Should have been prevented by the parser. */ assert(!state->gs_input_prim_type_specified); assert(!state->out_qualifier->flags.i); - return; } - shader->Geom.VerticesOut = 0; - if (state->out_qualifier->flags.q.max_vertices) - shader->Geom.VerticesOut = state->out_qualifier->max_vertices; - - if (state->gs_input_prim_type_specified) { - shader->Geom.InputType = state->gs_input_prim_type; - } else { - shader->Geom.InputType = PRIM_UNKNOWN; + if (shader->Stage != MESA_SHADER_COMPUTE) { + /* Should have been prevented by the parser. */ + assert(!state->cs_input_local_size_specified); } - if (state->out_qualifier->flags.q.prim_type) { - shader->Geom.OutputType = state->out_qualifier->prim_type; - } else { - shader->Geom.OutputType = PRIM_UNKNOWN; + switch (shader->Stage) { + case MESA_SHADER_GEOMETRY: + shader->Geom.VerticesOut = 0; + if (state->out_qualifier->flags.q.max_vertices) + shader->Geom.VerticesOut = state->out_qualifier->max_vertices; + + if (state->gs_input_prim_type_specified) { + shader->Geom.InputType = state->gs_input_prim_type; + } else { + shader->Geom.InputType = PRIM_UNKNOWN; + } + + if (state->out_qualifier->flags.q.prim_type) { + shader->Geom.OutputType = state->out_qualifier->prim_type; + } else { + shader->Geom.OutputType = PRIM_UNKNOWN; + } + break; + + case MESA_SHADER_COMPUTE: + if (state->cs_input_local_size_specified) { + for (int i = 0; i < 3; i++) + shader->Comp.LocalSize[i] = state->cs_input_local_size[i]; + } else { + for (int i = 0; i < 3; i++) + shader->Comp.LocalSize[i] = 0; + } + break; + + default: + /* Nothing to do. */ + break; } } |