st/mesa: implement GL_ATI_fragment_shader
v2: fix arithmetic for special opcodes, fix fog state, cleanup v3: simplify handling of special opcodes, fix rebinding with different textargets or fog equation, lots of formatting fixes v4: adapt to the compile early, fix later architecture, formatting fixes Signed-off-by: Miklós Máté <mtmkls@gmail.com> Signed-off-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
@@ -35,6 +35,7 @@
|
||||
#define ST_PROGRAM_H
|
||||
|
||||
#include "main/mtypes.h"
|
||||
#include "main/atifragshader.h"
|
||||
#include "program/program.h"
|
||||
#include "pipe/p_state.h"
|
||||
#include "st_context.h"
|
||||
@@ -65,6 +66,12 @@ struct st_fp_variant_key
|
||||
|
||||
/** for ARB_sample_shading */
|
||||
GLuint persample_shading:1;
|
||||
|
||||
/** needed for ATI_fragment_shader */
|
||||
GLuint fog:2;
|
||||
|
||||
/** needed for ATI_fragment_shader */
|
||||
char texture_targets[MAX_NUM_FRAGMENT_REGISTERS_ATI];
|
||||
};
|
||||
|
||||
|
||||
@@ -99,6 +106,7 @@ struct st_fragment_program
|
||||
struct gl_fragment_program Base;
|
||||
struct pipe_shader_state tgsi;
|
||||
struct glsl_to_tgsi_visitor* glsl_to_tgsi;
|
||||
struct ati_fragment_shader *ati_fs;
|
||||
|
||||
struct st_fp_variant *variants;
|
||||
};
|
||||
|
Reference in New Issue
Block a user