diff options
author | marha <marha@users.sourceforge.net> | 2014-11-29 12:44:10 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2014-11-29 12:44:10 +0100 |
commit | 0dbe845b2f4ba08924d6fcb9634d09dc3dde13d6 (patch) | |
tree | 4fc0c706447f18bc522bb503273ec9e10f6c2ba5 /mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp | |
parent | d17578910169acabae7e67a3da8f26b5ed608ce6 (diff) | |
parent | d6d5581d5fba846c8476ad4d593da662306765d7 (diff) | |
download | vcxsrv-0dbe845b2f4ba08924d6fcb9634d09dc3dde13d6.tar.gz vcxsrv-0dbe845b2f4ba08924d6fcb9634d09dc3dde13d6.tar.bz2 vcxsrv-0dbe845b2f4ba08924d6fcb9634d09dc3dde13d6.zip |
Merge remote-tracking branch 'origin/released'
Conflicts:
xorg-server/hw/xwin/winclip.c
xorg-server/hw/xwin/winengine.c
xorg-server/hw/xwin/winfont.c
xorg-server/hw/xwin/wingc.c
xorg-server/hw/xwin/wingetsp.c
xorg-server/hw/xwin/winmisc.c
xorg-server/hw/xwin/winnativegdi.c
xorg-server/hw/xwin/winpfbdd.c
xorg-server/hw/xwin/winpixmap.c
xorg-server/hw/xwin/winpolyline.c
xorg-server/hw/xwin/winscrinit.c
xorg-server/hw/xwin/winsetsp.c
xorg-server/hw/xwin/winwindow.c
Diffstat (limited to 'mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp')
-rw-r--r-- | mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 47 |
1 files changed, 10 insertions, 37 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index a0da9f635..a4e2c8da5 100644 --- a/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp +++ b/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp @@ -4781,15 +4781,19 @@ emit_wpos(struct st_context *st, * saturating the value to [0,1] does the job. */ static void -emit_face_var(struct st_translate *t) +emit_face_var(struct gl_context *ctx, struct st_translate *t) { struct ureg_program *ureg = t->ureg; struct ureg_dst face_temp = ureg_DECL_temporary(ureg); struct ureg_src face_input = t->inputs[t->inputMapping[VARYING_SLOT_FACE]]; - /* MOV_SAT face_temp, input[face] */ - face_temp = ureg_saturate(face_temp); - ureg_MOV(ureg, face_temp, face_input); + if (ctx->Const.NativeIntegers) { + ureg_FSGE(ureg, face_temp, face_input, ureg_imm1f(ureg, 0)); + } + else { + /* MOV_SAT face_temp, input[face] */ + ureg_MOV(ureg, ureg_saturate(face_temp), face_input); + } /* Use face_temp as face input from here on: */ t->inputs[t->inputMapping[VARYING_SLOT_FACE]] = ureg_src(face_temp); @@ -4909,7 +4913,7 @@ st_translate_program( } if (proginfo->InputsRead & VARYING_BIT_FACE) - emit_face_var(t); + emit_face_var(ctx, t); /* * Declare output attributes. @@ -5210,6 +5214,7 @@ get_mesa_program(struct gl_context *ctx, v->have_sqrt = pscreen->get_shader_param(pscreen, ptarget, PIPE_SHADER_CAP_TGSI_SQRT_SUPPORTED); + _mesa_copy_linked_program_data(shader->Stage, shader_program, prog); _mesa_generate_parameters_list_for_uniforms(shader_program, shader, prog->Parameters); @@ -5315,10 +5320,6 @@ get_mesa_program(struct gl_context *ctx, case GL_GEOMETRY_SHADER: stgp = (struct st_geometry_program *)prog; stgp->glsl_to_tgsi = v; - stgp->Base.InputType = shader_program->Geom.InputType; - stgp->Base.OutputType = shader_program->Geom.OutputType; - stgp->Base.VerticesOut = shader_program->Geom.VerticesOut; - stgp->Base.Invocations = shader_program->Geom.Invocations; break; default: assert(!"should not be reached"); @@ -5330,34 +5331,6 @@ get_mesa_program(struct gl_context *ctx, extern "C" { -struct gl_shader * -st_new_shader(struct gl_context *ctx, GLuint name, GLuint type) -{ - struct gl_shader *shader; - assert(type == GL_FRAGMENT_SHADER || type == GL_VERTEX_SHADER || - type == GL_GEOMETRY_SHADER_ARB); - shader = rzalloc(NULL, struct gl_shader); - if (shader) { - shader->Type = type; - shader->Stage = _mesa_shader_enum_to_shader_stage(type); - shader->Name = name; - _mesa_init_shader(ctx, shader); - } - return shader; -} - -struct gl_shader_program * -st_new_shader_program(struct gl_context *ctx, GLuint name) -{ - struct gl_shader_program *shProg; - shProg = rzalloc(NULL, struct gl_shader_program); - if (shProg) { - shProg->Name = name; - _mesa_init_shader_program(ctx, shProg); - } - return shProg; -} - /** * Link a shader. * Called via ctx->Driver.LinkShader() |