summaryrefslogtreecommitdiffstats
path: root/src/mesa/program
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/program')
-rw-r--r--src/mesa/program/arbprogparse.c4
-rw-r--r--src/mesa/program/ir_to_mesa.cpp5
-rw-r--r--src/mesa/program/prog_to_nir.c11
3 files changed, 3 insertions, 17 deletions
diff --git a/src/mesa/program/arbprogparse.c b/src/mesa/program/arbprogparse.c
index 7cb1beb5bbb..4038e475c92 100644
--- a/src/mesa/program/arbprogparse.c
+++ b/src/mesa/program/arbprogparse.c
@@ -117,8 +117,8 @@ _mesa_parse_arb_fragment_program(struct gl_context* ctx, GLenum target,
program->SamplersUsed |= (1 << i);
}
program->ShadowSamplers = prog.ShadowSamplers;
- program->OriginUpperLeft = state.option.OriginUpperLeft;
- program->PixelCenterInteger = state.option.PixelCenterInteger;
+ program->info.fs.origin_upper_left = state.option.OriginUpperLeft;
+ program->info.fs.pixel_center_integer = state.option.PixelCenterInteger;
program->info.fs.uses_discard = state.fragment.UsesKill;
diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp
index 2908819d28e..e65a6743353 100644
--- a/src/mesa/program/ir_to_mesa.cpp
+++ b/src/mesa/program/ir_to_mesa.cpp
@@ -618,11 +618,6 @@ ir_to_mesa_visitor::find_variable_storage(const ir_variable *var)
void
ir_to_mesa_visitor::visit(ir_variable *ir)
{
- if (strcmp(ir->name, "gl_FragCoord") == 0) {
- this->prog->OriginUpperLeft = ir->data.origin_upper_left;
- this->prog->PixelCenterInteger = ir->data.pixel_center_integer;
- }
-
if (ir->data.mode == ir_var_uniform && strncmp(ir->name, "gl_", 3) == 0) {
unsigned int i;
const ir_state_slot *const slots = ir->get_state_slots();
diff --git a/src/mesa/program/prog_to_nir.c b/src/mesa/program/prog_to_nir.c
index 312b299361e..1c9d0018d55 100644
--- a/src/mesa/program/prog_to_nir.c
+++ b/src/mesa/program/prog_to_nir.c
@@ -890,10 +890,7 @@ setup_registers_and_variables(struct ptn_compile *c)
var->data.index = 0;
if (c->prog->Target == GL_FRAGMENT_PROGRAM_ARB) {
- if (i == VARYING_SLOT_POS) {
- var->data.origin_upper_left = c->prog->OriginUpperLeft;
- var->data.pixel_center_integer = c->prog->PixelCenterInteger;
- } else if (i == VARYING_SLOT_FOGC) {
+ if (i == VARYING_SLOT_FOGC) {
/* fogcoord is defined as <f, 0.0, 0.0, 1.0>. Make the actual
* input variable a float, and create a local containing the
* full vec4 value.
@@ -934,12 +931,6 @@ setup_registers_and_variables(struct ptn_compile *c)
var->data.location = i;
var->data.index = 0;
- if (c->prog->Target == GL_FRAGMENT_PROGRAM_ARB &&
- i == SYSTEM_VALUE_FRAG_COORD) {
- var->data.origin_upper_left = c->prog->OriginUpperLeft;
- var->data.pixel_center_integer = c->prog->PixelCenterInteger;
- }
-
c->sysval_vars[i] = var;
}