replace _mesa_logbase2 with util_logbase2
[mesa.git] / src / mesa / state_tracker / st_mesa_to_tgsi.c
index 0ea201fdd6a2ddc94095eae7574f1385151a4c96..1f5a3cd077e5f4a485d2472b99bcfc7a2d866aad 100644 (file)
@@ -37,6 +37,7 @@
 #include "pipe/p_shader_tokens.h"
 #include "pipe/p_state.h"
 #include "tgsi/tgsi_ureg.h"
+#include "tgsi/tgsi_from_mesa.h"
 #include "st_mesa_to_tgsi.h"
 #include "st_context.h"
 #include "program/prog_instruction.h"
@@ -734,7 +735,7 @@ emit_wpos(struct st_context *st,
     * u,i -> l,h: (99.0 + 0.5) * -1 + 100 = 0.5
     * u,h -> l,i: (99.5 + 0.5) * -1 + 100 = 0
     */
-   if (program->OriginUpperLeft) {
+   if (program->info.fs.origin_upper_left) {
       /* Fragment shader wants origin in upper-left */
       if (pscreen->get_param(pscreen,
                              PIPE_CAP_TGSI_FS_COORD_ORIGIN_UPPER_LEFT)) {
@@ -764,7 +765,7 @@ emit_wpos(struct st_context *st,
          assert(0);
    }
 
-   if (program->PixelCenterInteger) {
+   if (program->info.fs.pixel_center_integer) {
       /* Fragment shader wants pixel center integer */
       if (pscreen->get_param(pscreen,
                              PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_INTEGER)) {
@@ -954,7 +955,7 @@ st_translate_mesa_program(struct gl_context *ctx,
    GLbitfield64 sysInputs = program->info.system_values_read;
    for (i = 0; sysInputs; i++) {
       if (sysInputs & (1ull << i)) {
-         unsigned semName = _mesa_sysval_to_semantic(i);
+         unsigned semName = tgsi_get_sysval_semantic(i);
 
          t->systemValues[i] = ureg_DECL_system_value(ureg, semName, 0);