mesa: Move texenvprogram.c to ff_fragment_shader.cpp.

This file is about to change to generating a shader program instead of
a fragment program.
This commit is contained in:
Eric Anholt 2010-10-31 10:51:59 -07:00
parent e1cb12bfff
commit cdacca4868
2 changed files with 16 additions and 7 deletions

View file

@ -26,6 +26,7 @@
*
**************************************************************************/
extern "C" {
#include "glheader.h"
#include "imports.h"
#include "mtypes.h"
@ -37,7 +38,7 @@
#include "program/prog_statevars.h"
#include "program/programopt.h"
#include "texenvprogram.h"
}
/*
* Note on texture units:
@ -524,7 +525,7 @@ struct ureg {
static const struct ureg undef = {
PROGRAM_UNDEFINED,
~0,
255,
0,
0,
0
@ -686,14 +687,15 @@ static struct ureg register_param5( struct texenv_fragment_program *p,
GLint s3,
GLint s4)
{
gl_state_index tokens[STATE_LENGTH];
int tokens[STATE_LENGTH];
GLuint idx;
tokens[0] = s0;
tokens[1] = s1;
tokens[2] = s2;
tokens[3] = s3;
tokens[4] = s4;
idx = _mesa_add_state_reference( p->program->Base.Parameters, tokens );
idx = _mesa_add_state_reference(p->program->Base.Parameters,
(gl_state_index *)tokens);
return make_ureg(PROGRAM_STATE_VAR, idx);
}
@ -1586,6 +1588,7 @@ create_new_program(struct gl_context *ctx, struct state_key *key,
}
}
extern "C" {
/**
* Return a fragment program which implements the current
@ -1616,3 +1619,5 @@ _mesa_get_fixed_func_fragment_program(struct gl_context *ctx)
return prog;
}
}

View file

@ -83,7 +83,6 @@ MAIN_SOURCES = \
main/texcompress_s3tc.c \
main/texcompress_fxt1.c \
main/texenv.c \
main/texenvprogram.c \
main/texfetch.c \
main/texformat.c \
main/texgen.c \
@ -103,6 +102,9 @@ MAIN_SOURCES = \
main/vtxfmt.c \
$(MAIN_ES_SOURCES)
MAIN_CXX_SOURCES = \
main/ff_fragment_shader.cpp
MATH_SOURCES = \
math/m_debug_clip.c \
math/m_debug_norm.c \
@ -316,7 +318,8 @@ MESA_SOURCES = \
$(ASM_C_SOURCES)
MESA_CXX_SOURCES = \
$(SHADER_CXX_SOURCES)
$(MAIN_CXX_SOURCES) \
$(SHADER_CXX_SOURCES)
# Sources for building Gallium drivers
MESA_GALLIUM_SOURCES = \
@ -329,7 +332,8 @@ MESA_GALLIUM_SOURCES = \
x86/common_x86.c
MESA_GALLIUM_CXX_SOURCES = \
$(SHADER_CXX_SOURCES)
$(MAIN_CXX_SOURCES) \
$(SHADER_CXX_SOURCES)
# All the core C sources, for dependency checking
ALL_SOURCES = \