diff options
Diffstat (limited to 'src/mesa/drivers/dri/r300/r300_context.h')
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_context.h | 83 |
1 files changed, 3 insertions, 80 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_context.h b/src/mesa/drivers/dri/r300/r300_context.h index 53b689e00b..f948752e75 100644 --- a/src/mesa/drivers/dri/r300/r300_context.h +++ b/src/mesa/drivers/dri/r300/r300_context.h @@ -47,8 +47,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "colormac.h" #include "radeon_context.h" -#define USE_ARB_F_P 1 - /* PPC doesnt support 16 bit elts ... */ #ifndef MESA_BIG_ENDIAN #define USER_BUFFERS @@ -95,11 +93,7 @@ typedef GLubyte uint8_t; and pixel_shader structure later on */ #define CARD32 GLuint #include "vertex_shader.h" -#if USE_ARB_F_P == 1 #include "r300_fragprog.h" -#else -#include "pixel_shader.h" -#endif #undef CARD32 static __inline__ uint32_t r300PackFloat32(float fl) @@ -120,6 +114,7 @@ struct r300_dma_buffer { drmBufPtr buf; int id; }; +#undef GET_START #ifdef USER_BUFFERS #define GET_START(rvb) (r300GartOffsetFromVirtual(rmesa, (rvb)->address+(rvb)->start)) #else @@ -619,7 +614,6 @@ struct r300_vertex_program { int use_ref_count; }; -#if USE_ARB_F_P == 1 #define PFS_MAX_ALU_INST 64 #define PFS_MAX_TEX_INST 64 #define PFS_MAX_TEX_INDIRECT 4 @@ -710,74 +704,6 @@ struct r300_fragment_program { int max_temp_idx; }; -#else -/* 64 appears to be the maximum */ -#define PSF_MAX_PROGRAM_LENGTH 64 - -struct r300_pixel_shader_program { - struct { - int length; - GLuint inst[PSF_MAX_PROGRAM_LENGTH]; - } tex; - - /* ALU intructions (logic and integer) */ - struct { - int length; - struct { - GLuint inst0; - GLuint inst1; - GLuint inst2; - GLuint inst3; - } inst[PSF_MAX_PROGRAM_LENGTH]; - } alu; - - /* node information */ - /* nodes are used to synchronize ALU and TEX streams */ - /* There could be up to 4 nodes each consisting of - a number of TEX instructions followed by some ALU - instructions */ - /* the last node of a program should always be node3 */ - struct { - int tex_offset; - int tex_end; - int alu_offset; - int alu_end; - } node[4]; - - int active_nodes; /* must be between 1 and 4, inclusive */ - int first_node_has_tex; /* other nodes always have it */ - - int temp_register_count; /* magic value goes into PFS_CNTL_1 */ - - /* entire program */ - int tex_offset; - int tex_end; - int alu_offset; - int alu_end; - - }; - -#define MAX_PIXEL_SHADER_PARAMS 32 -struct r300_pixel_shader_state { - struct r300_pixel_shader_program program; - - int translated; - int have_sample; - GLuint color_reg; - GLuint src_previous; - - /* parameters */ - int param_length; /* to limit the number of unnecessary writes */ - struct { - float x; - float y; - float z; - float w; - } param[MAX_PIXEL_SHADER_PARAMS]; - }; -#endif // USE_ARB_F_P - -/* 8 is somewhat bogus... it is probably something like 24 */ #define R300_MAX_AOS_ARRAYS 16 #define AOS_FORMAT_FLOAT 1 @@ -830,11 +756,7 @@ struct r300_state { struct r300_texture_state texture; struct r300_vap_reg_state vap_reg; struct r300_vertex_shader_state vertex_shader; -#if USE_ARB_F_P == 0 - struct r300_pixel_shader_state pixel_shader; -#else struct r300_pfs_compile_state pfs_compile; -#endif struct r300_dma_region aos[R300_MAX_AOS_ARRAYS]; int aos_count; #ifdef USER_BUFFERS @@ -922,13 +844,14 @@ extern GLboolean r300CreateContext(const __GLcontextModes * glVisual, __DRIcontextPrivate * driContextPriv, void *sharedContextPrivate); -void translate_vertex_shader(struct r300_vertex_program *vp); +void r300_translate_vertex_shader(struct r300_vertex_program *vp); extern void r300InitShaderFuncs(struct dd_function_table *functions); extern int r300VertexProgUpdateParams(GLcontext *ctx, struct r300_vertex_program *vp, float *dst); extern GLboolean r300Fallback(GLcontext *ctx); #ifdef RADEON_VTXFMT_A extern void radeon_init_vtxfmt_a(r300ContextPtr rmesa); +extern GLboolean r300_run_vb_render_vtxfmt_a(GLcontext *ctx, struct tnl_pipeline_stage *stage); #endif #ifdef HW_VBOS |