diff options
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r-- | src/mesa/state_tracker/st_cb_drawpixels.c | 4 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_cb_texture.c | 6 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 54 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_mesa_to_tgsi.c | 16 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_program.c | 30 |
5 files changed, 55 insertions, 55 deletions
diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c index 3d4c83fab57..311ba25c17f 100644 --- a/src/mesa/state_tracker/st_cb_drawpixels.c +++ b/src/mesa/state_tracker/st_cb_drawpixels.c @@ -130,7 +130,7 @@ get_drawpix_z_stencil_program(struct st_context *st, return st->drawpix.zs_shaders[shaderIndex]; } - ureg = ureg_create(TGSI_PROCESSOR_FRAGMENT); + ureg = ureg_create(PIPE_SHADER_FRAGMENT); if (ureg == NULL) return NULL; @@ -197,7 +197,7 @@ make_passthrough_vertex_shader(struct st_context *st, TGSI_SEMANTIC_TEXCOORD : TGSI_SEMANTIC_GENERIC; if (!st->drawpix.vert_shaders[passColor]) { - struct ureg_program *ureg = ureg_create( TGSI_PROCESSOR_VERTEX ); + struct ureg_program *ureg = ureg_create( PIPE_SHADER_VERTEX ); if (ureg == NULL) return NULL; diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c index 00ad88e7ed8..aa073b0c781 100644 --- a/src/mesa/state_tracker/st_cb_texture.c +++ b/src/mesa/state_tracker/st_cb_texture.c @@ -1131,7 +1131,7 @@ create_pbo_upload_vs(struct st_context *st) struct ureg_dst out_pos; struct ureg_dst out_layer; - ureg = ureg_create(TGSI_PROCESSOR_VERTEX); + ureg = ureg_create(PIPE_SHADER_VERTEX); if (!ureg) return NULL; @@ -1176,7 +1176,7 @@ create_pbo_upload_gs(struct st_context *st) struct ureg_src imm; unsigned i; - ureg = ureg_create(TGSI_PROCESSOR_GEOMETRY); + ureg = ureg_create(PIPE_SHADER_GEOMETRY); if (!ureg) return NULL; @@ -1222,7 +1222,7 @@ create_pbo_upload_fs(struct st_context *st) struct ureg_src const0; struct ureg_dst temp0; - ureg = ureg_create(TGSI_PROCESSOR_FRAGMENT); + ureg = ureg_create(PIPE_SHADER_FRAGMENT); if (!ureg) return NULL; diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index 5f037daea76..ad818a8240b 100644 --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp @@ -5186,7 +5186,7 @@ struct st_translate { unsigned insn_size; unsigned insn_count; - unsigned procType; /**< TGSI_PROCESSOR_VERTEX/FRAGMENT */ + unsigned procType; /**< PIPE_SHADER_VERTEX/FRAGMENT */ boolean error; }; @@ -5379,10 +5379,10 @@ dst_register(struct st_translate *t, gl_register_file file, unsigned index, case PROGRAM_OUTPUT: if (!array_id) { - if (t->procType == TGSI_PROCESSOR_FRAGMENT) + if (t->procType == PIPE_SHADER_FRAGMENT) assert(index < FRAG_RESULT_MAX); - else if (t->procType == TGSI_PROCESSOR_TESS_CTRL || - t->procType == TGSI_PROCESSOR_TESS_EVAL) + else if (t->procType == PIPE_SHADER_TESS_CTRL || + t->procType == PIPE_SHADER_TESS_EVAL) assert(index < VARYING_SLOT_TESS_MAX); else assert(index < VARYING_SLOT_MAX); @@ -6048,7 +6048,7 @@ st_translate_program( * Declare input attributes. */ switch (procType) { - case TGSI_PROCESSOR_FRAGMENT: + case PIPE_SHADER_FRAGMENT: for (i = 0; i < numInputs; i++) { unsigned array_id = 0; unsigned array_size; @@ -6069,9 +6069,9 @@ st_translate_program( } } break; - case TGSI_PROCESSOR_GEOMETRY: - case TGSI_PROCESSOR_TESS_EVAL: - case TGSI_PROCESSOR_TESS_CTRL: + case PIPE_SHADER_GEOMETRY: + case PIPE_SHADER_TESS_EVAL: + case PIPE_SHADER_TESS_CTRL: for (i = 0; i < numInputs; i++) { unsigned array_id = 0; unsigned array_size; @@ -6090,12 +6090,12 @@ st_translate_program( } } break; - case TGSI_PROCESSOR_VERTEX: + case PIPE_SHADER_VERTEX: for (i = 0; i < numInputs; i++) { t->inputs[i] = ureg_DECL_vs_input(ureg, i); } break; - case TGSI_PROCESSOR_COMPUTE: + case PIPE_SHADER_COMPUTE: break; default: assert(0); @@ -6105,13 +6105,13 @@ st_translate_program( * Declare output attributes. */ switch (procType) { - case TGSI_PROCESSOR_FRAGMENT: - case TGSI_PROCESSOR_COMPUTE: + case PIPE_SHADER_FRAGMENT: + case PIPE_SHADER_COMPUTE: break; - case TGSI_PROCESSOR_GEOMETRY: - case TGSI_PROCESSOR_TESS_EVAL: - case TGSI_PROCESSOR_TESS_CTRL: - case TGSI_PROCESSOR_VERTEX: + case PIPE_SHADER_GEOMETRY: + case PIPE_SHADER_TESS_EVAL: + case PIPE_SHADER_TESS_CTRL: + case PIPE_SHADER_VERTEX: for (i = 0; i < numOutputs; i++) { unsigned array_id = 0; unsigned array_size; @@ -6136,7 +6136,7 @@ st_translate_program( assert(0); } - if (procType == TGSI_PROCESSOR_FRAGMENT) { + if (procType == PIPE_SHADER_FRAGMENT) { if (program->shader->EarlyFragmentTests) ureg_property(ureg, TGSI_PROPERTY_FS_EARLY_DEPTH_STENCIL, 1); @@ -6184,7 +6184,7 @@ st_translate_program( } } } - else if (procType == TGSI_PROCESSOR_VERTEX) { + else if (procType == PIPE_SHADER_VERTEX) { for (i = 0; i < numOutputs; i++) { if (outputSemanticName[i] == TGSI_SEMANTIC_FOG) { /* force register to contain a fog coordinate in the form (F, 0, 0, 1). */ @@ -6196,7 +6196,7 @@ st_translate_program( } } - if (procType == TGSI_PROCESSOR_COMPUTE) { + if (procType == PIPE_SHADER_COMPUTE) { emit_compute_block_size(proginfo, ureg); } @@ -6230,7 +6230,7 @@ st_translate_program( */ struct st_context *st = st_context(ctx); struct pipe_screen *pscreen = st->pipe->screen; - assert(procType == TGSI_PROCESSOR_VERTEX); + assert(procType == PIPE_SHADER_VERTEX); assert(pscreen->get_shader_param(pscreen, PIPE_SHADER_VERTEX, PIPE_SHADER_CAP_INTEGERS)); (void) pscreen; if (!ctx->Const.NativeIntegers) { @@ -6240,7 +6240,7 @@ st_translate_program( } } - if (procType == TGSI_PROCESSOR_FRAGMENT && + if (procType == PIPE_SHADER_FRAGMENT && semName == TGSI_SEMANTIC_POSITION) emit_wpos(st_context(ctx), t, proginfo, ureg, program->wpos_transform_const); @@ -6392,8 +6392,8 @@ st_translate_program( /* Set the next shader stage hint for VS and TES. */ switch (procType) { - case TGSI_PROCESSOR_VERTEX: - case TGSI_PROCESSOR_TESS_EVAL: + case PIPE_SHADER_VERTEX: + case PIPE_SHADER_TESS_EVAL: if (program->shader_program->SeparateShader) break; @@ -6403,16 +6403,16 @@ st_translate_program( switch (i) { case MESA_SHADER_TESS_CTRL: - next = TGSI_PROCESSOR_TESS_CTRL; + next = PIPE_SHADER_TESS_CTRL; break; case MESA_SHADER_TESS_EVAL: - next = TGSI_PROCESSOR_TESS_EVAL; + next = PIPE_SHADER_TESS_EVAL; break; case MESA_SHADER_GEOMETRY: - next = TGSI_PROCESSOR_GEOMETRY; + next = PIPE_SHADER_GEOMETRY; break; case MESA_SHADER_FRAGMENT: - next = TGSI_PROCESSOR_FRAGMENT; + next = PIPE_SHADER_FRAGMENT; break; default: assert(0); diff --git a/src/mesa/state_tracker/st_mesa_to_tgsi.c b/src/mesa/state_tracker/st_mesa_to_tgsi.c index e1c79a57b0a..d73a4b34a5a 100644 --- a/src/mesa/state_tracker/st_mesa_to_tgsi.c +++ b/src/mesa/state_tracker/st_mesa_to_tgsi.c @@ -91,7 +91,7 @@ struct st_translate { unsigned insn_size; unsigned insn_count; - unsigned procType; /**< TGSI_PROCESSOR_VERTEX/FRAGMENT */ + unsigned procType; /**< PIPE_SHADER_VERTEX/FRAGMENT */ boolean error; }; @@ -165,9 +165,9 @@ dst_register( struct st_translate *t, return t->temps[index]; case PROGRAM_OUTPUT: - if (t->procType == TGSI_PROCESSOR_VERTEX) + if (t->procType == PIPE_SHADER_VERTEX) assert(index < VARYING_SLOT_MAX); - else if (t->procType == TGSI_PROCESSOR_FRAGMENT) + else if (t->procType == PIPE_SHADER_FRAGMENT) assert(index < FRAG_RESULT_MAX); else assert(index < VARYING_SLOT_MAX); @@ -980,7 +980,7 @@ st_translate_mesa_program( /* * Declare input attributes. */ - if (procType == TGSI_PROCESSOR_FRAGMENT) { + if (procType == PIPE_SHADER_FRAGMENT) { for (i = 0; i < numInputs; i++) { t->inputs[i] = ureg_DECL_fs_input(ureg, inputSemanticName[i], @@ -1026,7 +1026,7 @@ st_translate_mesa_program( } } } - else if (procType == TGSI_PROCESSOR_GEOMETRY) { + else if (procType == PIPE_SHADER_GEOMETRY) { for (i = 0; i < numInputs; i++) { t->inputs[i] = ureg_DECL_input(ureg, inputSemanticName[i], @@ -1040,7 +1040,7 @@ st_translate_mesa_program( } } else { - assert(procType == TGSI_PROCESSOR_VERTEX); + assert(procType == PIPE_SHADER_VERTEX); for (i = 0; i < numInputs; i++) { t->inputs[i] = ureg_DECL_vs_input(ureg, i); @@ -1089,7 +1089,7 @@ st_translate_mesa_program( */ struct st_context *st = st_context(ctx); struct pipe_screen *pscreen = st->pipe->screen; - assert(procType == TGSI_PROCESSOR_VERTEX); + assert(procType == PIPE_SHADER_VERTEX); assert(pscreen->get_shader_param(pscreen, PIPE_SHADER_VERTEX, PIPE_SHADER_CAP_INTEGERS)); (void) pscreen; /* silence non-debug build warnings */ if (!ctx->Const.NativeIntegers) { @@ -1099,7 +1099,7 @@ st_translate_mesa_program( } } - if (procType == TGSI_PROCESSOR_FRAGMENT && + if (procType == PIPE_SHADER_FRAGMENT && semName == TGSI_SEMANTIC_POSITION) emit_wpos(st_context(ctx), t, program, ureg); diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c index d2d68ac05bf..32ada9f7b8a 100644 --- a/src/mesa/state_tracker/st_program.c +++ b/src/mesa/state_tracker/st_program.c @@ -359,7 +359,7 @@ st_translate_vertex_program(struct st_context *st, if (!stvp->glsl_to_tgsi) _mesa_remove_output_reads(&stvp->Base.Base, PROGRAM_OUTPUT); - ureg = ureg_create_with_screen(TGSI_PROCESSOR_VERTEX, st->pipe->screen); + ureg = ureg_create_with_screen(PIPE_SHADER_VERTEX, st->pipe->screen); if (ureg == NULL) return false; @@ -375,7 +375,7 @@ st_translate_vertex_program(struct st_context *st, if (stvp->glsl_to_tgsi) { error = st_translate_program(st->ctx, - TGSI_PROCESSOR_VERTEX, + PIPE_SHADER_VERTEX, ureg, stvp->glsl_to_tgsi, &stvp->Base.Base, @@ -402,7 +402,7 @@ st_translate_vertex_program(struct st_context *st, stvp->glsl_to_tgsi = NULL; } else error = st_translate_mesa_program(st->ctx, - TGSI_PROCESSOR_VERTEX, + PIPE_SHADER_VERTEX, ureg, &stvp->Base.Base, /* inputs */ @@ -754,7 +754,7 @@ st_translate_fragment_program(struct st_context *st, } } - ureg = ureg_create_with_screen(TGSI_PROCESSOR_FRAGMENT, st->pipe->screen); + ureg = ureg_create_with_screen(PIPE_SHADER_FRAGMENT, st->pipe->screen); if (ureg == NULL) return false; @@ -791,7 +791,7 @@ st_translate_fragment_program(struct st_context *st, if (stfp->glsl_to_tgsi) { st_translate_program(st->ctx, - TGSI_PROCESSOR_FRAGMENT, + PIPE_SHADER_FRAGMENT, ureg, stfp->glsl_to_tgsi, &stfp->Base.Base, @@ -829,7 +829,7 @@ st_translate_fragment_program(struct st_context *st, fs_output_semantic_index); else st_translate_mesa_program(st->ctx, - TGSI_PROCESSOR_FRAGMENT, + PIPE_SHADER_FRAGMENT, ureg, &stfp->Base.Base, /* inputs */ @@ -1057,7 +1057,7 @@ st_translate_program_common(struct st_context *st, switch (attr) { case VARYING_SLOT_PRIMITIVE_ID: - assert(tgsi_processor == TGSI_PROCESSOR_GEOMETRY); + assert(tgsi_processor == PIPE_SHADER_GEOMETRY); input_semantic_name[slot] = TGSI_SEMANTIC_PRIMID; input_semantic_index[slot] = 0; break; @@ -1299,7 +1299,7 @@ st_translate_geometry_program(struct st_context *st, { struct ureg_program *ureg; - ureg = ureg_create_with_screen(TGSI_PROCESSOR_GEOMETRY, st->pipe->screen); + ureg = ureg_create_with_screen(PIPE_SHADER_GEOMETRY, st->pipe->screen); if (ureg == NULL) return false; @@ -1310,7 +1310,7 @@ st_translate_geometry_program(struct st_context *st, ureg_property(ureg, TGSI_PROPERTY_GS_INVOCATIONS, stgp->Base.Invocations); st_translate_program_common(st, &stgp->Base.Base, stgp->glsl_to_tgsi, ureg, - TGSI_PROCESSOR_GEOMETRY, &stgp->tgsi); + PIPE_SHADER_GEOMETRY, &stgp->tgsi); free_glsl_to_tgsi_visitor(stgp->glsl_to_tgsi); stgp->glsl_to_tgsi = NULL; @@ -1383,7 +1383,7 @@ st_translate_tessctrl_program(struct st_context *st, { struct ureg_program *ureg; - ureg = ureg_create_with_screen(TGSI_PROCESSOR_TESS_CTRL, st->pipe->screen); + ureg = ureg_create_with_screen(PIPE_SHADER_TESS_CTRL, st->pipe->screen); if (ureg == NULL) return false; @@ -1391,7 +1391,7 @@ st_translate_tessctrl_program(struct st_context *st, sttcp->Base.VerticesOut); st_translate_program_common(st, &sttcp->Base.Base, sttcp->glsl_to_tgsi, - ureg, TGSI_PROCESSOR_TESS_CTRL, &sttcp->tgsi); + ureg, PIPE_SHADER_TESS_CTRL, &sttcp->tgsi); free_glsl_to_tgsi_visitor(sttcp->glsl_to_tgsi); sttcp->glsl_to_tgsi = NULL; @@ -1408,7 +1408,7 @@ st_translate_tesseval_program(struct st_context *st, { struct ureg_program *ureg; - ureg = ureg_create_with_screen(TGSI_PROCESSOR_TESS_EVAL, st->pipe->screen); + ureg = ureg_create_with_screen(PIPE_SHADER_TESS_EVAL, st->pipe->screen); if (ureg == NULL) return false; @@ -1438,7 +1438,7 @@ st_translate_tesseval_program(struct st_context *st, ureg_property(ureg, TGSI_PROPERTY_TES_POINT_MODE, sttep->Base.PointMode); st_translate_program_common(st, &sttep->Base.Base, sttep->glsl_to_tgsi, - ureg, TGSI_PROCESSOR_TESS_EVAL, &sttep->tgsi); + ureg, PIPE_SHADER_TESS_EVAL, &sttep->tgsi); free_glsl_to_tgsi_visitor(sttep->glsl_to_tgsi); sttep->glsl_to_tgsi = NULL; @@ -1456,12 +1456,12 @@ st_translate_compute_program(struct st_context *st, struct ureg_program *ureg; struct pipe_shader_state prog; - ureg = ureg_create_with_screen(TGSI_PROCESSOR_COMPUTE, st->pipe->screen); + ureg = ureg_create_with_screen(PIPE_SHADER_COMPUTE, st->pipe->screen); if (ureg == NULL) return false; st_translate_program_common(st, &stcp->Base.Base, stcp->glsl_to_tgsi, ureg, - TGSI_PROCESSOR_COMPUTE, &prog); + PIPE_SHADER_COMPUTE, &prog); stcp->tgsi.ir_type = PIPE_SHADER_IR_TGSI; stcp->tgsi.prog = prog.tokens; |