From 2c7b74725bfbd0a022ebfada4736d6cb8ac28047 Mon Sep 17 00:00:00 2001 From: michal Date: Fri, 24 Aug 2007 16:23:02 +0100 Subject: Indent. Remove GL dependencies. Simplify. Add rtasm instructions. --- src/mesa/x86/rtasm/x86sse.c | 54 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) (limited to 'src/mesa/x86/rtasm/x86sse.c') diff --git a/src/mesa/x86/rtasm/x86sse.c b/src/mesa/x86/rtasm/x86sse.c index 3ea37bb5e7..f5b0ccdb9b 100644 --- a/src/mesa/x86/rtasm/x86sse.c +++ b/src/mesa/x86/rtasm/x86sse.c @@ -502,6 +502,14 @@ void sse_addss( struct x86_function *p, emit_modrm( p, dst, src ); } +void sse_andnps( struct x86_function *p, + struct x86_reg dst, + struct x86_reg src ) +{ + emit_2ub(p, X86_TWOB, 0x55); + emit_modrm( p, dst, src ); +} + void sse_andps( struct x86_function *p, struct x86_reg dst, struct x86_reg src ) @@ -510,6 +518,13 @@ void sse_andps( struct x86_function *p, emit_modrm( p, dst, src ); } +void sse_rsqrtps( struct x86_function *p, + struct x86_reg dst, + struct x86_reg src ) +{ + emit_2ub(p, X86_TWOB, 0x52); + emit_modrm( p, dst, src ); +} void sse_rsqrtss( struct x86_function *p, struct x86_reg dst, @@ -538,6 +553,21 @@ void sse_movlhps( struct x86_function *p, emit_modrm( p, dst, src ); } +void sse_orps( struct x86_function *p, + struct x86_reg dst, + struct x86_reg src ) +{ + emit_2ub(p, X86_TWOB, 0x56); + emit_modrm( p, dst, src ); +} + +void sse_xorps( struct x86_function *p, + struct x86_reg dst, + struct x86_reg src ) +{ + emit_2ub(p, X86_TWOB, 0x57); + emit_modrm( p, dst, src ); +} void sse_cvtps2pi( struct x86_function *p, struct x86_reg dst, @@ -576,6 +606,14 @@ void sse_cmpps( struct x86_function *p, emit_1ub(p, cc); } +void sse_pmovmskb( struct x86_function *p, + struct x86_reg dest, + struct x86_reg src) +{ + emit_3ub(p, 0x66, X86_TWOB, 0xD7); + emit_modrm(p, dest, src); +} + /*********************************************************************** * SSE2 instructions */ @@ -593,6 +631,14 @@ void sse2_pshufd( struct x86_function *p, emit_1ub(p, shuf); } +void sse2_cvttps2dq( struct x86_function *p, + struct x86_reg dst, + struct x86_reg src ) +{ + emit_3ub( p, 0xF3, X86_TWOB, 0x5B ); + emit_modrm( p, dst, src ); +} + void sse2_cvtps2dq( struct x86_function *p, struct x86_reg dst, struct x86_reg src ) @@ -625,6 +671,14 @@ void sse2_packuswb( struct x86_function *p, emit_modrm( p, dst, src ); } +void sse2_rcpps( struct x86_function *p, + struct x86_reg dst, + struct x86_reg src ) +{ + emit_2ub(p, X86_TWOB, 0x53); + emit_modrm( p, dst, src ); +} + void sse2_rcpss( struct x86_function *p, struct x86_reg dst, struct x86_reg src ) -- cgit v1.2.3 From 65e3af51efc9d688ef8face0a44429a90c5dd4c9 Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Wed, 26 Sep 2007 12:46:45 +0100 Subject: Enable codegen based whenever __i386__ is defined. --- src/mesa/pipe/draw/draw_vertex_shader.c | 10 ++-------- src/mesa/pipe/softpipe/sp_quad_fs.c | 10 ++-------- src/mesa/pipe/tgsi/exec/tgsi_sse2.c | 2 +- src/mesa/state_tracker/st_cb_program.c | 8 ++++---- src/mesa/state_tracker/st_program.c | 4 ++-- src/mesa/state_tracker/st_program.h | 4 ++-- src/mesa/x86/rtasm/x86sse.c | 2 +- src/mesa/x86/rtasm/x86sse.h | 2 +- 8 files changed, 15 insertions(+), 27 deletions(-) (limited to 'src/mesa/x86/rtasm/x86sse.c') diff --git a/src/mesa/pipe/draw/draw_vertex_shader.c b/src/mesa/pipe/draw/draw_vertex_shader.c index fe4f124dd2..a2e1cdc472 100644 --- a/src/mesa/pipe/draw/draw_vertex_shader.c +++ b/src/mesa/pipe/draw/draw_vertex_shader.c @@ -64,13 +64,11 @@ compute_clipmask(float cx, float cy, float cz, float cw) #endif #endif -#if defined(USE_X86_ASM) || defined(SLANG_X86) -typedef void (XSTDCALL *sse2_function)( +typedef void (XSTDCALL *codegen_function) ( const struct tgsi_exec_vector *input, struct tgsi_exec_vector *output, float (*constant)[4], struct tgsi_exec_vector *temporary ); -#endif /** * Transform vertices with the current vertex program/shader @@ -117,16 +115,12 @@ run_vertex_program(struct draw_context *draw, /* run shader */ if( draw->vertex_shader.executable != NULL ) { -#if defined(USE_X86_ASM) || defined(SLANG_X86) - sse2_function func = (sse2_function) draw->vertex_shader.executable; + codegen_function func = (codegen_function) draw->vertex_shader.executable; func( machine.Inputs, machine.Outputs, machine.Consts, machine.Temps ); -#else - assert( 0 ); -#endif } else { tgsi_exec_machine_run( &machine ); diff --git a/src/mesa/pipe/softpipe/sp_quad_fs.c b/src/mesa/pipe/softpipe/sp_quad_fs.c index bff5525b0f..673d339f41 100755 --- a/src/mesa/pipe/softpipe/sp_quad_fs.c +++ b/src/mesa/pipe/softpipe/sp_quad_fs.c @@ -64,14 +64,12 @@ quad_shade_stage(struct quad_stage *qs) #endif #endif -#if defined(USE_X86_ASM) || defined(SLANG_X86) -typedef void (XSTDCALL *sse2_function)( +typedef void (XSTDCALL *codegen_function)( const struct tgsi_exec_vector *input, struct tgsi_exec_vector *output, float (*constant)[4], struct tgsi_exec_vector *temporary, const struct tgsi_interp_coef *coef ); -#endif /* This should be done by the fragment shader execution unit (code * generated from the decl instructions). Do it here for now. @@ -121,17 +119,13 @@ shade_quad( /* run shader */ if( softpipe->fs->executable != NULL ) { -#if defined(USE_X86_ASM) || defined(SLANG_X86) - sse2_function func = (sse2_function) softpipe->fs->executable; + codegen_function func = (codegen_function) softpipe->fs->executable; func( machine.Inputs, machine.Outputs, machine.Consts, machine.Temps, machine.InterpCoefs ); -#else - assert( 0 ); -#endif } else { tgsi_exec_machine_run( &machine ); diff --git a/src/mesa/pipe/tgsi/exec/tgsi_sse2.c b/src/mesa/pipe/tgsi/exec/tgsi_sse2.c index cf5e386ddf..e7a6112e6e 100755 --- a/src/mesa/pipe/tgsi/exec/tgsi_sse2.c +++ b/src/mesa/pipe/tgsi/exec/tgsi_sse2.c @@ -2,7 +2,7 @@ #include "tgsi_core.h" #include "x86/rtasm/x86sse.h" -#if defined(USE_X86_ASM) || defined(SLANG_X86) +#if defined(__i386__) || defined(__386__) #define FOR_EACH_CHANNEL( CHAN )\ for( CHAN = 0; CHAN < 4; CHAN++ ) diff --git a/src/mesa/state_tracker/st_cb_program.c b/src/mesa/state_tracker/st_cb_program.c index f57d22652f..25dbc2c244 100644 --- a/src/mesa/state_tracker/st_cb_program.c +++ b/src/mesa/state_tracker/st_cb_program.c @@ -86,7 +86,7 @@ static struct gl_program *st_new_program( GLcontext *ctx, prog->serialNo = 1; -#if defined(USE_X86_ASM) || defined(SLANG_X86) +#if defined(__i386__) || defined(__386__) x86_init_func( &prog->sse2_program ); #endif @@ -102,7 +102,7 @@ static struct gl_program *st_new_program( GLcontext *ctx, prog->serialNo = 1; -#if defined(USE_X86_ASM) || defined(SLANG_X86) +#if defined(__i386__) || defined(__386__) x86_init_func( &prog->sse2_program ); #endif @@ -129,7 +129,7 @@ static void st_delete_program( GLcontext *ctx, case GL_VERTEX_PROGRAM_ARB: { struct st_vertex_program *stvp = (struct st_vertex_program *) prog; -#if defined(USE_X86_ASM) || defined(SLANG_X86) +#if defined(__i386__) || defined(__386__) x86_release_func( &stvp->sse2_program ); #endif st_remove_vertex_program(st, stvp); @@ -139,7 +139,7 @@ static void st_delete_program( GLcontext *ctx, { struct st_fragment_program *stfp = (struct st_fragment_program *) prog; -#if defined(USE_X86_ASM) || defined(SLANG_X86) +#if defined(__i386__) || defined(__386__) x86_release_func( &stfp->sse2_program ); #endif st_remove_fragment_program(st, stfp); diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c index 9f363adc5c..44cc33b09f 100644 --- a/src/mesa/state_tracker/st_program.c +++ b/src/mesa/state_tracker/st_program.c @@ -253,7 +253,7 @@ st_translate_vertex_program(struct st_context *st, if (TGSI_DEBUG) tgsi_dump( tokensOut, 0 ); -#if defined(USE_X86_ASM) || defined(SLANG_X86) +#if defined(__i386__) || defined(__386__) if (stvp->sse2_program.csr == stvp->sse2_program.store) tgsi_emit_sse2( tokensOut, &stvp->sse2_program ); @@ -398,7 +398,7 @@ st_translate_fragment_program(struct st_context *st, if (TGSI_DEBUG) tgsi_dump( tokensOut, 0/*TGSI_DUMP_VERBOSE*/ ); -#if defined(USE_X86_ASM) || defined(SLANG_X86) +#if defined(__i386__) || defined(__386__) if (stfp->sse2_program.csr == stfp->sse2_program.store) tgsi_emit_sse2_fs( tokensOut, &stfp->sse2_program ); diff --git a/src/mesa/state_tracker/st_program.h b/src/mesa/state_tracker/st_program.h index 355dee574b..6e106c16b0 100644 --- a/src/mesa/state_tracker/st_program.h +++ b/src/mesa/state_tracker/st_program.h @@ -53,7 +53,7 @@ struct st_fragment_program /** The program in TGSI format */ struct tgsi_token tokens[ST_FP_MAX_TOKENS]; -#if defined(USE_X86_ASM) || defined(SLANG_X86) +#if defined(__i386__) || defined(__386__) struct x86_function sse2_program; #endif @@ -79,7 +79,7 @@ struct st_vertex_program /** The program in TGSI format */ struct tgsi_token tokens[ST_FP_MAX_TOKENS]; -#if defined(USE_X86_ASM) || defined(SLANG_X86) +#if defined(__i386__) || defined(__386__) struct x86_function sse2_program; #endif diff --git a/src/mesa/x86/rtasm/x86sse.c b/src/mesa/x86/rtasm/x86sse.c index f5b0ccdb9b..96c1301d7f 100644 --- a/src/mesa/x86/rtasm/x86sse.c +++ b/src/mesa/x86/rtasm/x86sse.c @@ -1,4 +1,4 @@ -#if defined(USE_X86_ASM) || defined(SLANG_X86) +#if defined(__i386__) || defined(__386__) #include "imports.h" #include "x86sse.h" diff --git a/src/mesa/x86/rtasm/x86sse.h b/src/mesa/x86/rtasm/x86sse.h index c6236395b2..4816bd2ad2 100644 --- a/src/mesa/x86/rtasm/x86sse.h +++ b/src/mesa/x86/rtasm/x86sse.h @@ -2,7 +2,7 @@ #ifndef _X86SSE_H_ #define _X86SSE_H_ -#if defined(USE_X86_ASM) || defined(SLANG_X86) +#if defined(__i386__) || defined(__386__) #include "glheader.h" -- cgit v1.2.3 From 82e2d3226893487d33152f15763516473187c07d Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Wed, 26 Sep 2007 13:30:01 +0100 Subject: Fix some compiler warnings with -pedantic --- src/mesa/pipe/tgsi/exec/tgsi_sse2.c | 18 +++++++++--------- src/mesa/x86/rtasm/x86sse.c | 12 +++++++++--- src/mesa/x86/rtasm/x86sse.h | 2 +- 3 files changed, 19 insertions(+), 13 deletions(-) (limited to 'src/mesa/x86/rtasm/x86sse.c') diff --git a/src/mesa/pipe/tgsi/exec/tgsi_sse2.c b/src/mesa/pipe/tgsi/exec/tgsi_sse2.c index e7a6112e6e..d840d64cae 100755 --- a/src/mesa/pipe/tgsi/exec/tgsi_sse2.c +++ b/src/mesa/pipe/tgsi/exec/tgsi_sse2.c @@ -408,7 +408,7 @@ emit_func_call1( struct x86_function *func, unsigned xmm_dst, unsigned storage, - unsigned char *code ) + void (*code)() ) { x86_push( func, @@ -443,7 +443,7 @@ emit_func_call2( unsigned xmm_dst, unsigned xmm_src, unsigned storage, - unsigned char *code ) + void (*code)() ) { x86_push( func, @@ -506,7 +506,7 @@ emit_cos( func, xmm_dst, ALIGN16( (unsigned) g_cos_storage ), - (unsigned char *) cos4f ); + cos4f ); } /* XXX: move into machine context */ @@ -538,7 +538,7 @@ emit_sin (struct x86_function *func, func, xmm_dst, ALIGN16( (unsigned) g_sin_storage ), - (unsigned char *) sin4f ); + sin4f ); } static void @@ -596,7 +596,7 @@ emit_pow( xmm_dst, xmm_src, ALIGN16( (unsigned) g_pow_storage ), - (unsigned char *) pow4f ); + pow4f ); } /* XXX: move into machine context */ @@ -629,7 +629,7 @@ emit_ex2( func, xmm_dst, ALIGN16( (unsigned) g_ex2_storage ), - (unsigned char *) ex24f ); + ex24f ); } /* XXX: move into machine context */ @@ -655,7 +655,7 @@ emit_lg2( func, xmm_dst, ALIGN16( (unsigned) g_lg2_storage ), - (unsigned char *) lg24f ); + lg24f ); } /* XXX: move into machine context */ @@ -681,7 +681,7 @@ emit_flr( func, xmm_dst, ALIGN16( (unsigned) g_flr_storage ), - (unsigned char *) flr4f ); + flr4f ); } /* XXX: move into machine context */ @@ -707,7 +707,7 @@ emit_frc( func, xmm_dst, ALIGN16( (unsigned) g_frc_storage ), - (unsigned char *) frc4f ); + frc4f ); } static void diff --git a/src/mesa/x86/rtasm/x86sse.c b/src/mesa/x86/rtasm/x86sse.c index 96c1301d7f..a6cfa40f91 100644 --- a/src/mesa/x86/rtasm/x86sse.c +++ b/src/mesa/x86/rtasm/x86sse.c @@ -6,6 +6,12 @@ #define DISASSEM 0 #define X86_TWOB 0x0f +static GLubyte *cptr( void (*label)() ) +{ + return (char *)(unsigned long)label; +} + + /* Emit bytes to the instruction stream: */ static void emit_1b( struct x86_function *p, GLbyte b0 ) @@ -252,10 +258,10 @@ void x86_jmp( struct x86_function *p, GLubyte *label) emit_1i(p, label - x86_get_label(p) - 4); } -void x86_call( struct x86_function *p, GLubyte *label) +void x86_call( struct x86_function *p, void (*label)()) { emit_1ub(p, 0xe8); - emit_1i(p, label - x86_get_label(p) - 4); + emit_1i(p, cptr(label) - x86_get_label(p) - 4); } /* michal: @@ -1138,7 +1144,7 @@ void (*x86_get_func( struct x86_function *p ))(void) { if (DISASSEM) _mesa_printf("disassemble %p %p\n", p->store, p->csr); - return (void (*)(void))p->store; + return (void (*)(void)) (unsigned long) p->store; } #else diff --git a/src/mesa/x86/rtasm/x86sse.h b/src/mesa/x86/rtasm/x86sse.h index 4816bd2ad2..c1ca06088b 100644 --- a/src/mesa/x86/rtasm/x86sse.h +++ b/src/mesa/x86/rtasm/x86sse.h @@ -120,7 +120,7 @@ void x86_fixup_fwd_jump( struct x86_function *p, void x86_jmp( struct x86_function *p, GLubyte *label ); -void x86_call( struct x86_function *p, GLubyte *label ); +void x86_call( struct x86_function *p, void (*label)() ); /* michal: * Temporary. As I need immediate operands, and dont want to mess with the codegen, -- cgit v1.2.3 From 6dcfddb8e2ec2bfb6187b912807fa65f28da2c5e Mon Sep 17 00:00:00 2001 From: Zack Rusin Date: Fri, 28 Sep 2007 04:33:55 -0400 Subject: Redoing the way we handle vertex shaders for the draw module. --- src/mesa/pipe/draw/draw_context.c | 8 ---- src/mesa/pipe/draw/draw_context.h | 9 ++-- src/mesa/pipe/draw/draw_private.h | 14 ++++++- src/mesa/pipe/draw/draw_vertex_fetch.c | 2 +- src/mesa/pipe/draw/draw_vertex_shader.c | 50 +++++++++++++++++++++-- src/mesa/pipe/i915simple/i915_state.c | 44 ++++++++++++-------- src/mesa/pipe/softpipe/sp_context.c | 8 ++-- src/mesa/pipe/softpipe/sp_context.h | 8 +++- src/mesa/pipe/softpipe/sp_state.h | 14 ++++--- src/mesa/pipe/softpipe/sp_state_derived.c | 2 +- src/mesa/pipe/softpipe/sp_state_fs.c | 49 +++++++++++++++++----- src/mesa/state_tracker/st_cb_program.c | 7 ---- src/mesa/state_tracker/st_draw.c | 2 +- src/mesa/state_tracker/st_program.c | 8 ---- src/mesa/state_tracker/st_program.h | 4 -- src/mesa/x86/rtasm/x86sse.c | 68 +++++++++++++++---------------- src/mesa/x86/rtasm/x86sse.h | 49 +++++++++++----------- 17 files changed, 211 insertions(+), 135 deletions(-) (limited to 'src/mesa/x86/rtasm/x86sse.c') diff --git a/src/mesa/pipe/draw/draw_context.c b/src/mesa/pipe/draw/draw_context.c index 66c66ff698..5efb173228 100644 --- a/src/mesa/pipe/draw/draw_context.c +++ b/src/mesa/pipe/draw/draw_context.c @@ -155,14 +155,6 @@ void draw_set_viewport_state( struct draw_context *draw, } -void -draw_set_vertex_shader(struct draw_context *draw, - const struct pipe_shader_state *shader) -{ - draw_flush( draw ); - draw->vertex_shader = *shader; -} - void draw_set_vertex_buffer(struct draw_context *draw, diff --git a/src/mesa/pipe/draw/draw_context.h b/src/mesa/pipe/draw/draw_context.h index 0ccf5f6046..398e96d94d 100644 --- a/src/mesa/pipe/draw/draw_context.h +++ b/src/mesa/pipe/draw/draw_context.h @@ -92,9 +92,12 @@ void draw_set_rasterize_stage( struct draw_context *draw, struct draw_stage *stage ); -void -draw_set_vertex_shader(struct draw_context *draw, - const struct pipe_shader_state *shader); +void * draw_create_vertex_shader(struct draw_context *draw, + const struct pipe_shader_state *shader); +void draw_bind_vertex_shader(struct draw_context *draw, + void *vcso); +void draw_delete_vertex_shader(struct draw_context *draw, + void *vcso); void diff --git a/src/mesa/pipe/draw/draw_private.h b/src/mesa/pipe/draw/draw_private.h index ebef5347ab..2f52299f74 100644 --- a/src/mesa/pipe/draw/draw_private.h +++ b/src/mesa/pipe/draw/draw_private.h @@ -46,6 +46,7 @@ #include "draw_vertex.h" +#include "x86/rtasm/x86sse.h" /** * Basic vertex info. @@ -104,7 +105,7 @@ struct draw_stage void (*tri)( struct draw_stage *, struct prim_header * ); - + void (*end)( struct draw_stage * ); void (*reset_stipple_counter)( struct draw_stage * ); @@ -116,6 +117,15 @@ struct draw_stage #define VCACHE_OVERFLOW 4 #define VS_QUEUE_LENGTH (VCACHE_SIZE + VCACHE_OVERFLOW + 1) /* can never fill up */ +/** + * Private version of the compiled vertex_shader + */ +struct draw_vertex_shader { + const struct pipe_shader_state *state; +#if defined(__i386__) || defined(__386__) + struct x86_function sse2_program; +#endif +}; /** * Private context for the drawing module. @@ -145,7 +155,7 @@ struct draw_context struct pipe_viewport_state viewport; struct pipe_vertex_buffer vertex_buffer[PIPE_ATTRIB_MAX]; struct pipe_vertex_element vertex_element[PIPE_ATTRIB_MAX]; - struct pipe_shader_state vertex_shader; + const struct draw_vertex_shader *vertex_shader; struct pipe_vertex_buffer feedback_buffer[PIPE_ATTRIB_MAX]; struct pipe_vertex_element feedback_element[PIPE_ATTRIB_MAX]; diff --git a/src/mesa/pipe/draw/draw_vertex_fetch.c b/src/mesa/pipe/draw/draw_vertex_fetch.c index 2b839d641e..bc37e18c34 100644 --- a/src/mesa/pipe/draw/draw_vertex_fetch.c +++ b/src/mesa/pipe/draw/draw_vertex_fetch.c @@ -85,7 +85,7 @@ void draw_vertex_fetch( struct draw_context *draw, /*printf("fetch vertex %u: \n", j);*/ /* loop over vertex attributes (vertex shader inputs) */ - for (attr = 0; attr < draw->vertex_shader.num_inputs; attr++) { + for (attr = 0; attr < draw->vertex_shader->state->num_inputs; attr++) { unsigned buf = draw->vertex_element[attr].vertex_buffer_index; const void *src diff --git a/src/mesa/pipe/draw/draw_vertex_shader.c b/src/mesa/pipe/draw/draw_vertex_shader.c index a2e1cdc472..f7ddbd1909 100644 --- a/src/mesa/pipe/draw/draw_vertex_shader.c +++ b/src/mesa/pipe/draw/draw_vertex_shader.c @@ -36,6 +36,8 @@ #include "draw_context.h" #include "draw_vertex.h" +#include "x86/rtasm/x86sse.h" + #include "pipe/tgsi/exec/tgsi_core.h" static INLINE unsigned @@ -70,6 +72,7 @@ typedef void (XSTDCALL *codegen_function) ( float (*constant)[4], struct tgsi_exec_vector *temporary ); + /** * Transform vertices with the current vertex program/shader * Up to four vertices can be shaded at a time. @@ -92,7 +95,7 @@ run_vertex_program(struct draw_context *draw, const float *trans = draw->viewport.translate; assert(count <= 4); - assert(draw->vertex_shader.output_semantic_name[0] + assert(draw->vertex_shader->state->output_semantic_name[0] == TGSI_SEMANTIC_POSITION); #ifdef DEBUG @@ -101,7 +104,7 @@ run_vertex_program(struct draw_context *draw, /* init machine state */ tgsi_exec_machine_init(&machine, - draw->vertex_shader.tokens, + draw->vertex_shader->state->tokens, PIPE_MAX_SAMPLERS, NULL /*samplers*/ ); @@ -114,8 +117,8 @@ run_vertex_program(struct draw_context *draw, draw_vertex_fetch( draw, &machine, elts, count ); /* run shader */ - if( draw->vertex_shader.executable != NULL ) { - codegen_function func = (codegen_function) draw->vertex_shader.executable; + if( draw->vertex_shader->state->executable != NULL ) { + codegen_function func = (codegen_function) draw->vertex_shader->state->executable; func( machine.Inputs, machine.Outputs, @@ -206,3 +209,42 @@ void draw_vertex_shader_queue_flush( struct draw_context *draw ) draw->vs.queue_nr = 0; } + +void * +draw_create_vertex_shader(struct draw_context *draw, + const struct pipe_shader_state *shader) +{ + struct draw_vertex_shader *vs = calloc(1, sizeof(struct draw_vertex_shader)); + + vs->state = shader; +#if defined(__i386__) || defined(__386__) + x86_init_func(&vs->sse2_program); + + tgsi_emit_sse2(shader->tokens, &vs->sse2_program); + + ((struct pipe_shader_state*)(vs->state))->executable = + x86_get_func(&vs->sse2_program); +#endif + + return vs; +} + +void draw_bind_vertex_shader(struct draw_context *draw, + void *vcso) +{ + draw_flush(draw); + draw->vertex_shader = (struct draw_vertex_shader*)(vcso); +} + +void draw_delete_vertex_shader(struct draw_context *draw, + void *vcso) +{ + struct draw_vertex_shader *vs = (struct draw_vertex_shader*)(vcso); +#if defined(__i386__) || defined(__386__) + x86_release_func(&vs->sse2_program); +#endif + free(vcso); +} + + + diff --git a/src/mesa/pipe/i915simple/i915_state.c b/src/mesa/pipe/i915simple/i915_state.c index 5c6d37a466..19ca5e575f 100644 --- a/src/mesa/pipe/i915simple/i915_state.c +++ b/src/mesa/pipe/i915simple/i915_state.c @@ -443,16 +443,13 @@ static void i915_set_polygon_stipple( struct pipe_context *pipe, { } - -static void * -i915_create_shader_state(struct pipe_context *pipe, - const struct pipe_shader_state *templ) +static void * i915_create_fs_state(struct pipe_context *pipe, + const struct pipe_shader_state *templ) { return 0; } -static void i915_bind_fs_state( struct pipe_context *pipe, - void *fs ) +static void i915_bind_fs_state(struct pipe_context *pipe, void *fs) { struct i915_context *i915 = i915_context(pipe); @@ -461,20 +458,35 @@ static void i915_bind_fs_state( struct pipe_context *pipe, i915->dirty |= I915_NEW_FS; } +static void i915_delete_fs_state(struct pipe_context *pipe, void *shader) +{ + /*do nothing*/ +} -static void i915_bind_vs_state(struct pipe_context *pipe, - void *vs) +static void * +i915_create_vs_state(struct pipe_context *pipe, + const struct pipe_shader_state *templ) { struct i915_context *i915 = i915_context(pipe); /* just pass-through to draw module */ - draw_set_vertex_shader(i915->draw, (const struct pipe_shader_state *)vs); + return draw_create_vertex_shader(i915->draw, templ); } -static void i915_delete_shader_state(struct pipe_context *pipe, - void *shader) +static void i915_bind_vs_state(struct pipe_context *pipe, void *vs) { - /*do nothing*/ + struct i915_context *i915 = i915_context(pipe); + + /* just pass-through to draw module */ + draw_bind_vertex_shader(i915->draw, vs); +} + +static void i915_delete_vs_state(struct pipe_context *pipe, void *shader) +{ + struct i915_context *i915 = i915_context(pipe); + + /* just pass-through to draw module */ + draw_delete_vertex_shader(i915->draw, shader); } static void i915_set_constant_buffer(struct pipe_context *pipe, @@ -707,12 +719,12 @@ i915_init_state_functions( struct i915_context *i915 ) i915->pipe.create_rasterizer_state = i915_create_rasterizer_state; i915->pipe.bind_rasterizer_state = i915_bind_rasterizer_state; i915->pipe.delete_rasterizer_state = i915_delete_rasterizer_state; - i915->pipe.create_fs_state = i915_create_shader_state; + i915->pipe.create_fs_state = i915_create_fs_state; i915->pipe.bind_fs_state = i915_bind_fs_state; - i915->pipe.delete_fs_state = i915_delete_shader_state; - i915->pipe.create_vs_state = i915_create_shader_state; + i915->pipe.delete_fs_state = i915_delete_fs_state; + i915->pipe.create_vs_state = i915_create_vs_state; i915->pipe.bind_vs_state = i915_bind_vs_state; - i915->pipe.delete_vs_state = i915_delete_shader_state; + i915->pipe.delete_vs_state = i915_delete_vs_state; i915->pipe.set_blend_color = i915_set_blend_color; i915->pipe.set_clip_state = i915_set_clip_state; diff --git a/src/mesa/pipe/softpipe/sp_context.c b/src/mesa/pipe/softpipe/sp_context.c index e415966dae..695bf1a9e0 100644 --- a/src/mesa/pipe/softpipe/sp_context.c +++ b/src/mesa/pipe/softpipe/sp_context.c @@ -275,12 +275,12 @@ struct pipe_context *softpipe_create( struct pipe_winsys *pipe_winsys, softpipe->pipe.create_rasterizer_state = softpipe_create_rasterizer_state; softpipe->pipe.bind_rasterizer_state = softpipe_bind_rasterizer_state; softpipe->pipe.delete_rasterizer_state = softpipe_delete_rasterizer_state; - softpipe->pipe.create_fs_state = softpipe_create_shader_state; + softpipe->pipe.create_fs_state = softpipe_create_fs_state; softpipe->pipe.bind_fs_state = softpipe_bind_fs_state; - softpipe->pipe.delete_fs_state = softpipe_delete_shader_state; - softpipe->pipe.create_vs_state = softpipe_create_shader_state; + softpipe->pipe.delete_fs_state = softpipe_delete_fs_state; + softpipe->pipe.create_vs_state = softpipe_create_vs_state; softpipe->pipe.bind_vs_state = softpipe_bind_vs_state; - softpipe->pipe.delete_vs_state = softpipe_delete_shader_state; + softpipe->pipe.delete_vs_state = softpipe_delete_vs_state; softpipe->pipe.set_blend_color = softpipe_set_blend_color; softpipe->pipe.set_clip_state = softpipe_set_clip_state; diff --git a/src/mesa/pipe/softpipe/sp_context.h b/src/mesa/pipe/softpipe/sp_context.h index c0a681f3d6..ccf29b5683 100644 --- a/src/mesa/pipe/softpipe/sp_context.h +++ b/src/mesa/pipe/softpipe/sp_context.h @@ -62,8 +62,12 @@ struct draw_stage; #define SP_NEW_VS 0x2000 #define SP_NEW_CONSTANTS 0x4000 +struct sp_vertex_shader_state { + const struct pipe_shader_state *state; + void *draw_data; +}; -struct softpipe_context { +struct softpipe_context { struct pipe_context pipe; /**< base class */ struct softpipe_winsys *winsys; /**< window system interface */ @@ -76,7 +80,7 @@ struct softpipe_context { const struct pipe_depth_stencil_state *depth_stencil; const struct pipe_rasterizer_state *rasterizer; const struct pipe_shader_state *fs; - const struct pipe_shader_state *vs; + const struct sp_vertex_shader_state *vs; struct pipe_blend_color blend_color; struct pipe_clear_color_state clear_color; diff --git a/src/mesa/pipe/softpipe/sp_state.h b/src/mesa/pipe/softpipe/sp_state.h index f0e1461d25..f9061e86e5 100644 --- a/src/mesa/pipe/softpipe/sp_state.h +++ b/src/mesa/pipe/softpipe/sp_state.h @@ -87,12 +87,14 @@ void softpipe_set_constant_buffer(struct pipe_context *, void softpipe_set_feedback_state( struct pipe_context *, const struct pipe_feedback_state * ); -void * -softpipe_create_shader_state( struct pipe_context *, - const struct pipe_shader_state * ); -void softpipe_bind_fs_state( struct pipe_context *, void * ); -void softpipe_bind_vs_state( struct pipe_context *, void * ); -void softpipe_delete_shader_state( struct pipe_context *, void * ); +void *softpipe_create_fs_state(struct pipe_context *, + const struct pipe_shader_state *); +void softpipe_bind_fs_state(struct pipe_context *, void *); +void softpipe_delete_fs_state(struct pipe_context *, void *); +void *softpipe_create_vs_state(struct pipe_context *, + const struct pipe_shader_state *); +void softpipe_bind_vs_state(struct pipe_context *, void *); +void softpipe_delete_vs_state(struct pipe_context *, void *); void softpipe_set_polygon_stipple( struct pipe_context *, const struct pipe_poly_stipple * ); diff --git a/src/mesa/pipe/softpipe/sp_state_derived.c b/src/mesa/pipe/softpipe/sp_state_derived.c index 6c6e798069..b6145df8e2 100644 --- a/src/mesa/pipe/softpipe/sp_state_derived.c +++ b/src/mesa/pipe/softpipe/sp_state_derived.c @@ -43,7 +43,7 @@ */ static void calculate_vertex_layout( struct softpipe_context *softpipe ) { - const struct pipe_shader_state *vs = softpipe->vs; + const struct pipe_shader_state *vs = softpipe->vs->state; const struct pipe_shader_state *fs = softpipe->fs; const interp_mode colorInterp = softpipe->rasterizer->flatshade ? INTERP_CONSTANT : INTERP_LINEAR; diff --git a/src/mesa/pipe/softpipe/sp_state_fs.c b/src/mesa/pipe/softpipe/sp_state_fs.c index 8306a95f44..f1bec2c73a 100644 --- a/src/mesa/pipe/softpipe/sp_state_fs.c +++ b/src/mesa/pipe/softpipe/sp_state_fs.c @@ -33,10 +33,13 @@ #include "pipe/draw/draw_context.h" -void * softpipe_create_shader_state(struct pipe_context *pipe, - const struct pipe_shader_state *templ) +void * softpipe_create_fs_state(struct pipe_context *pipe, + const struct pipe_shader_state *templ) { - /* we just want the pipe_shader_state template in the bind calls */ + /* Decide whether we'll be codegenerating this shader and if so do + * that now. + */ + return 0; } @@ -49,25 +52,51 @@ void softpipe_bind_fs_state(struct pipe_context *pipe, void *fs) softpipe->dirty |= SP_NEW_FS; } +void softpipe_delete_fs_state(struct pipe_context *pipe, + void *shader) +{ +} + + +void * softpipe_create_vs_state(struct pipe_context *pipe, + const struct pipe_shader_state *templ) +{ + struct softpipe_context *softpipe = softpipe_context(pipe); + struct sp_vertex_shader_state *state = + malloc(sizeof(struct sp_vertex_shader_state)); + + state->state = templ; + state->draw_data = draw_create_vertex_shader(softpipe->draw, + state->state); + + return state; +} void softpipe_bind_vs_state(struct pipe_context *pipe, void *vs) { struct softpipe_context *softpipe = softpipe_context(pipe); - softpipe->vs = (struct pipe_shader_state *)vs; + softpipe->vs = (const struct sp_vertex_shader_state *)vs; - softpipe->dirty |= SP_NEW_VS; + draw_bind_vertex_shader(softpipe->draw, softpipe->vs->draw_data); - draw_set_vertex_shader(softpipe->draw, (struct pipe_shader_state *)vs); + softpipe->dirty |= SP_NEW_VS; } - -void softpipe_delete_shader_state( struct pipe_context *pipe, - void *shader ) +void softpipe_delete_vs_state(struct pipe_context *pipe, + void *vs) { - /* do nothing */ + struct softpipe_context *softpipe = softpipe_context(pipe); + + struct sp_vertex_shader_state *state = + (struct sp_vertex_shader_state *)vs; + + draw_delete_vertex_shader(softpipe->draw, state->draw_data); + free(state); } + + void softpipe_set_constant_buffer(struct pipe_context *pipe, uint shader, uint index, const struct pipe_constant_buffer *buf) diff --git a/src/mesa/state_tracker/st_cb_program.c b/src/mesa/state_tracker/st_cb_program.c index 25dbc2c244..3a7ce9405e 100644 --- a/src/mesa/state_tracker/st_cb_program.c +++ b/src/mesa/state_tracker/st_cb_program.c @@ -86,10 +86,6 @@ static struct gl_program *st_new_program( GLcontext *ctx, prog->serialNo = 1; -#if defined(__i386__) || defined(__386__) - x86_init_func( &prog->sse2_program ); -#endif - return _mesa_init_vertex_program( ctx, &prog->Base, target, @@ -129,9 +125,6 @@ static void st_delete_program( GLcontext *ctx, case GL_VERTEX_PROGRAM_ARB: { struct st_vertex_program *stvp = (struct st_vertex_program *) prog; -#if defined(__i386__) || defined(__386__) - x86_release_func( &stvp->sse2_program ); -#endif st_remove_vertex_program(st, stvp); } break; diff --git a/src/mesa/state_tracker/st_draw.c b/src/mesa/state_tracker/st_draw.c index ce5bf0c8a9..7c836ba2c1 100644 --- a/src/mesa/state_tracker/st_draw.c +++ b/src/mesa/state_tracker/st_draw.c @@ -405,7 +405,7 @@ st_feedback_draw_vbo(GLcontext *ctx, draw_set_viewport_state(draw, &st->state.viewport); draw_set_clip_state(draw, &st->state.clip); draw_set_rasterizer_state(draw, &st->state.rasterizer->state); - draw_set_vertex_shader(draw, &st->state.vs->state); + draw_bind_vertex_shader(draw, st->state.vs->data); /* XXX need to set vertex info too */ diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c index 44cc33b09f..116b59a067 100644 --- a/src/mesa/state_tracker/st_program.c +++ b/src/mesa/state_tracker/st_program.c @@ -253,14 +253,6 @@ st_translate_vertex_program(struct st_context *st, if (TGSI_DEBUG) tgsi_dump( tokensOut, 0 ); -#if defined(__i386__) || defined(__386__) - if (stvp->sse2_program.csr == stvp->sse2_program.store) - tgsi_emit_sse2( tokensOut, &stvp->sse2_program ); - - if (!cso->state.executable) - ((struct cso_vertex_shader*)cso)->state.executable = (void *) x86_get_func( &stvp->sse2_program ); -#endif - return cso; } diff --git a/src/mesa/state_tracker/st_program.h b/src/mesa/state_tracker/st_program.h index 6e106c16b0..2b79201313 100644 --- a/src/mesa/state_tracker/st_program.h +++ b/src/mesa/state_tracker/st_program.h @@ -79,10 +79,6 @@ struct st_vertex_program /** The program in TGSI format */ struct tgsi_token tokens[ST_FP_MAX_TOKENS]; -#if defined(__i386__) || defined(__386__) - struct x86_function sse2_program; -#endif - /** Pointer to the corresponding cached shader */ const struct cso_vertex_shader *vs; diff --git a/src/mesa/x86/rtasm/x86sse.c b/src/mesa/x86/rtasm/x86sse.c index a6cfa40f91..f9a9352e46 100644 --- a/src/mesa/x86/rtasm/x86sse.c +++ b/src/mesa/x86/rtasm/x86sse.c @@ -6,22 +6,22 @@ #define DISASSEM 0 #define X86_TWOB 0x0f -static GLubyte *cptr( void (*label)() ) +static unsigned char *cptr( void (*label)() ) { - return (char *)(unsigned long)label; + return (unsigned char *)(unsigned long)label; } /* Emit bytes to the instruction stream: */ -static void emit_1b( struct x86_function *p, GLbyte b0 ) +static void emit_1b( struct x86_function *p, char b0 ) { - *(GLbyte *)(p->csr++) = b0; + *(char *)(p->csr++) = b0; } -static void emit_1i( struct x86_function *p, GLint i0 ) +static void emit_1i( struct x86_function *p, int i0 ) { - *(GLint *)(p->csr) = i0; + *(int *)(p->csr) = i0; p->csr += 4; } @@ -35,20 +35,20 @@ static void disassem( struct x86_function *p, const char *fn ) #endif } -static void emit_1ub_fn( struct x86_function *p, GLubyte b0, const char *fn ) +static void emit_1ub_fn( struct x86_function *p, unsigned char b0, const char *fn ) { disassem(p, fn); *(p->csr++) = b0; } -static void emit_2ub_fn( struct x86_function *p, GLubyte b0, GLubyte b1, const char *fn ) +static void emit_2ub_fn( struct x86_function *p, unsigned char b0, unsigned char b1, const char *fn ) { disassem(p, fn); *(p->csr++) = b0; *(p->csr++) = b1; } -static void emit_3ub_fn( struct x86_function *p, GLubyte b0, GLubyte b1, GLubyte b2, const char *fn ) +static void emit_3ub_fn( struct x86_function *p, unsigned char b0, unsigned char b1, unsigned char b2, const char *fn ) { disassem(p, fn); *(p->csr++) = b0; @@ -69,7 +69,7 @@ static void emit_modrm( struct x86_function *p, struct x86_reg reg, struct x86_reg regmem ) { - GLubyte val = 0; + unsigned char val = 0; assert(reg.mod == mod_REG); @@ -104,7 +104,7 @@ static void emit_modrm( struct x86_function *p, static void emit_modrm_noreg( struct x86_function *p, - GLuint op, + unsigned op, struct x86_reg regmem ) { struct x86_reg dummy = x86_make_reg(file_REG32, op); @@ -117,8 +117,8 @@ static void emit_modrm_noreg( struct x86_function *p, * the arguments presented. */ static void emit_op_modrm( struct x86_function *p, - GLubyte op_dst_is_reg, - GLubyte op_dst_is_mem, + unsigned char op_dst_is_reg, + unsigned char op_dst_is_mem, struct x86_reg dst, struct x86_reg src ) { @@ -162,7 +162,7 @@ struct x86_reg x86_make_reg( enum x86_reg_file file, } struct x86_reg x86_make_disp( struct x86_reg reg, - GLint disp ) + int disp ) { assert(reg.file == file_REG32); @@ -191,7 +191,7 @@ struct x86_reg x86_get_base_reg( struct x86_reg reg ) return x86_make_reg( reg.file, reg.idx ); } -GLubyte *x86_get_label( struct x86_function *p ) +unsigned char *x86_get_label( struct x86_function *p ) { return p->csr; } @@ -205,13 +205,13 @@ GLubyte *x86_get_label( struct x86_function *p ) void x86_jcc( struct x86_function *p, enum x86_cc cc, - GLubyte *label ) + unsigned char *label ) { - GLint offset = label - (x86_get_label(p) + 2); + int offset = label - (x86_get_label(p) + 2); if (offset <= 127 && offset >= -128) { emit_1ub(p, 0x70 + cc); - emit_1b(p, (GLbyte) offset); + emit_1b(p, (char) offset); } else { offset = label - (x86_get_label(p) + 6); @@ -222,7 +222,7 @@ void x86_jcc( struct x86_function *p, /* Always use a 32bit offset for forward jumps: */ -GLubyte *x86_jcc_forward( struct x86_function *p, +unsigned char *x86_jcc_forward( struct x86_function *p, enum x86_cc cc ) { emit_2ub(p, 0x0f, 0x80 + cc); @@ -230,14 +230,14 @@ GLubyte *x86_jcc_forward( struct x86_function *p, return x86_get_label(p); } -GLubyte *x86_jmp_forward( struct x86_function *p) +unsigned char *x86_jmp_forward( struct x86_function *p) { emit_1ub(p, 0xe9); emit_1i(p, 0); return x86_get_label(p); } -GLubyte *x86_call_forward( struct x86_function *p) +unsigned char *x86_call_forward( struct x86_function *p) { emit_1ub(p, 0xe8); emit_1i(p, 0); @@ -247,12 +247,12 @@ GLubyte *x86_call_forward( struct x86_function *p) /* Fixup offset from forward jump: */ void x86_fixup_fwd_jump( struct x86_function *p, - GLubyte *fixup ) + unsigned char *fixup ) { *(int *)(fixup - 4) = x86_get_label(p) - fixup; } -void x86_jmp( struct x86_function *p, GLubyte *label) +void x86_jmp( struct x86_function *p, unsigned char *label) { emit_1ub(p, 0xe9); emit_1i(p, label - x86_get_label(p) - 4); @@ -268,7 +268,7 @@ void x86_call( struct x86_function *p, void (*label)()) * Temporary. As I need immediate operands, and dont want to mess with the codegen, * I load the immediate into general purpose register and use it. */ -void x86_mov_reg_imm( struct x86_function *p, struct x86_reg dst, GLint imm ) +void x86_mov_reg_imm( struct x86_function *p, struct x86_reg dst, int imm ) { assert(dst.mod == mod_REG); emit_1ub(p, 0xb8 + dst.idx); @@ -595,7 +595,7 @@ void sse_cvtps2pi( struct x86_function *p, void sse_shufps( struct x86_function *p, struct x86_reg dest, struct x86_reg arg0, - GLubyte shuf) + unsigned char shuf) { emit_2ub(p, X86_TWOB, 0xC6); emit_modrm(p, dest, arg0); @@ -605,7 +605,7 @@ void sse_shufps( struct x86_function *p, void sse_cmpps( struct x86_function *p, struct x86_reg dest, struct x86_reg arg0, - GLubyte cc) + unsigned char cc) { emit_2ub(p, X86_TWOB, 0xC2); emit_modrm(p, dest, arg0); @@ -630,7 +630,7 @@ void sse_pmovmskb( struct x86_function *p, void sse2_pshufd( struct x86_function *p, struct x86_reg dest, struct x86_reg arg0, - GLubyte shuf) + unsigned char shuf) { emit_3ub(p, 0x66, X86_TWOB, 0x70); emit_modrm(p, dest, arg0); @@ -772,11 +772,11 @@ void x87_fclex( struct x86_function *p ) static void x87_arith_op( struct x86_function *p, struct x86_reg dst, struct x86_reg arg, - GLubyte dst0ub0, - GLubyte dst0ub1, - GLubyte arg0ub0, - GLubyte arg0ub1, - GLubyte argmem_noreg) + unsigned char dst0ub0, + unsigned char dst0ub1, + unsigned char arg0ub0, + unsigned char arg0ub1, + unsigned char argmem_noreg) { assert(dst.file == file_x87); @@ -1116,7 +1116,7 @@ void mmx_movq( struct x86_function *p, * account any push/pop activity: */ struct x86_reg x86_fn_arg( struct x86_function *p, - GLuint arg ) + unsigned arg ) { return x86_make_disp(x86_make_reg(file_REG32, reg_SP), p->stack_offset + arg * 4); /* ??? */ @@ -1128,7 +1128,7 @@ void x86_init_func( struct x86_function *p ) x86_init_func_size(p, 1024); } -void x86_init_func_size( struct x86_function *p, GLuint code_size ) +void x86_init_func_size( struct x86_function *p, unsigned code_size ) { p->store = _mesa_exec_malloc(code_size); p->csr = p->store; diff --git a/src/mesa/x86/rtasm/x86sse.h b/src/mesa/x86/rtasm/x86sse.h index c1ca06088b..63b9a36392 100644 --- a/src/mesa/x86/rtasm/x86sse.h +++ b/src/mesa/x86/rtasm/x86sse.h @@ -4,24 +4,22 @@ #if defined(__i386__) || defined(__386__) -#include "glheader.h" - /* It is up to the caller to ensure that instructions issued are * suitable for the host cpu. There are no checks made in this module * for mmx/sse/sse2 support on the cpu. */ struct x86_reg { - GLuint file:3; - GLuint idx:3; - GLuint mod:2; /* mod_REG if this is just a register */ - GLint disp:24; /* only +/- 23bits of offset - should be enough... */ + unsigned file:3; + unsigned idx:3; + unsigned mod:2; /* mod_REG if this is just a register */ + int disp:24; /* only +/- 23bits of offset - should be enough... */ }; struct x86_function { - GLubyte *store; - GLubyte *csr; - GLuint stack_offset; - GLint need_emms; + unsigned char *store; + unsigned char *csr; + unsigned stack_offset; + int need_emms; const char *fn; }; @@ -81,7 +79,7 @@ enum sse_cc { void x86_init_func( struct x86_function *p ); -void x86_init_func_size( struct x86_function *p, GLuint code_size ); +void x86_init_func_size( struct x86_function *p, unsigned code_size ); void x86_release_func( struct x86_function *p ); void (*x86_get_func( struct x86_function *p ))( void ); @@ -93,7 +91,7 @@ struct x86_reg x86_make_reg( enum x86_reg_file file, enum x86_reg_name idx ); struct x86_reg x86_make_disp( struct x86_reg reg, - GLint disp ); + int disp ); struct x86_reg x86_deref( struct x86_reg reg ); @@ -102,23 +100,23 @@ struct x86_reg x86_get_base_reg( struct x86_reg reg ); /* Labels, jumps and fixup: */ -GLubyte *x86_get_label( struct x86_function *p ); +unsigned char *x86_get_label( struct x86_function *p ); void x86_jcc( struct x86_function *p, enum x86_cc cc, - GLubyte *label ); + unsigned char *label ); -GLubyte *x86_jcc_forward( struct x86_function *p, +unsigned char *x86_jcc_forward( struct x86_function *p, enum x86_cc cc ); -GLubyte *x86_jmp_forward( struct x86_function *p); +unsigned char *x86_jmp_forward( struct x86_function *p); -GLubyte *x86_call_forward( struct x86_function *p); +unsigned char *x86_call_forward( struct x86_function *p); void x86_fixup_fwd_jump( struct x86_function *p, - GLubyte *fixup ); + unsigned char *fixup ); -void x86_jmp( struct x86_function *p, GLubyte *label ); +void x86_jmp( struct x86_function *p, unsigned char *label ); void x86_call( struct x86_function *p, void (*label)() ); @@ -126,7 +124,7 @@ void x86_call( struct x86_function *p, void (*label)() ); * Temporary. As I need immediate operands, and dont want to mess with the codegen, * I load the immediate into general purpose register and use it. */ -void x86_mov_reg_imm( struct x86_function *p, struct x86_reg dst, GLint imm ); +void x86_mov_reg_imm( struct x86_function *p, struct x86_reg dst, int imm ); /* Macro for sse_shufps() and sse2_pshufd(): @@ -147,7 +145,8 @@ void sse2_movd( struct x86_function *p, struct x86_reg dst, struct x86_reg src ) void sse2_packssdw( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); void sse2_packsswb( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); void sse2_packuswb( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse2_pshufd( struct x86_function *p, struct x86_reg dest, struct x86_reg arg0, GLubyte shuf ); +void sse2_pshufd( struct x86_function *p, struct x86_reg dest, struct x86_reg arg0, + unsigned char shuf ); void sse2_rcpps( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); void sse2_rcpss( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); @@ -157,7 +156,8 @@ void sse_cvtps2pi( struct x86_function *p, struct x86_reg dst, struct x86_reg sr void sse_divss( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); void sse_andnps( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); void sse_andps( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse_cmpps( struct x86_function *p, struct x86_reg dst, struct x86_reg src, GLubyte cc ); +void sse_cmpps( struct x86_function *p, struct x86_reg dst, struct x86_reg src, + unsigned char cc ); void sse_maxps( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); void sse_maxss( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); void sse_minps( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); @@ -175,7 +175,8 @@ void sse_xorps( struct x86_function *p, struct x86_reg dst, struct x86_reg src ) void sse_subps( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); void sse_rsqrtps( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); void sse_rsqrtss( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse_shufps( struct x86_function *p, struct x86_reg dest, struct x86_reg arg0, GLubyte shuf ); +void sse_shufps( struct x86_function *p, struct x86_reg dest, struct x86_reg arg0, + unsigned char shuf ); void sse_pmovmskb( struct x86_function *p, struct x86_reg dest, struct x86_reg src ); void x86_add( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); @@ -247,7 +248,7 @@ void x87_fucom( struct x86_function *p, struct x86_reg arg ); * account any push/pop activity. Note - doesn't track explict * manipulation of ESP by other instructions. */ -struct x86_reg x86_fn_arg( struct x86_function *p, GLuint arg ); +struct x86_reg x86_fn_arg( struct x86_function *p, unsigned arg ); #endif #endif -- cgit v1.2.3 From 901577e07fcab0cf90a272fee900cb0831ae84c3 Mon Sep 17 00:00:00 2001 From: Zack Rusin Date: Fri, 28 Sep 2007 12:28:16 -0400 Subject: Revert "Redoing the way we handle vertex shaders for the draw module." This reverts commit 6dcfddb8e2ec2bfb6187b912807fa65f28da2c5e. --- src/mesa/pipe/draw/draw_context.c | 8 ++++ src/mesa/pipe/draw/draw_context.h | 9 ++-- src/mesa/pipe/draw/draw_private.h | 14 +------ src/mesa/pipe/draw/draw_vertex_fetch.c | 2 +- src/mesa/pipe/draw/draw_vertex_shader.c | 50 ++--------------------- src/mesa/pipe/i915simple/i915_state.c | 44 ++++++++------------ src/mesa/pipe/softpipe/sp_context.c | 8 ++-- src/mesa/pipe/softpipe/sp_context.h | 8 +--- src/mesa/pipe/softpipe/sp_state.h | 14 +++---- src/mesa/pipe/softpipe/sp_state_derived.c | 2 +- src/mesa/pipe/softpipe/sp_state_fs.c | 49 +++++----------------- src/mesa/state_tracker/st_cb_program.c | 7 ++++ src/mesa/state_tracker/st_draw.c | 2 +- src/mesa/state_tracker/st_program.c | 8 ++++ src/mesa/state_tracker/st_program.h | 4 ++ src/mesa/x86/rtasm/x86sse.c | 68 +++++++++++++++---------------- src/mesa/x86/rtasm/x86sse.h | 49 +++++++++++----------- 17 files changed, 135 insertions(+), 211 deletions(-) (limited to 'src/mesa/x86/rtasm/x86sse.c') diff --git a/src/mesa/pipe/draw/draw_context.c b/src/mesa/pipe/draw/draw_context.c index 5efb173228..66c66ff698 100644 --- a/src/mesa/pipe/draw/draw_context.c +++ b/src/mesa/pipe/draw/draw_context.c @@ -155,6 +155,14 @@ void draw_set_viewport_state( struct draw_context *draw, } +void +draw_set_vertex_shader(struct draw_context *draw, + const struct pipe_shader_state *shader) +{ + draw_flush( draw ); + draw->vertex_shader = *shader; +} + void draw_set_vertex_buffer(struct draw_context *draw, diff --git a/src/mesa/pipe/draw/draw_context.h b/src/mesa/pipe/draw/draw_context.h index 398e96d94d..0ccf5f6046 100644 --- a/src/mesa/pipe/draw/draw_context.h +++ b/src/mesa/pipe/draw/draw_context.h @@ -92,12 +92,9 @@ void draw_set_rasterize_stage( struct draw_context *draw, struct draw_stage *stage ); -void * draw_create_vertex_shader(struct draw_context *draw, - const struct pipe_shader_state *shader); -void draw_bind_vertex_shader(struct draw_context *draw, - void *vcso); -void draw_delete_vertex_shader(struct draw_context *draw, - void *vcso); +void +draw_set_vertex_shader(struct draw_context *draw, + const struct pipe_shader_state *shader); void diff --git a/src/mesa/pipe/draw/draw_private.h b/src/mesa/pipe/draw/draw_private.h index 2f52299f74..ebef5347ab 100644 --- a/src/mesa/pipe/draw/draw_private.h +++ b/src/mesa/pipe/draw/draw_private.h @@ -46,7 +46,6 @@ #include "draw_vertex.h" -#include "x86/rtasm/x86sse.h" /** * Basic vertex info. @@ -105,7 +104,7 @@ struct draw_stage void (*tri)( struct draw_stage *, struct prim_header * ); - + void (*end)( struct draw_stage * ); void (*reset_stipple_counter)( struct draw_stage * ); @@ -117,15 +116,6 @@ struct draw_stage #define VCACHE_OVERFLOW 4 #define VS_QUEUE_LENGTH (VCACHE_SIZE + VCACHE_OVERFLOW + 1) /* can never fill up */ -/** - * Private version of the compiled vertex_shader - */ -struct draw_vertex_shader { - const struct pipe_shader_state *state; -#if defined(__i386__) || defined(__386__) - struct x86_function sse2_program; -#endif -}; /** * Private context for the drawing module. @@ -155,7 +145,7 @@ struct draw_context struct pipe_viewport_state viewport; struct pipe_vertex_buffer vertex_buffer[PIPE_ATTRIB_MAX]; struct pipe_vertex_element vertex_element[PIPE_ATTRIB_MAX]; - const struct draw_vertex_shader *vertex_shader; + struct pipe_shader_state vertex_shader; struct pipe_vertex_buffer feedback_buffer[PIPE_ATTRIB_MAX]; struct pipe_vertex_element feedback_element[PIPE_ATTRIB_MAX]; diff --git a/src/mesa/pipe/draw/draw_vertex_fetch.c b/src/mesa/pipe/draw/draw_vertex_fetch.c index bc37e18c34..2b839d641e 100644 --- a/src/mesa/pipe/draw/draw_vertex_fetch.c +++ b/src/mesa/pipe/draw/draw_vertex_fetch.c @@ -85,7 +85,7 @@ void draw_vertex_fetch( struct draw_context *draw, /*printf("fetch vertex %u: \n", j);*/ /* loop over vertex attributes (vertex shader inputs) */ - for (attr = 0; attr < draw->vertex_shader->state->num_inputs; attr++) { + for (attr = 0; attr < draw->vertex_shader.num_inputs; attr++) { unsigned buf = draw->vertex_element[attr].vertex_buffer_index; const void *src diff --git a/src/mesa/pipe/draw/draw_vertex_shader.c b/src/mesa/pipe/draw/draw_vertex_shader.c index f7ddbd1909..a2e1cdc472 100644 --- a/src/mesa/pipe/draw/draw_vertex_shader.c +++ b/src/mesa/pipe/draw/draw_vertex_shader.c @@ -36,8 +36,6 @@ #include "draw_context.h" #include "draw_vertex.h" -#include "x86/rtasm/x86sse.h" - #include "pipe/tgsi/exec/tgsi_core.h" static INLINE unsigned @@ -72,7 +70,6 @@ typedef void (XSTDCALL *codegen_function) ( float (*constant)[4], struct tgsi_exec_vector *temporary ); - /** * Transform vertices with the current vertex program/shader * Up to four vertices can be shaded at a time. @@ -95,7 +92,7 @@ run_vertex_program(struct draw_context *draw, const float *trans = draw->viewport.translate; assert(count <= 4); - assert(draw->vertex_shader->state->output_semantic_name[0] + assert(draw->vertex_shader.output_semantic_name[0] == TGSI_SEMANTIC_POSITION); #ifdef DEBUG @@ -104,7 +101,7 @@ run_vertex_program(struct draw_context *draw, /* init machine state */ tgsi_exec_machine_init(&machine, - draw->vertex_shader->state->tokens, + draw->vertex_shader.tokens, PIPE_MAX_SAMPLERS, NULL /*samplers*/ ); @@ -117,8 +114,8 @@ run_vertex_program(struct draw_context *draw, draw_vertex_fetch( draw, &machine, elts, count ); /* run shader */ - if( draw->vertex_shader->state->executable != NULL ) { - codegen_function func = (codegen_function) draw->vertex_shader->state->executable; + if( draw->vertex_shader.executable != NULL ) { + codegen_function func = (codegen_function) draw->vertex_shader.executable; func( machine.Inputs, machine.Outputs, @@ -209,42 +206,3 @@ void draw_vertex_shader_queue_flush( struct draw_context *draw ) draw->vs.queue_nr = 0; } - -void * -draw_create_vertex_shader(struct draw_context *draw, - const struct pipe_shader_state *shader) -{ - struct draw_vertex_shader *vs = calloc(1, sizeof(struct draw_vertex_shader)); - - vs->state = shader; -#if defined(__i386__) || defined(__386__) - x86_init_func(&vs->sse2_program); - - tgsi_emit_sse2(shader->tokens, &vs->sse2_program); - - ((struct pipe_shader_state*)(vs->state))->executable = - x86_get_func(&vs->sse2_program); -#endif - - return vs; -} - -void draw_bind_vertex_shader(struct draw_context *draw, - void *vcso) -{ - draw_flush(draw); - draw->vertex_shader = (struct draw_vertex_shader*)(vcso); -} - -void draw_delete_vertex_shader(struct draw_context *draw, - void *vcso) -{ - struct draw_vertex_shader *vs = (struct draw_vertex_shader*)(vcso); -#if defined(__i386__) || defined(__386__) - x86_release_func(&vs->sse2_program); -#endif - free(vcso); -} - - - diff --git a/src/mesa/pipe/i915simple/i915_state.c b/src/mesa/pipe/i915simple/i915_state.c index 19ca5e575f..5c6d37a466 100644 --- a/src/mesa/pipe/i915simple/i915_state.c +++ b/src/mesa/pipe/i915simple/i915_state.c @@ -443,13 +443,16 @@ static void i915_set_polygon_stipple( struct pipe_context *pipe, { } -static void * i915_create_fs_state(struct pipe_context *pipe, - const struct pipe_shader_state *templ) + +static void * +i915_create_shader_state(struct pipe_context *pipe, + const struct pipe_shader_state *templ) { return 0; } -static void i915_bind_fs_state(struct pipe_context *pipe, void *fs) +static void i915_bind_fs_state( struct pipe_context *pipe, + void *fs ) { struct i915_context *i915 = i915_context(pipe); @@ -458,35 +461,20 @@ static void i915_bind_fs_state(struct pipe_context *pipe, void *fs) i915->dirty |= I915_NEW_FS; } -static void i915_delete_fs_state(struct pipe_context *pipe, void *shader) -{ - /*do nothing*/ -} - -static void * -i915_create_vs_state(struct pipe_context *pipe, - const struct pipe_shader_state *templ) -{ - struct i915_context *i915 = i915_context(pipe); - - /* just pass-through to draw module */ - return draw_create_vertex_shader(i915->draw, templ); -} -static void i915_bind_vs_state(struct pipe_context *pipe, void *vs) +static void i915_bind_vs_state(struct pipe_context *pipe, + void *vs) { struct i915_context *i915 = i915_context(pipe); /* just pass-through to draw module */ - draw_bind_vertex_shader(i915->draw, vs); + draw_set_vertex_shader(i915->draw, (const struct pipe_shader_state *)vs); } -static void i915_delete_vs_state(struct pipe_context *pipe, void *shader) +static void i915_delete_shader_state(struct pipe_context *pipe, + void *shader) { - struct i915_context *i915 = i915_context(pipe); - - /* just pass-through to draw module */ - draw_delete_vertex_shader(i915->draw, shader); + /*do nothing*/ } static void i915_set_constant_buffer(struct pipe_context *pipe, @@ -719,12 +707,12 @@ i915_init_state_functions( struct i915_context *i915 ) i915->pipe.create_rasterizer_state = i915_create_rasterizer_state; i915->pipe.bind_rasterizer_state = i915_bind_rasterizer_state; i915->pipe.delete_rasterizer_state = i915_delete_rasterizer_state; - i915->pipe.create_fs_state = i915_create_fs_state; + i915->pipe.create_fs_state = i915_create_shader_state; i915->pipe.bind_fs_state = i915_bind_fs_state; - i915->pipe.delete_fs_state = i915_delete_fs_state; - i915->pipe.create_vs_state = i915_create_vs_state; + i915->pipe.delete_fs_state = i915_delete_shader_state; + i915->pipe.create_vs_state = i915_create_shader_state; i915->pipe.bind_vs_state = i915_bind_vs_state; - i915->pipe.delete_vs_state = i915_delete_vs_state; + i915->pipe.delete_vs_state = i915_delete_shader_state; i915->pipe.set_blend_color = i915_set_blend_color; i915->pipe.set_clip_state = i915_set_clip_state; diff --git a/src/mesa/pipe/softpipe/sp_context.c b/src/mesa/pipe/softpipe/sp_context.c index 695bf1a9e0..e415966dae 100644 --- a/src/mesa/pipe/softpipe/sp_context.c +++ b/src/mesa/pipe/softpipe/sp_context.c @@ -275,12 +275,12 @@ struct pipe_context *softpipe_create( struct pipe_winsys *pipe_winsys, softpipe->pipe.create_rasterizer_state = softpipe_create_rasterizer_state; softpipe->pipe.bind_rasterizer_state = softpipe_bind_rasterizer_state; softpipe->pipe.delete_rasterizer_state = softpipe_delete_rasterizer_state; - softpipe->pipe.create_fs_state = softpipe_create_fs_state; + softpipe->pipe.create_fs_state = softpipe_create_shader_state; softpipe->pipe.bind_fs_state = softpipe_bind_fs_state; - softpipe->pipe.delete_fs_state = softpipe_delete_fs_state; - softpipe->pipe.create_vs_state = softpipe_create_vs_state; + softpipe->pipe.delete_fs_state = softpipe_delete_shader_state; + softpipe->pipe.create_vs_state = softpipe_create_shader_state; softpipe->pipe.bind_vs_state = softpipe_bind_vs_state; - softpipe->pipe.delete_vs_state = softpipe_delete_vs_state; + softpipe->pipe.delete_vs_state = softpipe_delete_shader_state; softpipe->pipe.set_blend_color = softpipe_set_blend_color; softpipe->pipe.set_clip_state = softpipe_set_clip_state; diff --git a/src/mesa/pipe/softpipe/sp_context.h b/src/mesa/pipe/softpipe/sp_context.h index ccf29b5683..c0a681f3d6 100644 --- a/src/mesa/pipe/softpipe/sp_context.h +++ b/src/mesa/pipe/softpipe/sp_context.h @@ -62,12 +62,8 @@ struct draw_stage; #define SP_NEW_VS 0x2000 #define SP_NEW_CONSTANTS 0x4000 -struct sp_vertex_shader_state { - const struct pipe_shader_state *state; - void *draw_data; -}; -struct softpipe_context { +struct softpipe_context { struct pipe_context pipe; /**< base class */ struct softpipe_winsys *winsys; /**< window system interface */ @@ -80,7 +76,7 @@ struct softpipe_context { const struct pipe_depth_stencil_state *depth_stencil; const struct pipe_rasterizer_state *rasterizer; const struct pipe_shader_state *fs; - const struct sp_vertex_shader_state *vs; + const struct pipe_shader_state *vs; struct pipe_blend_color blend_color; struct pipe_clear_color_state clear_color; diff --git a/src/mesa/pipe/softpipe/sp_state.h b/src/mesa/pipe/softpipe/sp_state.h index f9061e86e5..f0e1461d25 100644 --- a/src/mesa/pipe/softpipe/sp_state.h +++ b/src/mesa/pipe/softpipe/sp_state.h @@ -87,14 +87,12 @@ void softpipe_set_constant_buffer(struct pipe_context *, void softpipe_set_feedback_state( struct pipe_context *, const struct pipe_feedback_state * ); -void *softpipe_create_fs_state(struct pipe_context *, - const struct pipe_shader_state *); -void softpipe_bind_fs_state(struct pipe_context *, void *); -void softpipe_delete_fs_state(struct pipe_context *, void *); -void *softpipe_create_vs_state(struct pipe_context *, - const struct pipe_shader_state *); -void softpipe_bind_vs_state(struct pipe_context *, void *); -void softpipe_delete_vs_state(struct pipe_context *, void *); +void * +softpipe_create_shader_state( struct pipe_context *, + const struct pipe_shader_state * ); +void softpipe_bind_fs_state( struct pipe_context *, void * ); +void softpipe_bind_vs_state( struct pipe_context *, void * ); +void softpipe_delete_shader_state( struct pipe_context *, void * ); void softpipe_set_polygon_stipple( struct pipe_context *, const struct pipe_poly_stipple * ); diff --git a/src/mesa/pipe/softpipe/sp_state_derived.c b/src/mesa/pipe/softpipe/sp_state_derived.c index b6145df8e2..6c6e798069 100644 --- a/src/mesa/pipe/softpipe/sp_state_derived.c +++ b/src/mesa/pipe/softpipe/sp_state_derived.c @@ -43,7 +43,7 @@ */ static void calculate_vertex_layout( struct softpipe_context *softpipe ) { - const struct pipe_shader_state *vs = softpipe->vs->state; + const struct pipe_shader_state *vs = softpipe->vs; const struct pipe_shader_state *fs = softpipe->fs; const interp_mode colorInterp = softpipe->rasterizer->flatshade ? INTERP_CONSTANT : INTERP_LINEAR; diff --git a/src/mesa/pipe/softpipe/sp_state_fs.c b/src/mesa/pipe/softpipe/sp_state_fs.c index f1bec2c73a..8306a95f44 100644 --- a/src/mesa/pipe/softpipe/sp_state_fs.c +++ b/src/mesa/pipe/softpipe/sp_state_fs.c @@ -33,13 +33,10 @@ #include "pipe/draw/draw_context.h" -void * softpipe_create_fs_state(struct pipe_context *pipe, - const struct pipe_shader_state *templ) +void * softpipe_create_shader_state(struct pipe_context *pipe, + const struct pipe_shader_state *templ) { - /* Decide whether we'll be codegenerating this shader and if so do - * that now. - */ - + /* we just want the pipe_shader_state template in the bind calls */ return 0; } @@ -52,50 +49,24 @@ void softpipe_bind_fs_state(struct pipe_context *pipe, void *fs) softpipe->dirty |= SP_NEW_FS; } -void softpipe_delete_fs_state(struct pipe_context *pipe, - void *shader) -{ -} - - -void * softpipe_create_vs_state(struct pipe_context *pipe, - const struct pipe_shader_state *templ) -{ - struct softpipe_context *softpipe = softpipe_context(pipe); - struct sp_vertex_shader_state *state = - malloc(sizeof(struct sp_vertex_shader_state)); - - state->state = templ; - state->draw_data = draw_create_vertex_shader(softpipe->draw, - state->state); - - return state; -} void softpipe_bind_vs_state(struct pipe_context *pipe, void *vs) { struct softpipe_context *softpipe = softpipe_context(pipe); - softpipe->vs = (const struct sp_vertex_shader_state *)vs; - - draw_bind_vertex_shader(softpipe->draw, softpipe->vs->draw_data); + softpipe->vs = (struct pipe_shader_state *)vs; softpipe->dirty |= SP_NEW_VS; -} -void softpipe_delete_vs_state(struct pipe_context *pipe, - void *vs) -{ - struct softpipe_context *softpipe = softpipe_context(pipe); - - struct sp_vertex_shader_state *state = - (struct sp_vertex_shader_state *)vs; - - draw_delete_vertex_shader(softpipe->draw, state->draw_data); - free(state); + draw_set_vertex_shader(softpipe->draw, (struct pipe_shader_state *)vs); } +void softpipe_delete_shader_state( struct pipe_context *pipe, + void *shader ) +{ + /* do nothing */ +} void softpipe_set_constant_buffer(struct pipe_context *pipe, uint shader, uint index, diff --git a/src/mesa/state_tracker/st_cb_program.c b/src/mesa/state_tracker/st_cb_program.c index 3a7ce9405e..25dbc2c244 100644 --- a/src/mesa/state_tracker/st_cb_program.c +++ b/src/mesa/state_tracker/st_cb_program.c @@ -86,6 +86,10 @@ static struct gl_program *st_new_program( GLcontext *ctx, prog->serialNo = 1; +#if defined(__i386__) || defined(__386__) + x86_init_func( &prog->sse2_program ); +#endif + return _mesa_init_vertex_program( ctx, &prog->Base, target, @@ -125,6 +129,9 @@ static void st_delete_program( GLcontext *ctx, case GL_VERTEX_PROGRAM_ARB: { struct st_vertex_program *stvp = (struct st_vertex_program *) prog; +#if defined(__i386__) || defined(__386__) + x86_release_func( &stvp->sse2_program ); +#endif st_remove_vertex_program(st, stvp); } break; diff --git a/src/mesa/state_tracker/st_draw.c b/src/mesa/state_tracker/st_draw.c index 7c836ba2c1..ce5bf0c8a9 100644 --- a/src/mesa/state_tracker/st_draw.c +++ b/src/mesa/state_tracker/st_draw.c @@ -405,7 +405,7 @@ st_feedback_draw_vbo(GLcontext *ctx, draw_set_viewport_state(draw, &st->state.viewport); draw_set_clip_state(draw, &st->state.clip); draw_set_rasterizer_state(draw, &st->state.rasterizer->state); - draw_bind_vertex_shader(draw, st->state.vs->data); + draw_set_vertex_shader(draw, &st->state.vs->state); /* XXX need to set vertex info too */ diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c index 116b59a067..44cc33b09f 100644 --- a/src/mesa/state_tracker/st_program.c +++ b/src/mesa/state_tracker/st_program.c @@ -253,6 +253,14 @@ st_translate_vertex_program(struct st_context *st, if (TGSI_DEBUG) tgsi_dump( tokensOut, 0 ); +#if defined(__i386__) || defined(__386__) + if (stvp->sse2_program.csr == stvp->sse2_program.store) + tgsi_emit_sse2( tokensOut, &stvp->sse2_program ); + + if (!cso->state.executable) + ((struct cso_vertex_shader*)cso)->state.executable = (void *) x86_get_func( &stvp->sse2_program ); +#endif + return cso; } diff --git a/src/mesa/state_tracker/st_program.h b/src/mesa/state_tracker/st_program.h index 2b79201313..6e106c16b0 100644 --- a/src/mesa/state_tracker/st_program.h +++ b/src/mesa/state_tracker/st_program.h @@ -79,6 +79,10 @@ struct st_vertex_program /** The program in TGSI format */ struct tgsi_token tokens[ST_FP_MAX_TOKENS]; +#if defined(__i386__) || defined(__386__) + struct x86_function sse2_program; +#endif + /** Pointer to the corresponding cached shader */ const struct cso_vertex_shader *vs; diff --git a/src/mesa/x86/rtasm/x86sse.c b/src/mesa/x86/rtasm/x86sse.c index f9a9352e46..a6cfa40f91 100644 --- a/src/mesa/x86/rtasm/x86sse.c +++ b/src/mesa/x86/rtasm/x86sse.c @@ -6,22 +6,22 @@ #define DISASSEM 0 #define X86_TWOB 0x0f -static unsigned char *cptr( void (*label)() ) +static GLubyte *cptr( void (*label)() ) { - return (unsigned char *)(unsigned long)label; + return (char *)(unsigned long)label; } /* Emit bytes to the instruction stream: */ -static void emit_1b( struct x86_function *p, char b0 ) +static void emit_1b( struct x86_function *p, GLbyte b0 ) { - *(char *)(p->csr++) = b0; + *(GLbyte *)(p->csr++) = b0; } -static void emit_1i( struct x86_function *p, int i0 ) +static void emit_1i( struct x86_function *p, GLint i0 ) { - *(int *)(p->csr) = i0; + *(GLint *)(p->csr) = i0; p->csr += 4; } @@ -35,20 +35,20 @@ static void disassem( struct x86_function *p, const char *fn ) #endif } -static void emit_1ub_fn( struct x86_function *p, unsigned char b0, const char *fn ) +static void emit_1ub_fn( struct x86_function *p, GLubyte b0, const char *fn ) { disassem(p, fn); *(p->csr++) = b0; } -static void emit_2ub_fn( struct x86_function *p, unsigned char b0, unsigned char b1, const char *fn ) +static void emit_2ub_fn( struct x86_function *p, GLubyte b0, GLubyte b1, const char *fn ) { disassem(p, fn); *(p->csr++) = b0; *(p->csr++) = b1; } -static void emit_3ub_fn( struct x86_function *p, unsigned char b0, unsigned char b1, unsigned char b2, const char *fn ) +static void emit_3ub_fn( struct x86_function *p, GLubyte b0, GLubyte b1, GLubyte b2, const char *fn ) { disassem(p, fn); *(p->csr++) = b0; @@ -69,7 +69,7 @@ static void emit_modrm( struct x86_function *p, struct x86_reg reg, struct x86_reg regmem ) { - unsigned char val = 0; + GLubyte val = 0; assert(reg.mod == mod_REG); @@ -104,7 +104,7 @@ static void emit_modrm( struct x86_function *p, static void emit_modrm_noreg( struct x86_function *p, - unsigned op, + GLuint op, struct x86_reg regmem ) { struct x86_reg dummy = x86_make_reg(file_REG32, op); @@ -117,8 +117,8 @@ static void emit_modrm_noreg( struct x86_function *p, * the arguments presented. */ static void emit_op_modrm( struct x86_function *p, - unsigned char op_dst_is_reg, - unsigned char op_dst_is_mem, + GLubyte op_dst_is_reg, + GLubyte op_dst_is_mem, struct x86_reg dst, struct x86_reg src ) { @@ -162,7 +162,7 @@ struct x86_reg x86_make_reg( enum x86_reg_file file, } struct x86_reg x86_make_disp( struct x86_reg reg, - int disp ) + GLint disp ) { assert(reg.file == file_REG32); @@ -191,7 +191,7 @@ struct x86_reg x86_get_base_reg( struct x86_reg reg ) return x86_make_reg( reg.file, reg.idx ); } -unsigned char *x86_get_label( struct x86_function *p ) +GLubyte *x86_get_label( struct x86_function *p ) { return p->csr; } @@ -205,13 +205,13 @@ unsigned char *x86_get_label( struct x86_function *p ) void x86_jcc( struct x86_function *p, enum x86_cc cc, - unsigned char *label ) + GLubyte *label ) { - int offset = label - (x86_get_label(p) + 2); + GLint offset = label - (x86_get_label(p) + 2); if (offset <= 127 && offset >= -128) { emit_1ub(p, 0x70 + cc); - emit_1b(p, (char) offset); + emit_1b(p, (GLbyte) offset); } else { offset = label - (x86_get_label(p) + 6); @@ -222,7 +222,7 @@ void x86_jcc( struct x86_function *p, /* Always use a 32bit offset for forward jumps: */ -unsigned char *x86_jcc_forward( struct x86_function *p, +GLubyte *x86_jcc_forward( struct x86_function *p, enum x86_cc cc ) { emit_2ub(p, 0x0f, 0x80 + cc); @@ -230,14 +230,14 @@ unsigned char *x86_jcc_forward( struct x86_function *p, return x86_get_label(p); } -unsigned char *x86_jmp_forward( struct x86_function *p) +GLubyte *x86_jmp_forward( struct x86_function *p) { emit_1ub(p, 0xe9); emit_1i(p, 0); return x86_get_label(p); } -unsigned char *x86_call_forward( struct x86_function *p) +GLubyte *x86_call_forward( struct x86_function *p) { emit_1ub(p, 0xe8); emit_1i(p, 0); @@ -247,12 +247,12 @@ unsigned char *x86_call_forward( struct x86_function *p) /* Fixup offset from forward jump: */ void x86_fixup_fwd_jump( struct x86_function *p, - unsigned char *fixup ) + GLubyte *fixup ) { *(int *)(fixup - 4) = x86_get_label(p) - fixup; } -void x86_jmp( struct x86_function *p, unsigned char *label) +void x86_jmp( struct x86_function *p, GLubyte *label) { emit_1ub(p, 0xe9); emit_1i(p, label - x86_get_label(p) - 4); @@ -268,7 +268,7 @@ void x86_call( struct x86_function *p, void (*label)()) * Temporary. As I need immediate operands, and dont want to mess with the codegen, * I load the immediate into general purpose register and use it. */ -void x86_mov_reg_imm( struct x86_function *p, struct x86_reg dst, int imm ) +void x86_mov_reg_imm( struct x86_function *p, struct x86_reg dst, GLint imm ) { assert(dst.mod == mod_REG); emit_1ub(p, 0xb8 + dst.idx); @@ -595,7 +595,7 @@ void sse_cvtps2pi( struct x86_function *p, void sse_shufps( struct x86_function *p, struct x86_reg dest, struct x86_reg arg0, - unsigned char shuf) + GLubyte shuf) { emit_2ub(p, X86_TWOB, 0xC6); emit_modrm(p, dest, arg0); @@ -605,7 +605,7 @@ void sse_shufps( struct x86_function *p, void sse_cmpps( struct x86_function *p, struct x86_reg dest, struct x86_reg arg0, - unsigned char cc) + GLubyte cc) { emit_2ub(p, X86_TWOB, 0xC2); emit_modrm(p, dest, arg0); @@ -630,7 +630,7 @@ void sse_pmovmskb( struct x86_function *p, void sse2_pshufd( struct x86_function *p, struct x86_reg dest, struct x86_reg arg0, - unsigned char shuf) + GLubyte shuf) { emit_3ub(p, 0x66, X86_TWOB, 0x70); emit_modrm(p, dest, arg0); @@ -772,11 +772,11 @@ void x87_fclex( struct x86_function *p ) static void x87_arith_op( struct x86_function *p, struct x86_reg dst, struct x86_reg arg, - unsigned char dst0ub0, - unsigned char dst0ub1, - unsigned char arg0ub0, - unsigned char arg0ub1, - unsigned char argmem_noreg) + GLubyte dst0ub0, + GLubyte dst0ub1, + GLubyte arg0ub0, + GLubyte arg0ub1, + GLubyte argmem_noreg) { assert(dst.file == file_x87); @@ -1116,7 +1116,7 @@ void mmx_movq( struct x86_function *p, * account any push/pop activity: */ struct x86_reg x86_fn_arg( struct x86_function *p, - unsigned arg ) + GLuint arg ) { return x86_make_disp(x86_make_reg(file_REG32, reg_SP), p->stack_offset + arg * 4); /* ??? */ @@ -1128,7 +1128,7 @@ void x86_init_func( struct x86_function *p ) x86_init_func_size(p, 1024); } -void x86_init_func_size( struct x86_function *p, unsigned code_size ) +void x86_init_func_size( struct x86_function *p, GLuint code_size ) { p->store = _mesa_exec_malloc(code_size); p->csr = p->store; diff --git a/src/mesa/x86/rtasm/x86sse.h b/src/mesa/x86/rtasm/x86sse.h index 63b9a36392..c1ca06088b 100644 --- a/src/mesa/x86/rtasm/x86sse.h +++ b/src/mesa/x86/rtasm/x86sse.h @@ -4,22 +4,24 @@ #if defined(__i386__) || defined(__386__) +#include "glheader.h" + /* It is up to the caller to ensure that instructions issued are * suitable for the host cpu. There are no checks made in this module * for mmx/sse/sse2 support on the cpu. */ struct x86_reg { - unsigned file:3; - unsigned idx:3; - unsigned mod:2; /* mod_REG if this is just a register */ - int disp:24; /* only +/- 23bits of offset - should be enough... */ + GLuint file:3; + GLuint idx:3; + GLuint mod:2; /* mod_REG if this is just a register */ + GLint disp:24; /* only +/- 23bits of offset - should be enough... */ }; struct x86_function { - unsigned char *store; - unsigned char *csr; - unsigned stack_offset; - int need_emms; + GLubyte *store; + GLubyte *csr; + GLuint stack_offset; + GLint need_emms; const char *fn; }; @@ -79,7 +81,7 @@ enum sse_cc { void x86_init_func( struct x86_function *p ); -void x86_init_func_size( struct x86_function *p, unsigned code_size ); +void x86_init_func_size( struct x86_function *p, GLuint code_size ); void x86_release_func( struct x86_function *p ); void (*x86_get_func( struct x86_function *p ))( void ); @@ -91,7 +93,7 @@ struct x86_reg x86_make_reg( enum x86_reg_file file, enum x86_reg_name idx ); struct x86_reg x86_make_disp( struct x86_reg reg, - int disp ); + GLint disp ); struct x86_reg x86_deref( struct x86_reg reg ); @@ -100,23 +102,23 @@ struct x86_reg x86_get_base_reg( struct x86_reg reg ); /* Labels, jumps and fixup: */ -unsigned char *x86_get_label( struct x86_function *p ); +GLubyte *x86_get_label( struct x86_function *p ); void x86_jcc( struct x86_function *p, enum x86_cc cc, - unsigned char *label ); + GLubyte *label ); -unsigned char *x86_jcc_forward( struct x86_function *p, +GLubyte *x86_jcc_forward( struct x86_function *p, enum x86_cc cc ); -unsigned char *x86_jmp_forward( struct x86_function *p); +GLubyte *x86_jmp_forward( struct x86_function *p); -unsigned char *x86_call_forward( struct x86_function *p); +GLubyte *x86_call_forward( struct x86_function *p); void x86_fixup_fwd_jump( struct x86_function *p, - unsigned char *fixup ); + GLubyte *fixup ); -void x86_jmp( struct x86_function *p, unsigned char *label ); +void x86_jmp( struct x86_function *p, GLubyte *label ); void x86_call( struct x86_function *p, void (*label)() ); @@ -124,7 +126,7 @@ void x86_call( struct x86_function *p, void (*label)() ); * Temporary. As I need immediate operands, and dont want to mess with the codegen, * I load the immediate into general purpose register and use it. */ -void x86_mov_reg_imm( struct x86_function *p, struct x86_reg dst, int imm ); +void x86_mov_reg_imm( struct x86_function *p, struct x86_reg dst, GLint imm ); /* Macro for sse_shufps() and sse2_pshufd(): @@ -145,8 +147,7 @@ void sse2_movd( struct x86_function *p, struct x86_reg dst, struct x86_reg src ) void sse2_packssdw( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); void sse2_packsswb( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); void sse2_packuswb( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse2_pshufd( struct x86_function *p, struct x86_reg dest, struct x86_reg arg0, - unsigned char shuf ); +void sse2_pshufd( struct x86_function *p, struct x86_reg dest, struct x86_reg arg0, GLubyte shuf ); void sse2_rcpps( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); void sse2_rcpss( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); @@ -156,8 +157,7 @@ void sse_cvtps2pi( struct x86_function *p, struct x86_reg dst, struct x86_reg sr void sse_divss( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); void sse_andnps( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); void sse_andps( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse_cmpps( struct x86_function *p, struct x86_reg dst, struct x86_reg src, - unsigned char cc ); +void sse_cmpps( struct x86_function *p, struct x86_reg dst, struct x86_reg src, GLubyte cc ); void sse_maxps( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); void sse_maxss( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); void sse_minps( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); @@ -175,8 +175,7 @@ void sse_xorps( struct x86_function *p, struct x86_reg dst, struct x86_reg src ) void sse_subps( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); void sse_rsqrtps( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); void sse_rsqrtss( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse_shufps( struct x86_function *p, struct x86_reg dest, struct x86_reg arg0, - unsigned char shuf ); +void sse_shufps( struct x86_function *p, struct x86_reg dest, struct x86_reg arg0, GLubyte shuf ); void sse_pmovmskb( struct x86_function *p, struct x86_reg dest, struct x86_reg src ); void x86_add( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); @@ -248,7 +247,7 @@ void x87_fucom( struct x86_function *p, struct x86_reg arg ); * account any push/pop activity. Note - doesn't track explict * manipulation of ESP by other instructions. */ -struct x86_reg x86_fn_arg( struct x86_function *p, unsigned arg ); +struct x86_reg x86_fn_arg( struct x86_function *p, GLuint arg ); #endif #endif -- cgit v1.2.3 From f78193f444dad2a1aee219f538bc0da3f040c2e1 Mon Sep 17 00:00:00 2001 From: Zack Rusin Date: Fri, 28 Sep 2007 04:33:55 -0400 Subject: Remove gl dependency from the x86 assembler code --- src/mesa/x86/rtasm/x86sse.c | 68 ++++++++++++++++++++++----------------------- src/mesa/x86/rtasm/x86sse.h | 49 ++++++++++++++++---------------- 2 files changed, 59 insertions(+), 58 deletions(-) (limited to 'src/mesa/x86/rtasm/x86sse.c') diff --git a/src/mesa/x86/rtasm/x86sse.c b/src/mesa/x86/rtasm/x86sse.c index a6cfa40f91..f9a9352e46 100644 --- a/src/mesa/x86/rtasm/x86sse.c +++ b/src/mesa/x86/rtasm/x86sse.c @@ -6,22 +6,22 @@ #define DISASSEM 0 #define X86_TWOB 0x0f -static GLubyte *cptr( void (*label)() ) +static unsigned char *cptr( void (*label)() ) { - return (char *)(unsigned long)label; + return (unsigned char *)(unsigned long)label; } /* Emit bytes to the instruction stream: */ -static void emit_1b( struct x86_function *p, GLbyte b0 ) +static void emit_1b( struct x86_function *p, char b0 ) { - *(GLbyte *)(p->csr++) = b0; + *(char *)(p->csr++) = b0; } -static void emit_1i( struct x86_function *p, GLint i0 ) +static void emit_1i( struct x86_function *p, int i0 ) { - *(GLint *)(p->csr) = i0; + *(int *)(p->csr) = i0; p->csr += 4; } @@ -35,20 +35,20 @@ static void disassem( struct x86_function *p, const char *fn ) #endif } -static void emit_1ub_fn( struct x86_function *p, GLubyte b0, const char *fn ) +static void emit_1ub_fn( struct x86_function *p, unsigned char b0, const char *fn ) { disassem(p, fn); *(p->csr++) = b0; } -static void emit_2ub_fn( struct x86_function *p, GLubyte b0, GLubyte b1, const char *fn ) +static void emit_2ub_fn( struct x86_function *p, unsigned char b0, unsigned char b1, const char *fn ) { disassem(p, fn); *(p->csr++) = b0; *(p->csr++) = b1; } -static void emit_3ub_fn( struct x86_function *p, GLubyte b0, GLubyte b1, GLubyte b2, const char *fn ) +static void emit_3ub_fn( struct x86_function *p, unsigned char b0, unsigned char b1, unsigned char b2, const char *fn ) { disassem(p, fn); *(p->csr++) = b0; @@ -69,7 +69,7 @@ static void emit_modrm( struct x86_function *p, struct x86_reg reg, struct x86_reg regmem ) { - GLubyte val = 0; + unsigned char val = 0; assert(reg.mod == mod_REG); @@ -104,7 +104,7 @@ static void emit_modrm( struct x86_function *p, static void emit_modrm_noreg( struct x86_function *p, - GLuint op, + unsigned op, struct x86_reg regmem ) { struct x86_reg dummy = x86_make_reg(file_REG32, op); @@ -117,8 +117,8 @@ static void emit_modrm_noreg( struct x86_function *p, * the arguments presented. */ static void emit_op_modrm( struct x86_function *p, - GLubyte op_dst_is_reg, - GLubyte op_dst_is_mem, + unsigned char op_dst_is_reg, + unsigned char op_dst_is_mem, struct x86_reg dst, struct x86_reg src ) { @@ -162,7 +162,7 @@ struct x86_reg x86_make_reg( enum x86_reg_file file, } struct x86_reg x86_make_disp( struct x86_reg reg, - GLint disp ) + int disp ) { assert(reg.file == file_REG32); @@ -191,7 +191,7 @@ struct x86_reg x86_get_base_reg( struct x86_reg reg ) return x86_make_reg( reg.file, reg.idx ); } -GLubyte *x86_get_label( struct x86_function *p ) +unsigned char *x86_get_label( struct x86_function *p ) { return p->csr; } @@ -205,13 +205,13 @@ GLubyte *x86_get_label( struct x86_function *p ) void x86_jcc( struct x86_function *p, enum x86_cc cc, - GLubyte *label ) + unsigned char *label ) { - GLint offset = label - (x86_get_label(p) + 2); + int offset = label - (x86_get_label(p) + 2); if (offset <= 127 && offset >= -128) { emit_1ub(p, 0x70 + cc); - emit_1b(p, (GLbyte) offset); + emit_1b(p, (char) offset); } else { offset = label - (x86_get_label(p) + 6); @@ -222,7 +222,7 @@ void x86_jcc( struct x86_function *p, /* Always use a 32bit offset for forward jumps: */ -GLubyte *x86_jcc_forward( struct x86_function *p, +unsigned char *x86_jcc_forward( struct x86_function *p, enum x86_cc cc ) { emit_2ub(p, 0x0f, 0x80 + cc); @@ -230,14 +230,14 @@ GLubyte *x86_jcc_forward( struct x86_function *p, return x86_get_label(p); } -GLubyte *x86_jmp_forward( struct x86_function *p) +unsigned char *x86_jmp_forward( struct x86_function *p) { emit_1ub(p, 0xe9); emit_1i(p, 0); return x86_get_label(p); } -GLubyte *x86_call_forward( struct x86_function *p) +unsigned char *x86_call_forward( struct x86_function *p) { emit_1ub(p, 0xe8); emit_1i(p, 0); @@ -247,12 +247,12 @@ GLubyte *x86_call_forward( struct x86_function *p) /* Fixup offset from forward jump: */ void x86_fixup_fwd_jump( struct x86_function *p, - GLubyte *fixup ) + unsigned char *fixup ) { *(int *)(fixup - 4) = x86_get_label(p) - fixup; } -void x86_jmp( struct x86_function *p, GLubyte *label) +void x86_jmp( struct x86_function *p, unsigned char *label) { emit_1ub(p, 0xe9); emit_1i(p, label - x86_get_label(p) - 4); @@ -268,7 +268,7 @@ void x86_call( struct x86_function *p, void (*label)()) * Temporary. As I need immediate operands, and dont want to mess with the codegen, * I load the immediate into general purpose register and use it. */ -void x86_mov_reg_imm( struct x86_function *p, struct x86_reg dst, GLint imm ) +void x86_mov_reg_imm( struct x86_function *p, struct x86_reg dst, int imm ) { assert(dst.mod == mod_REG); emit_1ub(p, 0xb8 + dst.idx); @@ -595,7 +595,7 @@ void sse_cvtps2pi( struct x86_function *p, void sse_shufps( struct x86_function *p, struct x86_reg dest, struct x86_reg arg0, - GLubyte shuf) + unsigned char shuf) { emit_2ub(p, X86_TWOB, 0xC6); emit_modrm(p, dest, arg0); @@ -605,7 +605,7 @@ void sse_shufps( struct x86_function *p, void sse_cmpps( struct x86_function *p, struct x86_reg dest, struct x86_reg arg0, - GLubyte cc) + unsigned char cc) { emit_2ub(p, X86_TWOB, 0xC2); emit_modrm(p, dest, arg0); @@ -630,7 +630,7 @@ void sse_pmovmskb( struct x86_function *p, void sse2_pshufd( struct x86_function *p, struct x86_reg dest, struct x86_reg arg0, - GLubyte shuf) + unsigned char shuf) { emit_3ub(p, 0x66, X86_TWOB, 0x70); emit_modrm(p, dest, arg0); @@ -772,11 +772,11 @@ void x87_fclex( struct x86_function *p ) static void x87_arith_op( struct x86_function *p, struct x86_reg dst, struct x86_reg arg, - GLubyte dst0ub0, - GLubyte dst0ub1, - GLubyte arg0ub0, - GLubyte arg0ub1, - GLubyte argmem_noreg) + unsigned char dst0ub0, + unsigned char dst0ub1, + unsigned char arg0ub0, + unsigned char arg0ub1, + unsigned char argmem_noreg) { assert(dst.file == file_x87); @@ -1116,7 +1116,7 @@ void mmx_movq( struct x86_function *p, * account any push/pop activity: */ struct x86_reg x86_fn_arg( struct x86_function *p, - GLuint arg ) + unsigned arg ) { return x86_make_disp(x86_make_reg(file_REG32, reg_SP), p->stack_offset + arg * 4); /* ??? */ @@ -1128,7 +1128,7 @@ void x86_init_func( struct x86_function *p ) x86_init_func_size(p, 1024); } -void x86_init_func_size( struct x86_function *p, GLuint code_size ) +void x86_init_func_size( struct x86_function *p, unsigned code_size ) { p->store = _mesa_exec_malloc(code_size); p->csr = p->store; diff --git a/src/mesa/x86/rtasm/x86sse.h b/src/mesa/x86/rtasm/x86sse.h index c1ca06088b..63b9a36392 100644 --- a/src/mesa/x86/rtasm/x86sse.h +++ b/src/mesa/x86/rtasm/x86sse.h @@ -4,24 +4,22 @@ #if defined(__i386__) || defined(__386__) -#include "glheader.h" - /* It is up to the caller to ensure that instructions issued are * suitable for the host cpu. There are no checks made in this module * for mmx/sse/sse2 support on the cpu. */ struct x86_reg { - GLuint file:3; - GLuint idx:3; - GLuint mod:2; /* mod_REG if this is just a register */ - GLint disp:24; /* only +/- 23bits of offset - should be enough... */ + unsigned file:3; + unsigned idx:3; + unsigned mod:2; /* mod_REG if this is just a register */ + int disp:24; /* only +/- 23bits of offset - should be enough... */ }; struct x86_function { - GLubyte *store; - GLubyte *csr; - GLuint stack_offset; - GLint need_emms; + unsigned char *store; + unsigned char *csr; + unsigned stack_offset; + int need_emms; const char *fn; }; @@ -81,7 +79,7 @@ enum sse_cc { void x86_init_func( struct x86_function *p ); -void x86_init_func_size( struct x86_function *p, GLuint code_size ); +void x86_init_func_size( struct x86_function *p, unsigned code_size ); void x86_release_func( struct x86_function *p ); void (*x86_get_func( struct x86_function *p ))( void ); @@ -93,7 +91,7 @@ struct x86_reg x86_make_reg( enum x86_reg_file file, enum x86_reg_name idx ); struct x86_reg x86_make_disp( struct x86_reg reg, - GLint disp ); + int disp ); struct x86_reg x86_deref( struct x86_reg reg ); @@ -102,23 +100,23 @@ struct x86_reg x86_get_base_reg( struct x86_reg reg ); /* Labels, jumps and fixup: */ -GLubyte *x86_get_label( struct x86_function *p ); +unsigned char *x86_get_label( struct x86_function *p ); void x86_jcc( struct x86_function *p, enum x86_cc cc, - GLubyte *label ); + unsigned char *label ); -GLubyte *x86_jcc_forward( struct x86_function *p, +unsigned char *x86_jcc_forward( struct x86_function *p, enum x86_cc cc ); -GLubyte *x86_jmp_forward( struct x86_function *p); +unsigned char *x86_jmp_forward( struct x86_function *p); -GLubyte *x86_call_forward( struct x86_function *p); +unsigned char *x86_call_forward( struct x86_function *p); void x86_fixup_fwd_jump( struct x86_function *p, - GLubyte *fixup ); + unsigned char *fixup ); -void x86_jmp( struct x86_function *p, GLubyte *label ); +void x86_jmp( struct x86_function *p, unsigned char *label ); void x86_call( struct x86_function *p, void (*label)() ); @@ -126,7 +124,7 @@ void x86_call( struct x86_function *p, void (*label)() ); * Temporary. As I need immediate operands, and dont want to mess with the codegen, * I load the immediate into general purpose register and use it. */ -void x86_mov_reg_imm( struct x86_function *p, struct x86_reg dst, GLint imm ); +void x86_mov_reg_imm( struct x86_function *p, struct x86_reg dst, int imm ); /* Macro for sse_shufps() and sse2_pshufd(): @@ -147,7 +145,8 @@ void sse2_movd( struct x86_function *p, struct x86_reg dst, struct x86_reg src ) void sse2_packssdw( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); void sse2_packsswb( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); void sse2_packuswb( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse2_pshufd( struct x86_function *p, struct x86_reg dest, struct x86_reg arg0, GLubyte shuf ); +void sse2_pshufd( struct x86_function *p, struct x86_reg dest, struct x86_reg arg0, + unsigned char shuf ); void sse2_rcpps( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); void sse2_rcpss( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); @@ -157,7 +156,8 @@ void sse_cvtps2pi( struct x86_function *p, struct x86_reg dst, struct x86_reg sr void sse_divss( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); void sse_andnps( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); void sse_andps( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse_cmpps( struct x86_function *p, struct x86_reg dst, struct x86_reg src, GLubyte cc ); +void sse_cmpps( struct x86_function *p, struct x86_reg dst, struct x86_reg src, + unsigned char cc ); void sse_maxps( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); void sse_maxss( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); void sse_minps( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); @@ -175,7 +175,8 @@ void sse_xorps( struct x86_function *p, struct x86_reg dst, struct x86_reg src ) void sse_subps( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); void sse_rsqrtps( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); void sse_rsqrtss( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse_shufps( struct x86_function *p, struct x86_reg dest, struct x86_reg arg0, GLubyte shuf ); +void sse_shufps( struct x86_function *p, struct x86_reg dest, struct x86_reg arg0, + unsigned char shuf ); void sse_pmovmskb( struct x86_function *p, struct x86_reg dest, struct x86_reg src ); void x86_add( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); @@ -247,7 +248,7 @@ void x87_fucom( struct x86_function *p, struct x86_reg arg ); * account any push/pop activity. Note - doesn't track explict * manipulation of ESP by other instructions. */ -struct x86_reg x86_fn_arg( struct x86_function *p, GLuint arg ); +struct x86_reg x86_fn_arg( struct x86_function *p, unsigned arg ); #endif #endif -- cgit v1.2.3 From 86a03e43ced13e7c00f16d037b27faddfbcb2333 Mon Sep 17 00:00:00 2001 From: Michel Dänzer Date: Wed, 3 Oct 2007 20:35:19 +0200 Subject: Double amount of memory allocated for generated shader code. The code generated for the glxgears vertex shader didn't fit, causing a crash. --- src/mesa/x86/rtasm/x86sse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa/x86/rtasm/x86sse.c') diff --git a/src/mesa/x86/rtasm/x86sse.c b/src/mesa/x86/rtasm/x86sse.c index f9a9352e46..56c211eee0 100644 --- a/src/mesa/x86/rtasm/x86sse.c +++ b/src/mesa/x86/rtasm/x86sse.c @@ -1125,7 +1125,7 @@ struct x86_reg x86_fn_arg( struct x86_function *p, void x86_init_func( struct x86_function *p ) { - x86_init_func_size(p, 1024); + x86_init_func_size(p, 2048); } void x86_init_func_size( struct x86_function *p, unsigned code_size ) -- cgit v1.2.3 From 909c703bfbf7404414befaa0a94b76d78ba3cb4c Mon Sep 17 00:00:00 2001 From: Michel Dänzer Date: Thu, 7 Feb 2008 19:44:42 +0000 Subject: tgsi: Fall back to interpreter instead of assert(0) on unimplemented SSE code. --- src/mesa/pipe/draw/draw_vertex_shader.c | 22 ++++++++++++++++------ src/mesa/pipe/tgsi/exec/tgsi_sse2.c | 3 +-- src/mesa/x86/rtasm/x86sse.c | 1 + 3 files changed, 18 insertions(+), 8 deletions(-) (limited to 'src/mesa/x86/rtasm/x86sse.c') diff --git a/src/mesa/pipe/draw/draw_vertex_shader.c b/src/mesa/pipe/draw/draw_vertex_shader.c index e6590eafcc..5ca93aa615 100644 --- a/src/mesa/pipe/draw/draw_vertex_shader.c +++ b/src/mesa/pipe/draw/draw_vertex_shader.c @@ -121,11 +121,16 @@ run_vertex_program(struct draw_context *draw, = (struct draw_vertex_shader *)draw->vertex_shader; codegen_function func = (codegen_function) x86_get_func( &shader->sse2_program ); - func( - machine->Inputs, - machine->Outputs, - machine->Consts, - machine->Temps ); + + if (func) + func( + machine->Inputs, + machine->Outputs, + machine->Consts, + machine->Temps ); + else + /* interpreter */ + tgsi_exec_machine_run( machine ); } else #endif @@ -269,7 +274,12 @@ draw_create_vertex_shader(struct draw_context *draw, struct pipe_shader_state *sh = (struct pipe_shader_state *) shader; x86_init_func( &vs->sse2_program ); - tgsi_emit_sse2( (struct tgsi_token *) sh->tokens, &vs->sse2_program ); + if (!tgsi_emit_sse2( (struct tgsi_token *) sh->tokens, + &vs->sse2_program )) { + x86_release_func( (struct x86_function *) &vs->sse2_program ); + fprintf(stdout /*err*/, + "tgsi_emit_sse2() failed, falling back to interpreter\n"); + } } #endif diff --git a/src/mesa/pipe/tgsi/exec/tgsi_sse2.c b/src/mesa/pipe/tgsi/exec/tgsi_sse2.c index f2180082f1..40bacf8552 100755 --- a/src/mesa/pipe/tgsi/exec/tgsi_sse2.c +++ b/src/mesa/pipe/tgsi/exec/tgsi_sse2.c @@ -2254,8 +2254,7 @@ tgsi_emit_sse2( case TGSI_TOKEN_TYPE_IMMEDIATE: /* XXX implement this */ - assert(0); - break; + return 0; default: assert( 0 ); diff --git a/src/mesa/x86/rtasm/x86sse.c b/src/mesa/x86/rtasm/x86sse.c index 56c211eee0..f8da6e405f 100644 --- a/src/mesa/x86/rtasm/x86sse.c +++ b/src/mesa/x86/rtasm/x86sse.c @@ -1137,6 +1137,7 @@ void x86_init_func_size( struct x86_function *p, unsigned code_size ) void x86_release_func( struct x86_function *p ) { _mesa_exec_free(p->store); + p->store = NULL; } -- cgit v1.2.3 From 6046c54cc40d32d4c1a47c061494a37fadefd947 Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Wed, 13 Feb 2008 11:35:54 +0000 Subject: x86: reallocate exec mem when we run out --- src/mesa/x86/rtasm/x86sse.c | 95 ++++++++++++++++++++++++++++----------------- src/mesa/x86/rtasm/x86sse.h | 1 + 2 files changed, 61 insertions(+), 35 deletions(-) (limited to 'src/mesa/x86/rtasm/x86sse.c') diff --git a/src/mesa/x86/rtasm/x86sse.c b/src/mesa/x86/rtasm/x86sse.c index f8da6e405f..385fb84c01 100644 --- a/src/mesa/x86/rtasm/x86sse.c +++ b/src/mesa/x86/rtasm/x86sse.c @@ -12,55 +12,75 @@ static unsigned char *cptr( void (*label)() ) } +static void do_realloc( struct x86_function *p ) +{ + _mesa_printf("do_realloc %d %p\n", p->size, p->store); + + if (p->size == 0) { + p->size = 1024; + p->store = _mesa_exec_malloc(p->size); + p->csr = p->store; + } + else { + unsigned used = p->csr - p->store; + unsigned char *tmp = p->store; + p->size *= 2; + p->store = _mesa_exec_malloc(p->size); + memcpy(p->store, tmp, used); + p->csr = p->store + used; + _mesa_exec_free(tmp); + } +} + /* Emit bytes to the instruction stream: */ -static void emit_1b( struct x86_function *p, char b0 ) +static unsigned char *reserve( struct x86_function *p, int bytes ) { - *(char *)(p->csr++) = b0; + if (p->csr + bytes - p->store > p->size) + do_realloc(p); + + { + unsigned char *csr = p->csr; + p->csr += bytes; + return csr; + } } -static void emit_1i( struct x86_function *p, int i0 ) + + +static void emit_1b( struct x86_function *p, char b0 ) { - *(int *)(p->csr) = i0; - p->csr += 4; + char *csr = (char *)reserve(p, 1); + *csr = b0; } -static void disassem( struct x86_function *p, const char *fn ) +static void emit_1i( struct x86_function *p, int i0 ) { -#if DISASSEM && 0 - if (fn && fn != p->fn) { - _mesa_printf("0x%x: %s\n", p->csr, fn); - p->fn = fn; - } -#endif + int *icsr = (int *)reserve(p, sizeof(i0)); + *icsr = i0; } -static void emit_1ub_fn( struct x86_function *p, unsigned char b0, const char *fn ) +static void emit_1ub( struct x86_function *p, unsigned char b0 ) { - disassem(p, fn); - *(p->csr++) = b0; + unsigned char *csr = reserve(p, 1); + *csr++ = b0; } -static void emit_2ub_fn( struct x86_function *p, unsigned char b0, unsigned char b1, const char *fn ) +static void emit_2ub( struct x86_function *p, unsigned char b0, unsigned char b1 ) { - disassem(p, fn); - *(p->csr++) = b0; - *(p->csr++) = b1; + unsigned char *csr = reserve(p, 2); + *csr++ = b0; + *csr++ = b1; } -static void emit_3ub_fn( struct x86_function *p, unsigned char b0, unsigned char b1, unsigned char b2, const char *fn ) +static void emit_3ub( struct x86_function *p, unsigned char b0, unsigned char b1, unsigned char b2 ) { - disassem(p, fn); - *(p->csr++) = b0; - *(p->csr++) = b1; - *(p->csr++) = b2; + unsigned char *csr = reserve(p, 3); + *csr++ = b0; + *csr++ = b1; + *csr++ = b2; } -#define emit_1ub(p, b0) emit_1ub_fn(p, b0, __FUNCTION__) -#define emit_2ub(p, b0, b1) emit_2ub_fn(p, b0, b1, __FUNCTION__) -#define emit_3ub(p, b0, b1, b2) emit_3ub_fn(p, b0, b1, b2, __FUNCTION__) - - /* Build a modRM byte + possible displacement. No treatment of SIB * indexing. BZZT - no way to encode an absolute address. @@ -77,13 +97,13 @@ static void emit_modrm( struct x86_function *p, val |= reg.idx << 3; /* reg field */ val |= regmem.idx; /* r/m field */ - emit_1ub_fn(p, val, 0); + emit_1ub(p, val); /* Oh-oh we've stumbled into the SIB thing. */ if (regmem.file == file_REG32 && regmem.idx == reg_SP) { - emit_1ub_fn(p, 0x24, 0); /* simplistic! */ + emit_1ub(p, 0x24); /* simplistic! */ } switch (regmem.mod) { @@ -124,14 +144,14 @@ static void emit_op_modrm( struct x86_function *p, { switch (dst.mod) { case mod_REG: - emit_1ub_fn(p, op_dst_is_reg, 0); + emit_1ub(p, op_dst_is_reg); emit_modrm(p, dst, src); break; case mod_INDIRECT: case mod_DISP32: case mod_DISP8: assert(src.mod == mod_REG); - emit_1ub_fn(p, op_dst_is_mem, 0); + emit_1ub(p, op_dst_is_mem); emit_modrm(p, src, dst); break; default: @@ -1125,11 +1145,14 @@ struct x86_reg x86_fn_arg( struct x86_function *p, void x86_init_func( struct x86_function *p ) { - x86_init_func_size(p, 2048); + p->size = 0; + p->store = NULL; + p->csr = p->store; } void x86_init_func_size( struct x86_function *p, unsigned code_size ) { + p->size = code_size; p->store = _mesa_exec_malloc(code_size); p->csr = p->store; } @@ -1138,12 +1161,14 @@ void x86_release_func( struct x86_function *p ) { _mesa_exec_free(p->store); p->store = NULL; + p->csr = NULL; + p->size = 0; } void (*x86_get_func( struct x86_function *p ))(void) { - if (DISASSEM) + if (DISASSEM && p->store) _mesa_printf("disassemble %p %p\n", p->store, p->csr); return (void (*)(void)) (unsigned long) p->store; } diff --git a/src/mesa/x86/rtasm/x86sse.h b/src/mesa/x86/rtasm/x86sse.h index 63b9a36392..d53b6d71a6 100644 --- a/src/mesa/x86/rtasm/x86sse.h +++ b/src/mesa/x86/rtasm/x86sse.h @@ -16,6 +16,7 @@ struct x86_reg { }; struct x86_function { + unsigned size; unsigned char *store; unsigned char *csr; unsigned stack_offset; -- cgit v1.2.3 From 8162d317d2f6f2dcc31f31c0c2d663c33dfee053 Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Wed, 13 Feb 2008 12:35:16 +0000 Subject: x86: emit absolute calls, as reallocating exec mem breaks relative ones --- src/mesa/pipe/tgsi/exec/tgsi_sse2.c | 5 ++++- src/mesa/x86/rtasm/x86sse.c | 13 +++++++++++++ src/mesa/x86/rtasm/x86sse.h | 3 ++- 3 files changed, 19 insertions(+), 2 deletions(-) (limited to 'src/mesa/x86/rtasm/x86sse.c') diff --git a/src/mesa/pipe/tgsi/exec/tgsi_sse2.c b/src/mesa/pipe/tgsi/exec/tgsi_sse2.c index ecf4ca8d21..1e56e4afb6 100755 --- a/src/mesa/pipe/tgsi/exec/tgsi_sse2.c +++ b/src/mesa/pipe/tgsi/exec/tgsi_sse2.c @@ -328,8 +328,11 @@ emit_call( struct x86_function *func, void (* addr)() ) { + struct x86_reg ecx = x86_make_reg( file_REG32, reg_CX ); + DUMP_I( "CALL", addr ); - x86_call( func, addr ); + x86_mov_reg_imm( func, ecx, (unsigned long) addr ); + x86_call( func, ecx ); } static void diff --git a/src/mesa/x86/rtasm/x86sse.c b/src/mesa/x86/rtasm/x86sse.c index 385fb84c01..e944d00f9e 100644 --- a/src/mesa/x86/rtasm/x86sse.c +++ b/src/mesa/x86/rtasm/x86sse.c @@ -278,11 +278,24 @@ void x86_jmp( struct x86_function *p, unsigned char *label) emit_1i(p, label - x86_get_label(p) - 4); } +#if 0 +/* This doesn't work once we start reallocating & copying the + * generated code on buffer fills, because the call is relative to the + * current pc. + */ void x86_call( struct x86_function *p, void (*label)()) { emit_1ub(p, 0xe8); emit_1i(p, cptr(label) - x86_get_label(p) - 4); } +#else +void x86_call( struct x86_function *p, struct x86_reg reg) +{ + emit_1ub(p, 0xff); + emit_modrm(p, reg, reg); +} +#endif + /* michal: * Temporary. As I need immediate operands, and dont want to mess with the codegen, diff --git a/src/mesa/x86/rtasm/x86sse.h b/src/mesa/x86/rtasm/x86sse.h index d53b6d71a6..c2aa416492 100644 --- a/src/mesa/x86/rtasm/x86sse.h +++ b/src/mesa/x86/rtasm/x86sse.h @@ -119,7 +119,8 @@ void x86_fixup_fwd_jump( struct x86_function *p, void x86_jmp( struct x86_function *p, unsigned char *label ); -void x86_call( struct x86_function *p, void (*label)() ); +/* void x86_call( struct x86_function *p, void (*label)() ); */ +void x86_call( struct x86_function *p, struct x86_reg reg); /* michal: * Temporary. As I need immediate operands, and dont want to mess with the codegen, -- cgit v1.2.3 From 66640c4b589db7b6b5edce7d297ae6623bfda9c1 Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Wed, 13 Feb 2008 12:37:42 +0000 Subject: x86: remove debug --- src/mesa/x86/rtasm/x86sse.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/mesa/x86/rtasm/x86sse.c') diff --git a/src/mesa/x86/rtasm/x86sse.c b/src/mesa/x86/rtasm/x86sse.c index e944d00f9e..1111e8db99 100644 --- a/src/mesa/x86/rtasm/x86sse.c +++ b/src/mesa/x86/rtasm/x86sse.c @@ -14,8 +14,6 @@ static unsigned char *cptr( void (*label)() ) static void do_realloc( struct x86_function *p ) { - _mesa_printf("do_realloc %d %p\n", p->size, p->store); - if (p->size == 0) { p->size = 1024; p->store = _mesa_exec_malloc(p->size); -- cgit v1.2.3 From a856b399e6a46f2026006402bc6b9125bd23f9a9 Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Wed, 13 Feb 2008 18:29:29 +0000 Subject: x86: fix assignment in assert typo --- src/mesa/x86/rtasm/x86sse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa/x86/rtasm/x86sse.c') diff --git a/src/mesa/x86/rtasm/x86sse.c b/src/mesa/x86/rtasm/x86sse.c index 1111e8db99..39c0e9b851 100644 --- a/src/mesa/x86/rtasm/x86sse.c +++ b/src/mesa/x86/rtasm/x86sse.c @@ -820,7 +820,7 @@ static void x87_arith_op( struct x86_function *p, struct x86_reg dst, struct x86 assert(0); } else if (dst.idx == 0) { - assert(arg.file = file_REG32); + assert(arg.file == file_REG32); emit_1ub(p, 0xd8); emit_modrm_noreg(p, argmem_noreg, arg); } -- cgit v1.2.3 From 16900515214912557dfd35e3b333e0e312b8bc61 Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Fri, 11 Apr 2008 13:21:22 -0600 Subject: mesa: fix broken x86_call() --- src/mesa/x86/rtasm/x86sse.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/mesa/x86/rtasm/x86sse.c') diff --git a/src/mesa/x86/rtasm/x86sse.c b/src/mesa/x86/rtasm/x86sse.c index 39c0e9b851..7a91364ed8 100644 --- a/src/mesa/x86/rtasm/x86sse.c +++ b/src/mesa/x86/rtasm/x86sse.c @@ -1,3 +1,4 @@ +#ifdef USE_X86_ASM #if defined(__i386__) || defined(__386__) #include "imports.h" @@ -290,7 +291,7 @@ void x86_call( struct x86_function *p, void (*label)()) void x86_call( struct x86_function *p, struct x86_reg reg) { emit_1ub(p, 0xff); - emit_modrm(p, reg, reg); + emit_modrm_noreg(p, 2, reg); } #endif @@ -1191,3 +1192,9 @@ void x86sse_dummy( void ) } #endif + +#else /* USE_X86_ASM */ + +int x86sse_c_dummy_var; /* silence warning */ + +#endif /* USE_X86_ASM */ -- cgit v1.2.3 From 101d1a658a614d1e2ec02b1e697f6161291af653 Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Wed, 23 Jul 2008 21:06:01 +0900 Subject: mesa: Prefix main includes with dir to avoid conflicts. Some of the headers in src/mesa/main have pretty common names which easily conflict with third-party code, e.g. config.h --- src/mesa/SConscript | 1 - src/mesa/glapi/glapi.c | 2 +- src/mesa/glapi/glapi_getproc.c | 2 +- src/mesa/glapi/glthread.c | 2 +- src/mesa/math/m_debug_clip.c | 8 ++++---- src/mesa/math/m_debug_norm.c | 8 ++++---- src/mesa/math/m_debug_xform.c | 8 ++++---- src/mesa/math/m_matrix.c | 8 ++++---- src/mesa/math/m_translate.c | 6 +++--- src/mesa/math/m_vector.c | 8 ++++---- src/mesa/math/m_xform.h | 4 ++-- src/mesa/shader/arbprogparse.c | 6 +++--- src/mesa/shader/arbprogparse.h | 2 +- src/mesa/shader/arbprogram.c | 12 ++++++------ src/mesa/shader/atifragshader.c | 14 +++++++------- src/mesa/shader/grammar/grammar_mesa.h | 2 +- src/mesa/shader/nvfragparse.c | 8 ++++---- src/mesa/shader/nvprogram.c | 10 +++++----- src/mesa/shader/nvvertparse.c | 8 ++++---- src/mesa/shader/prog_debug.c | 6 +++--- src/mesa/shader/prog_execute.c | 6 +++--- src/mesa/shader/prog_instruction.c | 6 +++--- src/mesa/shader/prog_parameter.c | 6 +++--- src/mesa/shader/prog_parameter.h | 2 +- src/mesa/shader/prog_print.c | 6 +++--- src/mesa/shader/prog_statevars.c | 12 ++++++------ src/mesa/shader/prog_statevars.h | 2 +- src/mesa/shader/program.c | 6 +++--- src/mesa/shader/program.h | 2 +- src/mesa/shader/programopt.c | 4 ++-- src/mesa/shader/shader_api.c | 8 ++++---- src/mesa/shader/shader_api.h | 4 ++-- src/mesa/shader/slang/slang_codegen.h | 2 +- src/mesa/shader/slang/slang_compile.h | 4 ++-- src/mesa/shader/slang/slang_compile_function.c | 2 +- src/mesa/shader/slang/slang_compile_operation.c | 2 +- src/mesa/shader/slang/slang_compile_struct.c | 2 +- src/mesa/shader/slang/slang_compile_variable.c | 2 +- src/mesa/shader/slang/slang_emit.h | 4 ++-- src/mesa/shader/slang/slang_ir.c | 4 ++-- src/mesa/shader/slang/slang_ir.h | 4 ++-- src/mesa/shader/slang/slang_library_noise.c | 2 +- src/mesa/shader/slang/slang_log.c | 2 +- src/mesa/shader/slang/slang_mem.c | 4 ++-- src/mesa/shader/slang/slang_mem.h | 2 +- src/mesa/shader/slang/slang_preprocess.c | 2 +- src/mesa/shader/slang/slang_print.c | 2 +- src/mesa/shader/slang/slang_simplify.c | 6 +++--- src/mesa/shader/slang/slang_storage.c | 2 +- src/mesa/shader/slang/slang_typeinfo.h | 4 ++-- src/mesa/shader/slang/slang_utility.c | 2 +- src/mesa/sources | 1 - src/mesa/sparc/sparc.c | 2 +- src/mesa/state_tracker/st_atom.c | 4 ++-- src/mesa/state_tracker/st_atom_viewport.c | 4 ++-- src/mesa/state_tracker/st_mesa_to_tgsi.h | 2 +- src/mesa/state_tracker/st_texture.c | 2 +- src/mesa/swrast/s_aaline.c | 8 ++++---- src/mesa/swrast/s_aaline.h | 2 +- src/mesa/swrast/s_aatriangle.c | 12 ++++++------ src/mesa/swrast/s_aatriangle.h | 2 +- src/mesa/swrast/s_accum.c | 8 ++++---- src/mesa/swrast/s_accum.h | 2 +- src/mesa/swrast/s_alpha.c | 8 ++++---- src/mesa/swrast/s_alpha.h | 2 +- src/mesa/swrast/s_atifragshader.c | 8 ++++---- src/mesa/swrast/s_bitmap.c | 4 ++-- src/mesa/swrast/s_blend.c | 8 ++++---- src/mesa/swrast/s_blend.h | 2 +- src/mesa/swrast/s_blit.c | 4 ++-- src/mesa/swrast/s_buffers.c | 10 +++++----- src/mesa/swrast/s_context.c | 8 ++++---- src/mesa/swrast/s_copypix.c | 10 +++++----- src/mesa/swrast/s_depth.c | 8 ++++---- src/mesa/swrast/s_depth.h | 2 +- src/mesa/swrast/s_drawpix.c | 8 ++++---- src/mesa/swrast/s_drawpix.h | 2 +- src/mesa/swrast/s_feedback.c | 10 +++++----- src/mesa/swrast/s_feedback.h | 2 +- src/mesa/swrast/s_fog.c | 8 ++++---- src/mesa/swrast/s_fog.h | 2 +- src/mesa/swrast/s_lines.c | 8 ++++---- src/mesa/swrast/s_lines.h | 2 +- src/mesa/swrast/s_logic.c | 8 ++++---- src/mesa/swrast/s_logic.h | 2 +- src/mesa/swrast/s_masking.c | 4 ++-- src/mesa/swrast/s_masking.h | 2 +- src/mesa/swrast/s_points.c | 8 ++++---- src/mesa/swrast/s_points.h | 2 +- src/mesa/swrast/s_readpix.c | 10 +++++----- src/mesa/swrast/s_span.c | 10 +++++----- src/mesa/swrast/s_span.h | 2 +- src/mesa/swrast/s_spantemp.h | 2 +- src/mesa/swrast/s_stencil.c | 6 +++--- src/mesa/swrast/s_stencil.h | 2 +- src/mesa/swrast/s_texcombine.c | 10 +++++----- src/mesa/swrast/s_texcombine.h | 2 +- src/mesa/swrast/s_texfilter.c | 8 ++++---- src/mesa/swrast/s_texfilter.h | 2 +- src/mesa/swrast/s_texstore.c | 10 +++++----- src/mesa/swrast/s_triangle.c | 10 +++++----- src/mesa/swrast/s_triangle.h | 2 +- src/mesa/swrast/s_zoom.c | 8 ++++---- src/mesa/swrast/s_zoom.h | 2 +- src/mesa/swrast_setup/ss_context.c | 6 +++--- src/mesa/swrast_setup/ss_context.h | 2 +- src/mesa/swrast_setup/ss_triangle.c | 8 ++++---- src/mesa/swrast_setup/ss_triangle.h | 2 +- src/mesa/swrast_setup/ss_vb.h | 2 +- src/mesa/tnl/t_draw.c | 12 ++++++------ src/mesa/tnl/t_pipeline.h | 2 +- src/mesa/tnl/t_rasterpos.c | 10 +++++----- src/mesa/tnl/t_vb_cull.c | 12 ++++++------ src/mesa/tnl/t_vb_fog.c | 12 ++++++------ src/mesa/tnl/t_vb_light.c | 10 +++++----- src/mesa/tnl/t_vb_normals.c | 12 ++++++------ src/mesa/tnl/t_vb_points.c | 4 ++-- src/mesa/tnl/t_vb_program.c | 10 +++++----- src/mesa/tnl/t_vb_render.c | 12 ++++++------ src/mesa/tnl/t_vb_texgen.c | 12 ++++++------ src/mesa/tnl/t_vb_texmat.c | 12 ++++++------ src/mesa/tnl/t_vb_vertex.c | 12 ++++++------ src/mesa/tnl/t_vertex.c | 6 +++--- src/mesa/tnl/t_vertex.h | 2 +- src/mesa/tnl/t_vertex_generic.c | 6 +++--- src/mesa/tnl/t_vertex_sse.c | 8 ++++---- src/mesa/tnl/t_vp_build.c | 2 +- src/mesa/tnl/t_vp_build.h | 2 +- src/mesa/vf/vf.c | 6 +++--- src/mesa/vf/vf_generic.c | 8 ++++---- src/mesa/vf/vf_sse.c | 8 ++++---- src/mesa/x86-64/x86-64.c | 4 ++-- src/mesa/x86/3dnow.c | 4 ++-- src/mesa/x86/common_x86.c | 2 +- src/mesa/x86/rtasm/x86sse.c | 2 +- src/mesa/x86/sse.c | 4 ++-- src/mesa/x86/x86.c | 4 ++-- 137 files changed, 369 insertions(+), 371 deletions(-) (limited to 'src/mesa/x86/rtasm/x86sse.c') diff --git a/src/mesa/SConscript b/src/mesa/SConscript index d2de189f69..2c74dc7dd0 100644 --- a/src/mesa/SConscript +++ b/src/mesa/SConscript @@ -10,7 +10,6 @@ if env['platform'] != 'winddk': env.Append(CPPPATH = [ '#/src/mesa', - '#/src/mesa/main', ]) if gcc: diff --git a/src/mesa/glapi/glapi.c b/src/mesa/glapi/glapi.c index c236656d9a..53efd7eef4 100644 --- a/src/mesa/glapi/glapi.c +++ b/src/mesa/glapi/glapi.c @@ -50,7 +50,7 @@ -#include "glheader.h" +#include "main/glheader.h" #include "glapi.h" #include "glapioffsets.h" #include "glapitable.h" diff --git a/src/mesa/glapi/glapi_getproc.c b/src/mesa/glapi/glapi_getproc.c index 3634444c85..6d40b495c7 100644 --- a/src/mesa/glapi/glapi_getproc.c +++ b/src/mesa/glapi/glapi_getproc.c @@ -32,7 +32,7 @@ #include #include -#include "glheader.h" +#include "main/glheader.h" #include "glapi.h" #include "glapioffsets.h" #include "glapitable.h" diff --git a/src/mesa/glapi/glthread.c b/src/mesa/glapi/glthread.c index 4513853f5a..09cc8cfcde 100644 --- a/src/mesa/glapi/glthread.c +++ b/src/mesa/glapi/glthread.c @@ -29,7 +29,7 @@ */ -#include "glheader.h" +#include "main/glheader.h" #include "glthread.h" diff --git a/src/mesa/math/m_debug_clip.c b/src/mesa/math/m_debug_clip.c index ab28818359..460fed4a75 100644 --- a/src/mesa/math/m_debug_clip.c +++ b/src/mesa/math/m_debug_clip.c @@ -25,10 +25,10 @@ * Gareth Hughes */ -#include "glheader.h" -#include "context.h" -#include "macros.h" -#include "imports.h" +#include "main/glheader.h" +#include "main/context.h" +#include "main/macros.h" +#include "main/imports.h" #include "m_matrix.h" #include "m_xform.h" diff --git a/src/mesa/math/m_debug_norm.c b/src/mesa/math/m_debug_norm.c index 11cae6bba7..89c632e7d5 100644 --- a/src/mesa/math/m_debug_norm.c +++ b/src/mesa/math/m_debug_norm.c @@ -26,10 +26,10 @@ * Gareth Hughes */ -#include "glheader.h" -#include "context.h" -#include "macros.h" -#include "imports.h" +#include "main/glheader.h" +#include "main/context.h" +#include "main/macros.h" +#include "main/imports.h" #include "m_matrix.h" #include "m_xform.h" diff --git a/src/mesa/math/m_debug_xform.c b/src/mesa/math/m_debug_xform.c index 0b07b4fd68..df8cc066b6 100644 --- a/src/mesa/math/m_debug_xform.c +++ b/src/mesa/math/m_debug_xform.c @@ -26,10 +26,10 @@ * Updated for P6 architecture by Gareth Hughes. */ -#include "glheader.h" -#include "context.h" -#include "macros.h" -#include "imports.h" +#include "main/glheader.h" +#include "main/context.h" +#include "main/macros.h" +#include "main/imports.h" #include "m_matrix.h" #include "m_xform.h" diff --git a/src/mesa/math/m_matrix.c b/src/mesa/math/m_matrix.c index b4ba1bc2a0..84b4cae4ad 100644 --- a/src/mesa/math/m_matrix.c +++ b/src/mesa/math/m_matrix.c @@ -34,10 +34,10 @@ */ -#include "glheader.h" -#include "imports.h" -#include "macros.h" -#include "imports.h" +#include "main/glheader.h" +#include "main/imports.h" +#include "main/macros.h" +#include "main/imports.h" #include "m_matrix.h" diff --git a/src/mesa/math/m_translate.c b/src/mesa/math/m_translate.c index c7423e9d9d..4a20f45ee4 100644 --- a/src/mesa/math/m_translate.c +++ b/src/mesa/math/m_translate.c @@ -28,9 +28,9 @@ */ -#include "glheader.h" -#include "mtypes.h" /* GLchan hack */ -#include "colormac.h" +#include "main/glheader.h" +#include "main/mtypes.h" /* GLchan hack */ +#include "main/colormac.h" #include "m_translate.h" diff --git a/src/mesa/math/m_vector.c b/src/mesa/math/m_vector.c index 3ad81d468b..c5e2fd1de1 100644 --- a/src/mesa/math/m_vector.c +++ b/src/mesa/math/m_vector.c @@ -28,10 +28,10 @@ */ -#include "glheader.h" -#include "imports.h" -#include "macros.h" -#include "imports.h" +#include "main/glheader.h" +#include "main/imports.h" +#include "main/macros.h" +#include "main/imports.h" #include "m_vector.h" diff --git a/src/mesa/math/m_xform.h b/src/mesa/math/m_xform.h index 99b071a46b..d1b974f043 100644 --- a/src/mesa/math/m_xform.h +++ b/src/mesa/math/m_xform.h @@ -27,8 +27,8 @@ #define _M_XFORM_H -#include "glheader.h" -#include "config.h" +#include "main/glheader.h" +#include "main/config.h" #include "math/m_vector.h" #include "math/m_matrix.h" diff --git a/src/mesa/shader/arbprogparse.c b/src/mesa/shader/arbprogparse.c index ff583352ce..78cc6aa9cc 100644 --- a/src/mesa/shader/arbprogparse.c +++ b/src/mesa/shader/arbprogparse.c @@ -38,9 +38,9 @@ #include "programopt.h" #include "prog_parameter.h" #include "prog_statevars.h" -#include "context.h" -#include "macros.h" -#include "mtypes.h" +#include "main/context.h" +#include "main/macros.h" +#include "main/mtypes.h" #include "prog_instruction.h" diff --git a/src/mesa/shader/arbprogparse.h b/src/mesa/shader/arbprogparse.h index 4574e5cd55..980d39fb9f 100644 --- a/src/mesa/shader/arbprogparse.h +++ b/src/mesa/shader/arbprogparse.h @@ -26,7 +26,7 @@ #ifndef ARBPROGPARSE_H #define ARBPROGPARSE_H -#include "mtypes.h" +#include "main/mtypes.h" extern void _mesa_parse_arb_vertex_program(GLcontext *ctx, GLenum target, diff --git a/src/mesa/shader/arbprogram.c b/src/mesa/shader/arbprogram.c index 81c20a0150..beb5deea50 100644 --- a/src/mesa/shader/arbprogram.c +++ b/src/mesa/shader/arbprogram.c @@ -29,14 +29,14 @@ */ -#include "glheader.h" +#include "main/glheader.h" #include "arbprogram.h" #include "arbprogparse.h" -#include "context.h" -#include "hash.h" -#include "imports.h" -#include "macros.h" -#include "mtypes.h" +#include "main/context.h" +#include "main/hash.h" +#include "main/imports.h" +#include "main/macros.h" +#include "main/mtypes.h" #include "program.h" diff --git a/src/mesa/shader/atifragshader.c b/src/mesa/shader/atifragshader.c index 854c911874..ac087d415c 100644 --- a/src/mesa/shader/atifragshader.c +++ b/src/mesa/shader/atifragshader.c @@ -21,13 +21,13 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include "glheader.h" -#include "context.h" -#include "hash.h" -#include "imports.h" -#include "macros.h" -#include "enums.h" -#include "mtypes.h" +#include "main/glheader.h" +#include "main/context.h" +#include "main/hash.h" +#include "main/imports.h" +#include "main/macros.h" +#include "main/enums.h" +#include "main/mtypes.h" #include "atifragshader.h" #define MESA_DEBUG_ATI_FS 0 diff --git a/src/mesa/shader/grammar/grammar_mesa.h b/src/mesa/shader/grammar/grammar_mesa.h index c14033a9d4..6c92c5812d 100644 --- a/src/mesa/shader/grammar/grammar_mesa.h +++ b/src/mesa/shader/grammar/grammar_mesa.h @@ -26,7 +26,7 @@ #define GRAMMAR_MESA_H -#include "imports.h" +#include "main/imports.h" /* NOTE: include Mesa 3-D specific headers here */ diff --git a/src/mesa/shader/nvfragparse.c b/src/mesa/shader/nvfragparse.c index 0f1a1eade4..a2a7a5f3f4 100644 --- a/src/mesa/shader/nvfragparse.c +++ b/src/mesa/shader/nvfragparse.c @@ -37,10 +37,10 @@ * including any use thereof or modifications thereto. */ -#include "glheader.h" -#include "context.h" -#include "imports.h" -#include "macros.h" +#include "main/glheader.h" +#include "main/context.h" +#include "main/imports.h" +#include "main/macros.h" #include "prog_parameter.h" #include "prog_instruction.h" #include "nvfragparse.h" diff --git a/src/mesa/shader/nvprogram.c b/src/mesa/shader/nvprogram.c index 409c61cdc1..d656d4b28b 100644 --- a/src/mesa/shader/nvprogram.c +++ b/src/mesa/shader/nvprogram.c @@ -37,11 +37,11 @@ * including any use thereof or modifications thereto. */ -#include "glheader.h" -#include "context.h" -#include "hash.h" -#include "imports.h" -#include "macros.h" +#include "main/glheader.h" +#include "main/context.h" +#include "main/hash.h" +#include "main/imports.h" +#include "main/macros.h" #include "prog_parameter.h" #include "prog_instruction.h" #include "nvfragparse.h" diff --git a/src/mesa/shader/nvvertparse.c b/src/mesa/shader/nvvertparse.c index ac96d4a60e..08538c0ee4 100644 --- a/src/mesa/shader/nvvertparse.c +++ b/src/mesa/shader/nvvertparse.c @@ -37,10 +37,10 @@ * including any use thereof or modifications thereto. */ -#include "glheader.h" -#include "context.h" -#include "imports.h" -#include "macros.h" +#include "main/glheader.h" +#include "main/context.h" +#include "main/imports.h" +#include "main/macros.h" #include "nvprogram.h" #include "nvvertparse.h" #include "prog_instruction.h" diff --git a/src/mesa/shader/prog_debug.c b/src/mesa/shader/prog_debug.c index 57929fcbca..7bcb2ef734 100644 --- a/src/mesa/shader/prog_debug.c +++ b/src/mesa/shader/prog_debug.c @@ -23,9 +23,9 @@ */ -#include "glheader.h" -#include "context.h" -#include "macros.h" +#include "main/glheader.h" +#include "main/context.h" +#include "main/macros.h" #include "nvfragparse.h" #include "nvvertparse.h" #include "program.h" diff --git a/src/mesa/shader/prog_execute.c b/src/mesa/shader/prog_execute.c index 4745211c65..5afd9eb153 100644 --- a/src/mesa/shader/prog_execute.c +++ b/src/mesa/shader/prog_execute.c @@ -35,9 +35,9 @@ */ -#include "glheader.h" -#include "colormac.h" -#include "context.h" +#include "main/glheader.h" +#include "main/colormac.h" +#include "main/context.h" #include "program.h" #include "prog_execute.h" #include "prog_instruction.h" diff --git a/src/mesa/shader/prog_instruction.c b/src/mesa/shader/prog_instruction.c index bea5d0551e..1033496d97 100644 --- a/src/mesa/shader/prog_instruction.c +++ b/src/mesa/shader/prog_instruction.c @@ -23,9 +23,9 @@ */ -#include "glheader.h" -#include "imports.h" -#include "mtypes.h" +#include "main/glheader.h" +#include "main/imports.h" +#include "main/mtypes.h" #include "prog_instruction.h" diff --git a/src/mesa/shader/prog_parameter.c b/src/mesa/shader/prog_parameter.c index d87e8f6e15..e0d2096b30 100644 --- a/src/mesa/shader/prog_parameter.c +++ b/src/mesa/shader/prog_parameter.c @@ -29,9 +29,9 @@ */ -#include "glheader.h" -#include "imports.h" -#include "macros.h" +#include "main/glheader.h" +#include "main/imports.h" +#include "main/macros.h" #include "prog_instruction.h" #include "prog_parameter.h" #include "prog_statevars.h" diff --git a/src/mesa/shader/prog_parameter.h b/src/mesa/shader/prog_parameter.h index dfb8c39ca4..ac5c629fab 100644 --- a/src/mesa/shader/prog_parameter.h +++ b/src/mesa/shader/prog_parameter.h @@ -31,7 +31,7 @@ #ifndef PROG_PARAMETER_H #define PROG_PARAMETER_H -#include "mtypes.h" +#include "main/mtypes.h" #include "prog_statevars.h" diff --git a/src/mesa/shader/prog_print.c b/src/mesa/shader/prog_print.c index 5368ab2187..10c5afec18 100644 --- a/src/mesa/shader/prog_print.c +++ b/src/mesa/shader/prog_print.c @@ -28,9 +28,9 @@ * \author Brian Paul */ -#include "glheader.h" -#include "context.h" -#include "imports.h" +#include "main/glheader.h" +#include "main/context.h" +#include "main/imports.h" #include "prog_instruction.h" #include "prog_parameter.h" #include "prog_print.h" diff --git a/src/mesa/shader/prog_statevars.c b/src/mesa/shader/prog_statevars.c index 81bb4122f2..819db25a00 100644 --- a/src/mesa/shader/prog_statevars.c +++ b/src/mesa/shader/prog_statevars.c @@ -29,12 +29,12 @@ */ -#include "glheader.h" -#include "context.h" -#include "hash.h" -#include "imports.h" -#include "macros.h" -#include "mtypes.h" +#include "main/glheader.h" +#include "main/context.h" +#include "main/hash.h" +#include "main/imports.h" +#include "main/macros.h" +#include "main/mtypes.h" #include "prog_statevars.h" #include "prog_parameter.h" diff --git a/src/mesa/shader/prog_statevars.h b/src/mesa/shader/prog_statevars.h index a515fda3aa..0a1c235828 100644 --- a/src/mesa/shader/prog_statevars.h +++ b/src/mesa/shader/prog_statevars.h @@ -25,7 +25,7 @@ #ifndef PROG_STATEVARS_H #define PROG_STATEVARS_H -#include "mtypes.h" +#include "main/mtypes.h" /** diff --git a/src/mesa/shader/program.c b/src/mesa/shader/program.c index 13d6df1ce6..02e23aaa3a 100644 --- a/src/mesa/shader/program.c +++ b/src/mesa/shader/program.c @@ -29,9 +29,9 @@ */ -#include "glheader.h" -#include "context.h" -#include "hash.h" +#include "main/glheader.h" +#include "main/context.h" +#include "main/hash.h" #include "program.h" #include "prog_cache.h" #include "prog_parameter.h" diff --git a/src/mesa/shader/program.h b/src/mesa/shader/program.h index 7484961364..f8bd63233e 100644 --- a/src/mesa/shader/program.h +++ b/src/mesa/shader/program.h @@ -40,7 +40,7 @@ #ifndef PROGRAM_H #define PROGRAM_H -#include "mtypes.h" +#include "main/mtypes.h" extern struct gl_program _mesa_DummyProgram; diff --git a/src/mesa/shader/programopt.c b/src/mesa/shader/programopt.c index f3511ba00e..d6a3231055 100644 --- a/src/mesa/shader/programopt.c +++ b/src/mesa/shader/programopt.c @@ -31,8 +31,8 @@ */ -#include "glheader.h" -#include "context.h" +#include "main/glheader.h" +#include "main/context.h" #include "prog_parameter.h" #include "prog_statevars.h" #include "program.h" diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c index bd3745cfe6..b33dfd6663 100644 --- a/src/mesa/shader/shader_api.c +++ b/src/mesa/shader/shader_api.c @@ -35,10 +35,10 @@ */ -#include "glheader.h" -#include "context.h" -#include "hash.h" -#include "macros.h" +#include "main/glheader.h" +#include "main/context.h" +#include "main/hash.h" +#include "main/macros.h" #include "program.h" #include "prog_parameter.h" #include "prog_print.h" diff --git a/src/mesa/shader/shader_api.h b/src/mesa/shader/shader_api.h index 5521c585b5..e7f1266915 100644 --- a/src/mesa/shader/shader_api.h +++ b/src/mesa/shader/shader_api.h @@ -27,8 +27,8 @@ #define SHADER_API_H -#include "glheader.h" -#include "mtypes.h" +#include "main/glheader.h" +#include "main/mtypes.h" /** diff --git a/src/mesa/shader/slang/slang_codegen.h b/src/mesa/shader/slang/slang_codegen.h index 821d396162..ba7ca4c142 100644 --- a/src/mesa/shader/slang/slang_codegen.h +++ b/src/mesa/shader/slang/slang_codegen.h @@ -27,7 +27,7 @@ #define SLANG_CODEGEN_H -#include "imports.h" +#include "main/imports.h" #include "slang_compile.h" diff --git a/src/mesa/shader/slang/slang_compile.h b/src/mesa/shader/slang/slang_compile.h index 0f1f820d2e..35e468b44e 100644 --- a/src/mesa/shader/slang/slang_compile.h +++ b/src/mesa/shader/slang/slang_compile.h @@ -25,8 +25,8 @@ #if !defined SLANG_COMPILE_H #define SLANG_COMPILE_H -#include "imports.h" -#include "mtypes.h" +#include "main/imports.h" +#include "main/mtypes.h" #include "slang_typeinfo.h" #include "slang_compile_variable.h" #include "slang_compile_struct.h" diff --git a/src/mesa/shader/slang/slang_compile_function.c b/src/mesa/shader/slang/slang_compile_function.c index 80769b33ae..8405d7f778 100644 --- a/src/mesa/shader/slang/slang_compile_function.c +++ b/src/mesa/shader/slang/slang_compile_function.c @@ -28,7 +28,7 @@ * \author Michal Krol */ -#include "imports.h" +#include "main/imports.h" #include "slang_compile.h" #include "slang_mem.h" diff --git a/src/mesa/shader/slang/slang_compile_operation.c b/src/mesa/shader/slang/slang_compile_operation.c index 4d2fd5b666..c0d469c829 100644 --- a/src/mesa/shader/slang/slang_compile_operation.c +++ b/src/mesa/shader/slang/slang_compile_operation.c @@ -28,7 +28,7 @@ * \author Michal Krol */ -#include "imports.h" +#include "main/imports.h" #include "slang_compile.h" #include "slang_mem.h" diff --git a/src/mesa/shader/slang/slang_compile_struct.c b/src/mesa/shader/slang/slang_compile_struct.c index 96bdb1f491..e6c38730d7 100644 --- a/src/mesa/shader/slang/slang_compile_struct.c +++ b/src/mesa/shader/slang/slang_compile_struct.c @@ -28,7 +28,7 @@ * \author Michal Krol */ -#include "imports.h" +#include "main/imports.h" #include "slang_mem.h" #include "slang_compile.h" diff --git a/src/mesa/shader/slang/slang_compile_variable.c b/src/mesa/shader/slang/slang_compile_variable.c index d53255075f..b26c18e38d 100644 --- a/src/mesa/shader/slang/slang_compile_variable.c +++ b/src/mesa/shader/slang/slang_compile_variable.c @@ -28,7 +28,7 @@ * \author Michal Krol */ -#include "imports.h" +#include "main/imports.h" #include "slang_compile.h" #include "slang_mem.h" diff --git a/src/mesa/shader/slang/slang_emit.h b/src/mesa/shader/slang/slang_emit.h index 153e872d74..4db4bbe562 100644 --- a/src/mesa/shader/slang/slang_emit.h +++ b/src/mesa/shader/slang/slang_emit.h @@ -26,10 +26,10 @@ #define SLANG_EMIT_H -#include "imports.h" +#include "main/imports.h" #include "slang_compile.h" #include "slang_ir.h" -#include "mtypes.h" +#include "main/mtypes.h" extern void diff --git a/src/mesa/shader/slang/slang_ir.c b/src/mesa/shader/slang/slang_ir.c index a414036a36..23d554234e 100644 --- a/src/mesa/shader/slang/slang_ir.c +++ b/src/mesa/shader/slang/slang_ir.c @@ -23,8 +23,8 @@ */ -#include "imports.h" -#include "context.h" +#include "main/imports.h" +#include "main/context.h" #include "slang_ir.h" #include "slang_mem.h" #include "shader/prog_print.h" diff --git a/src/mesa/shader/slang/slang_ir.h b/src/mesa/shader/slang/slang_ir.h index 61ff649e5c..e4697ba3b4 100644 --- a/src/mesa/shader/slang/slang_ir.h +++ b/src/mesa/shader/slang/slang_ir.h @@ -33,10 +33,10 @@ #define SLANG_IR_H -#include "imports.h" +#include "main/imports.h" #include "slang_compile.h" #include "slang_label.h" -#include "mtypes.h" +#include "main/mtypes.h" /** diff --git a/src/mesa/shader/slang/slang_library_noise.c b/src/mesa/shader/slang/slang_library_noise.c index 46075c492c..25a05657cc 100644 --- a/src/mesa/shader/slang/slang_library_noise.c +++ b/src/mesa/shader/slang/slang_library_noise.c @@ -49,7 +49,7 @@ */ -#include "imports.h" +#include "main/imports.h" #include "slang_library_noise.h" #define FASTFLOOR(x) ( ((x)>0) ? ((int)x) : (((int)x)-1) ) diff --git a/src/mesa/shader/slang/slang_log.c b/src/mesa/shader/slang/slang_log.c index c963914fe3..01591ceba5 100644 --- a/src/mesa/shader/slang/slang_log.c +++ b/src/mesa/shader/slang/slang_log.c @@ -22,7 +22,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include "imports.h" +#include "main/imports.h" #include "slang_log.h" #include "slang_utility.h" diff --git a/src/mesa/shader/slang/slang_mem.c b/src/mesa/shader/slang/slang_mem.c index e1d1e6ba14..21d6bfce88 100644 --- a/src/mesa/shader/slang/slang_mem.c +++ b/src/mesa/shader/slang/slang_mem.c @@ -32,8 +32,8 @@ * \author Brian Paul */ -#include "context.h" -#include "macros.h" +#include "main/context.h" +#include "main/macros.h" #include "slang_mem.h" diff --git a/src/mesa/shader/slang/slang_mem.h b/src/mesa/shader/slang/slang_mem.h index 49885b6c98..b5bfae2479 100644 --- a/src/mesa/shader/slang/slang_mem.h +++ b/src/mesa/shader/slang/slang_mem.h @@ -27,7 +27,7 @@ #define SLANG_MEM_H -#include "imports.h" +#include "main/imports.h" typedef struct slang_mempool_ slang_mempool; diff --git a/src/mesa/shader/slang/slang_preprocess.c b/src/mesa/shader/slang/slang_preprocess.c index d3f412c211..bfe29b6bc9 100644 --- a/src/mesa/shader/slang/slang_preprocess.c +++ b/src/mesa/shader/slang/slang_preprocess.c @@ -28,7 +28,7 @@ * \author Michal Krol */ -#include "imports.h" +#include "main/imports.h" #include "shader/grammar/grammar_mesa.h" #include "slang_preprocess.h" diff --git a/src/mesa/shader/slang/slang_print.c b/src/mesa/shader/slang/slang_print.c index f48762fb11..4422f70159 100644 --- a/src/mesa/shader/slang/slang_print.c +++ b/src/mesa/shader/slang/slang_print.c @@ -4,7 +4,7 @@ */ -#include "imports.h" +#include "main/imports.h" #include "slang_compile.h" #include "slang_print.h" diff --git a/src/mesa/shader/slang/slang_simplify.c b/src/mesa/shader/slang/slang_simplify.c index 9a4b6a88d1..d5997283a8 100644 --- a/src/mesa/shader/slang/slang_simplify.c +++ b/src/mesa/shader/slang/slang_simplify.c @@ -28,9 +28,9 @@ * \author Michal Krol */ -#include "imports.h" -#include "macros.h" -#include "get.h" +#include "main/imports.h" +#include "main/macros.h" +#include "main/get.h" #include "slang_compile.h" #include "slang_codegen.h" #include "slang_simplify.h" diff --git a/src/mesa/shader/slang/slang_storage.c b/src/mesa/shader/slang/slang_storage.c index bc32aa4b02..e8b0fb7747 100644 --- a/src/mesa/shader/slang/slang_storage.c +++ b/src/mesa/shader/slang/slang_storage.c @@ -28,7 +28,7 @@ * \author Michal Krol */ -#include "imports.h" +#include "main/imports.h" #include "slang_storage.h" #include "slang_mem.h" diff --git a/src/mesa/shader/slang/slang_typeinfo.h b/src/mesa/shader/slang/slang_typeinfo.h index 587331e8b1..8a36fc3422 100644 --- a/src/mesa/shader/slang/slang_typeinfo.h +++ b/src/mesa/shader/slang/slang_typeinfo.h @@ -25,8 +25,8 @@ #ifndef SLANG_TYPEINFO_H #define SLANG_TYPEINFO_H 1 -#include "imports.h" -#include "mtypes.h" +#include "main/imports.h" +#include "main/mtypes.h" #include "slang_log.h" #include "slang_utility.h" #include "slang_vartable.h" diff --git a/src/mesa/shader/slang/slang_utility.c b/src/mesa/shader/slang/slang_utility.c index 2a2dc8e54f..3631e32b3c 100644 --- a/src/mesa/shader/slang/slang_utility.c +++ b/src/mesa/shader/slang/slang_utility.c @@ -28,7 +28,7 @@ * \author Michal Krol */ -#include "imports.h" +#include "main/imports.h" #include "slang_utility.h" #include "slang_mem.h" diff --git a/src/mesa/sources b/src/mesa/sources index e6b050c3f2..0e0e10979b 100644 --- a/src/mesa/sources +++ b/src/mesa/sources @@ -342,7 +342,6 @@ COMMON_DRIVER_OBJECTS = $(COMMON_DRIVER_SOURCES:.c=.o) INCLUDE_DIRS = \ -I$(TOP)/include \ -I$(TOP)/src/mesa \ - -I$(TOP)/src/mesa/main \ -I$(TOP)/src/gallium/include \ -I$(TOP)/src/gallium/drivers \ -I$(TOP)/src/gallium/auxiliary diff --git a/src/mesa/sparc/sparc.c b/src/mesa/sparc/sparc.c index 1b77b0bb7b..84e8ac6723 100644 --- a/src/mesa/sparc/sparc.c +++ b/src/mesa/sparc/sparc.c @@ -31,7 +31,7 @@ #ifdef USE_SPARC_ASM -#include "context.h" +#include "main/context.h" #include "math/m_xform.h" #include "tnl/t_context.h" diff --git a/src/mesa/state_tracker/st_atom.c b/src/mesa/state_tracker/st_atom.c index ecfd117918..fc8587f459 100644 --- a/src/mesa/state_tracker/st_atom.c +++ b/src/mesa/state_tracker/st_atom.c @@ -26,8 +26,8 @@ **************************************************************************/ -#include "glheader.h" -#include "context.h" +#include "main/glheader.h" +#include "main/context.h" #include "pipe/p_defines.h" #include "st_context.h" diff --git a/src/mesa/state_tracker/st_atom_viewport.c b/src/mesa/state_tracker/st_atom_viewport.c index 8b9f1abda4..27ec2eb033 100644 --- a/src/mesa/state_tracker/st_atom_viewport.c +++ b/src/mesa/state_tracker/st_atom_viewport.c @@ -26,8 +26,8 @@ **************************************************************************/ -#include "context.h" -#include "colormac.h" +#include "main/context.h" +#include "main/colormac.h" #include "st_context.h" #include "st_atom.h" #include "pipe/p_context.h" diff --git a/src/mesa/state_tracker/st_mesa_to_tgsi.h b/src/mesa/state_tracker/st_mesa_to_tgsi.h index 63fc855b53..f17f2eac96 100644 --- a/src/mesa/state_tracker/st_mesa_to_tgsi.h +++ b/src/mesa/state_tracker/st_mesa_to_tgsi.h @@ -29,7 +29,7 @@ #ifndef ST_MESA_TO_TGSI_H #define ST_MESA_TO_TGSI_H -#include "mtypes.h" +#include "main/mtypes.h" #if defined __cplusplus diff --git a/src/mesa/state_tracker/st_texture.c b/src/mesa/state_tracker/st_texture.c index 3e5054ecd2..289b78b38b 100644 --- a/src/mesa/state_tracker/st_texture.c +++ b/src/mesa/state_tracker/st_texture.c @@ -28,7 +28,7 @@ #include "st_context.h" #include "st_format.h" #include "st_texture.h" -#include "enums.h" +#include "main/enums.h" #undef Elements /* fix re-defined macro warning */ diff --git a/src/mesa/swrast/s_aaline.c b/src/mesa/swrast/s_aaline.c index d6a9afb421..ee65a71d7e 100644 --- a/src/mesa/swrast/s_aaline.c +++ b/src/mesa/swrast/s_aaline.c @@ -23,14 +23,14 @@ */ -#include "glheader.h" -#include "imports.h" -#include "macros.h" +#include "main/glheader.h" +#include "main/imports.h" +#include "main/macros.h" #include "swrast/s_aaline.h" #include "swrast/s_context.h" #include "swrast/s_span.h" #include "swrast/swrast.h" -#include "mtypes.h" +#include "main/mtypes.h" #define SUB_PIXEL 4 diff --git a/src/mesa/swrast/s_aaline.h b/src/mesa/swrast/s_aaline.h index 41e7e5fd4d..9fb4959f91 100644 --- a/src/mesa/swrast/s_aaline.h +++ b/src/mesa/swrast/s_aaline.h @@ -28,7 +28,7 @@ #define S_AALINE_H -#include "mtypes.h" +#include "main/mtypes.h" #include "swrast.h" diff --git a/src/mesa/swrast/s_aatriangle.c b/src/mesa/swrast/s_aatriangle.c index 66891f9fec..078f16aea0 100644 --- a/src/mesa/swrast/s_aatriangle.c +++ b/src/mesa/swrast/s_aatriangle.c @@ -28,12 +28,12 @@ */ -#include "glheader.h" -#include "context.h" -#include "colormac.h" -#include "context.h" -#include "macros.h" -#include "imports.h" +#include "main/glheader.h" +#include "main/context.h" +#include "main/colormac.h" +#include "main/context.h" +#include "main/macros.h" +#include "main/imports.h" #include "s_aatriangle.h" #include "s_context.h" #include "s_span.h" diff --git a/src/mesa/swrast/s_aatriangle.h b/src/mesa/swrast/s_aatriangle.h index ebb828eb19..734d420b62 100644 --- a/src/mesa/swrast/s_aatriangle.h +++ b/src/mesa/swrast/s_aatriangle.h @@ -28,7 +28,7 @@ #define S_AATRIANGLE_H -#include "mtypes.h" +#include "main/mtypes.h" #include "swrast.h" diff --git a/src/mesa/swrast/s_accum.c b/src/mesa/swrast/s_accum.c index 3c45dee399..13a42fdf53 100644 --- a/src/mesa/swrast/s_accum.c +++ b/src/mesa/swrast/s_accum.c @@ -23,10 +23,10 @@ */ -#include "glheader.h" -#include "context.h" -#include "macros.h" -#include "imports.h" +#include "main/glheader.h" +#include "main/context.h" +#include "main/macros.h" +#include "main/imports.h" #include "fbobject.h" #include "s_accum.h" diff --git a/src/mesa/swrast/s_accum.h b/src/mesa/swrast/s_accum.h index 97d2bef4c3..42e38cf02b 100644 --- a/src/mesa/swrast/s_accum.h +++ b/src/mesa/swrast/s_accum.h @@ -27,7 +27,7 @@ #define S_ACCUM_H -#include "mtypes.h" +#include "main/mtypes.h" extern void diff --git a/src/mesa/swrast/s_alpha.c b/src/mesa/swrast/s_alpha.c index 3c55d3e9e3..5761bb00b4 100644 --- a/src/mesa/swrast/s_alpha.c +++ b/src/mesa/swrast/s_alpha.c @@ -27,10 +27,10 @@ * \brief Functions to apply alpha test. */ -#include "glheader.h" -#include "context.h" -#include "colormac.h" -#include "macros.h" +#include "main/glheader.h" +#include "main/context.h" +#include "main/colormac.h" +#include "main/macros.h" #include "s_alpha.h" #include "s_context.h" diff --git a/src/mesa/swrast/s_alpha.h b/src/mesa/swrast/s_alpha.h index a85ef8a83a..92cb01b18a 100644 --- a/src/mesa/swrast/s_alpha.h +++ b/src/mesa/swrast/s_alpha.h @@ -28,7 +28,7 @@ #define S_ALPHA_H -#include "mtypes.h" +#include "main/mtypes.h" #include "s_context.h" diff --git a/src/mesa/swrast/s_atifragshader.c b/src/mesa/swrast/s_atifragshader.c index 55ec757ee0..9fa352c36b 100644 --- a/src/mesa/swrast/s_atifragshader.c +++ b/src/mesa/swrast/s_atifragshader.c @@ -20,10 +20,10 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include "glheader.h" -#include "colormac.h" -#include "context.h" -#include "macros.h" +#include "main/glheader.h" +#include "main/colormac.h" +#include "main/context.h" +#include "main/macros.h" #include "shader/program.h" #include "shader/atifragshader.h" #include "swrast/s_atifragshader.h" diff --git a/src/mesa/swrast/s_bitmap.c b/src/mesa/swrast/s_bitmap.c index f3dda12e25..2308acae1c 100644 --- a/src/mesa/swrast/s_bitmap.c +++ b/src/mesa/swrast/s_bitmap.c @@ -28,10 +28,10 @@ * \author Brian Paul */ -#include "glheader.h" +#include "main/glheader.h" #include "bufferobj.h" #include "image.h" -#include "macros.h" +#include "main/macros.h" #include "pixel.h" #include "s_context.h" diff --git a/src/mesa/swrast/s_blend.c b/src/mesa/swrast/s_blend.c index 82c5e84294..7fd8945354 100644 --- a/src/mesa/swrast/s_blend.c +++ b/src/mesa/swrast/s_blend.c @@ -35,10 +35,10 @@ -#include "glheader.h" -#include "context.h" -#include "colormac.h" -#include "macros.h" +#include "main/glheader.h" +#include "main/context.h" +#include "main/colormac.h" +#include "main/macros.h" #include "s_blend.h" #include "s_context.h" diff --git a/src/mesa/swrast/s_blend.h b/src/mesa/swrast/s_blend.h index 0b8cbed1a0..c8abecc099 100644 --- a/src/mesa/swrast/s_blend.h +++ b/src/mesa/swrast/s_blend.h @@ -27,7 +27,7 @@ #define S_BLEND_H -#include "mtypes.h" +#include "main/mtypes.h" #include "s_context.h" diff --git a/src/mesa/swrast/s_blit.c b/src/mesa/swrast/s_blit.c index 5aec4aad03..0e12dfa1da 100644 --- a/src/mesa/swrast/s_blit.c +++ b/src/mesa/swrast/s_blit.c @@ -23,8 +23,8 @@ */ -#include "glheader.h" -#include "macros.h" +#include "main/glheader.h" +#include "main/macros.h" #include "s_context.h" diff --git a/src/mesa/swrast/s_buffers.c b/src/mesa/swrast/s_buffers.c index 90a56284c5..a70f474587 100644 --- a/src/mesa/swrast/s_buffers.c +++ b/src/mesa/swrast/s_buffers.c @@ -24,11 +24,11 @@ /** XXX This file should be named s_clear.c */ -#include "glheader.h" -#include "colormac.h" -#include "macros.h" -#include "imports.h" -#include "mtypes.h" +#include "main/glheader.h" +#include "main/colormac.h" +#include "main/macros.h" +#include "main/imports.h" +#include "main/mtypes.h" #include "s_accum.h" #include "s_context.h" diff --git a/src/mesa/swrast/s_context.c b/src/mesa/swrast/s_context.c index f43fa61f8a..4d9b956f85 100644 --- a/src/mesa/swrast/s_context.c +++ b/src/mesa/swrast/s_context.c @@ -26,11 +26,11 @@ * Brian Paul */ -#include "imports.h" +#include "main/imports.h" #include "bufferobj.h" -#include "context.h" -#include "colormac.h" -#include "mtypes.h" +#include "main/context.h" +#include "main/colormac.h" +#include "main/mtypes.h" #include "teximage.h" #include "swrast.h" #include "shader/prog_statevars.h" diff --git a/src/mesa/swrast/s_copypix.c b/src/mesa/swrast/s_copypix.c index bbe1081860..7385a9942c 100644 --- a/src/mesa/swrast/s_copypix.c +++ b/src/mesa/swrast/s_copypix.c @@ -23,14 +23,14 @@ */ -#include "glheader.h" -#include "context.h" -#include "colormac.h" +#include "main/glheader.h" +#include "main/context.h" +#include "main/colormac.h" #include "convolve.h" #include "histogram.h" #include "image.h" -#include "macros.h" -#include "imports.h" +#include "main/macros.h" +#include "main/imports.h" #include "pixel.h" #include "s_context.h" diff --git a/src/mesa/swrast/s_depth.c b/src/mesa/swrast/s_depth.c index 408174c990..a9d3e9d98e 100644 --- a/src/mesa/swrast/s_depth.c +++ b/src/mesa/swrast/s_depth.c @@ -23,10 +23,10 @@ */ -#include "glheader.h" -#include "context.h" -#include "macros.h" -#include "imports.h" +#include "main/glheader.h" +#include "main/context.h" +#include "main/macros.h" +#include "main/imports.h" #include "fbobject.h" #include "s_depth.h" diff --git a/src/mesa/swrast/s_depth.h b/src/mesa/swrast/s_depth.h index d1ed050efd..484cc73f49 100644 --- a/src/mesa/swrast/s_depth.h +++ b/src/mesa/swrast/s_depth.h @@ -27,7 +27,7 @@ #define S_DEPTH_H -#include "mtypes.h" +#include "main/mtypes.h" #include "s_context.h" diff --git a/src/mesa/swrast/s_drawpix.c b/src/mesa/swrast/s_drawpix.c index cbf6617058..d1120d2cee 100644 --- a/src/mesa/swrast/s_drawpix.c +++ b/src/mesa/swrast/s_drawpix.c @@ -23,13 +23,13 @@ */ -#include "glheader.h" +#include "main/glheader.h" #include "bufferobj.h" -#include "context.h" +#include "main/context.h" #include "convolve.h" #include "image.h" -#include "macros.h" -#include "imports.h" +#include "main/macros.h" +#include "main/imports.h" #include "pixel.h" #include "state.h" diff --git a/src/mesa/swrast/s_drawpix.h b/src/mesa/swrast/s_drawpix.h index 66067115dd..7882a79966 100644 --- a/src/mesa/swrast/s_drawpix.h +++ b/src/mesa/swrast/s_drawpix.h @@ -28,7 +28,7 @@ #define S_DRAWPIXELS_H -#include "mtypes.h" +#include "main/mtypes.h" #include "swrast.h" /* XXX kill this header? */ diff --git a/src/mesa/swrast/s_feedback.c b/src/mesa/swrast/s_feedback.c index 07b7409ab5..31cea8e41f 100644 --- a/src/mesa/swrast/s_feedback.c +++ b/src/mesa/swrast/s_feedback.c @@ -22,12 +22,12 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include "glheader.h" -#include "colormac.h" -#include "context.h" -#include "enums.h" +#include "main/glheader.h" +#include "main/colormac.h" +#include "main/context.h" +#include "main/enums.h" #include "feedback.h" -#include "macros.h" +#include "main/macros.h" #include "s_context.h" #include "s_feedback.h" diff --git a/src/mesa/swrast/s_feedback.h b/src/mesa/swrast/s_feedback.h index 73f45c10be..6484f1dc75 100644 --- a/src/mesa/swrast/s_feedback.h +++ b/src/mesa/swrast/s_feedback.h @@ -28,7 +28,7 @@ #define S_FEEDBACK_H -#include "mtypes.h" +#include "main/mtypes.h" #include "swrast.h" diff --git a/src/mesa/swrast/s_fog.c b/src/mesa/swrast/s_fog.c index 7b143f6e5b..b9ba265db6 100644 --- a/src/mesa/swrast/s_fog.c +++ b/src/mesa/swrast/s_fog.c @@ -23,10 +23,10 @@ */ -#include "glheader.h" -#include "colormac.h" -#include "context.h" -#include "macros.h" +#include "main/glheader.h" +#include "main/colormac.h" +#include "main/context.h" +#include "main/macros.h" #include "s_context.h" #include "s_fog.h" diff --git a/src/mesa/swrast/s_fog.h b/src/mesa/swrast/s_fog.h index 9639bee2cc..2346dd1734 100644 --- a/src/mesa/swrast/s_fog.h +++ b/src/mesa/swrast/s_fog.h @@ -28,7 +28,7 @@ #define S_FOG_H -#include "mtypes.h" +#include "main/mtypes.h" #include "swrast.h" diff --git a/src/mesa/swrast/s_lines.c b/src/mesa/swrast/s_lines.c index 3de438760b..23cb9b57ef 100644 --- a/src/mesa/swrast/s_lines.c +++ b/src/mesa/swrast/s_lines.c @@ -23,10 +23,10 @@ */ -#include "glheader.h" -#include "context.h" -#include "colormac.h" -#include "macros.h" +#include "main/glheader.h" +#include "main/context.h" +#include "main/colormac.h" +#include "main/macros.h" #include "s_aaline.h" #include "s_context.h" #include "s_depth.h" diff --git a/src/mesa/swrast/s_lines.h b/src/mesa/swrast/s_lines.h index 5372b99b91..6c629ca2d4 100644 --- a/src/mesa/swrast/s_lines.h +++ b/src/mesa/swrast/s_lines.h @@ -27,7 +27,7 @@ #ifndef S_LINES_H #define S_LINES_H -#include "mtypes.h" +#include "main/mtypes.h" void _swrast_choose_line( GLcontext *ctx ); diff --git a/src/mesa/swrast/s_logic.c b/src/mesa/swrast/s_logic.c index 0af9063968..f0274b4c0b 100644 --- a/src/mesa/swrast/s_logic.c +++ b/src/mesa/swrast/s_logic.c @@ -23,10 +23,10 @@ */ -#include "glheader.h" -#include "context.h" -#include "imports.h" -#include "macros.h" +#include "main/glheader.h" +#include "main/context.h" +#include "main/imports.h" +#include "main/macros.h" #include "s_context.h" #include "s_logic.h" diff --git a/src/mesa/swrast/s_logic.h b/src/mesa/swrast/s_logic.h index 0bc2c3f8a8..04ef00bb99 100644 --- a/src/mesa/swrast/s_logic.h +++ b/src/mesa/swrast/s_logic.h @@ -27,7 +27,7 @@ #define S_LOGIC_H -#include "mtypes.h" +#include "main/mtypes.h" #include "swrast.h" diff --git a/src/mesa/swrast/s_masking.c b/src/mesa/swrast/s_masking.c index a69720e83a..df779b0739 100644 --- a/src/mesa/swrast/s_masking.c +++ b/src/mesa/swrast/s_masking.c @@ -28,8 +28,8 @@ */ -#include "glheader.h" -#include "macros.h" +#include "main/glheader.h" +#include "main/macros.h" #include "s_context.h" #include "s_masking.h" diff --git a/src/mesa/swrast/s_masking.h b/src/mesa/swrast/s_masking.h index 0596cb3f45..688c07c7ae 100644 --- a/src/mesa/swrast/s_masking.h +++ b/src/mesa/swrast/s_masking.h @@ -27,7 +27,7 @@ #define S_MASKING_H -#include "mtypes.h" +#include "main/mtypes.h" #include "swrast.h" diff --git a/src/mesa/swrast/s_points.c b/src/mesa/swrast/s_points.c index f4b3650210..9f52da980c 100644 --- a/src/mesa/swrast/s_points.c +++ b/src/mesa/swrast/s_points.c @@ -23,10 +23,10 @@ */ -#include "glheader.h" -#include "colormac.h" -#include "context.h" -#include "macros.h" +#include "main/glheader.h" +#include "main/colormac.h" +#include "main/context.h" +#include "main/macros.h" #include "texstate.h" #include "s_context.h" #include "s_feedback.h" diff --git a/src/mesa/swrast/s_points.h b/src/mesa/swrast/s_points.h index 40b442e951..3fda115c0d 100644 --- a/src/mesa/swrast/s_points.h +++ b/src/mesa/swrast/s_points.h @@ -27,7 +27,7 @@ #ifndef S_POINTS_H #define S_POINTS_H -#include "mtypes.h" +#include "main/mtypes.h" extern void _swrast_choose_point( GLcontext *ctx ); diff --git a/src/mesa/swrast/s_readpix.c b/src/mesa/swrast/s_readpix.c index 2f155d0b70..6186f92899 100644 --- a/src/mesa/swrast/s_readpix.c +++ b/src/mesa/swrast/s_readpix.c @@ -23,15 +23,15 @@ */ -#include "glheader.h" +#include "main/glheader.h" #include "bufferobj.h" -#include "colormac.h" +#include "main/colormac.h" #include "convolve.h" -#include "context.h" +#include "main/context.h" #include "feedback.h" #include "image.h" -#include "macros.h" -#include "imports.h" +#include "main/macros.h" +#include "main/imports.h" #include "pixel.h" #include "state.h" diff --git a/src/mesa/swrast/s_span.c b/src/mesa/swrast/s_span.c index d9c1d1bec7..457dc4a6ce 100644 --- a/src/mesa/swrast/s_span.c +++ b/src/mesa/swrast/s_span.c @@ -30,11 +30,11 @@ * \author Brian Paul */ -#include "glheader.h" -#include "colormac.h" -#include "context.h" -#include "macros.h" -#include "imports.h" +#include "main/glheader.h" +#include "main/colormac.h" +#include "main/context.h" +#include "main/macros.h" +#include "main/imports.h" #include "image.h" #include "s_atifragshader.h" diff --git a/src/mesa/swrast/s_span.h b/src/mesa/swrast/s_span.h index 512134db0f..6b814fc8fb 100644 --- a/src/mesa/swrast/s_span.h +++ b/src/mesa/swrast/s_span.h @@ -27,7 +27,7 @@ #define S_SPAN_H -#include "mtypes.h" +#include "main/mtypes.h" #include "swrast.h" diff --git a/src/mesa/swrast/s_spantemp.h b/src/mesa/swrast/s_spantemp.h index 1eef81eb91..bab2ca7378 100644 --- a/src/mesa/swrast/s_spantemp.h +++ b/src/mesa/swrast/s_spantemp.h @@ -43,7 +43,7 @@ * ignored otherwise. */ -#include "macros.h" +#include "main/macros.h" #ifdef CI_MODE diff --git a/src/mesa/swrast/s_stencil.c b/src/mesa/swrast/s_stencil.c index d0cbdd6917..cdb7e4669c 100644 --- a/src/mesa/swrast/s_stencil.c +++ b/src/mesa/swrast/s_stencil.c @@ -23,9 +23,9 @@ */ -#include "glheader.h" -#include "context.h" -#include "imports.h" +#include "main/glheader.h" +#include "main/context.h" +#include "main/imports.h" #include "s_context.h" #include "s_depth.h" diff --git a/src/mesa/swrast/s_stencil.h b/src/mesa/swrast/s_stencil.h index 1fcb538fec..742f8d4c94 100644 --- a/src/mesa/swrast/s_stencil.h +++ b/src/mesa/swrast/s_stencil.h @@ -27,7 +27,7 @@ #define S_STENCIL_H -#include "mtypes.h" +#include "main/mtypes.h" #include "swrast.h" diff --git a/src/mesa/swrast/s_texcombine.c b/src/mesa/swrast/s_texcombine.c index 4c5e22618e..b7724f7b20 100644 --- a/src/mesa/swrast/s_texcombine.c +++ b/src/mesa/swrast/s_texcombine.c @@ -23,11 +23,11 @@ */ -#include "glheader.h" -#include "context.h" -#include "colormac.h" -#include "imports.h" -#include "macros.h" +#include "main/glheader.h" +#include "main/context.h" +#include "main/colormac.h" +#include "main/imports.h" +#include "main/macros.h" #include "image.h" #include "s_context.h" diff --git a/src/mesa/swrast/s_texcombine.h b/src/mesa/swrast/s_texcombine.h index 3bf70e0b86..20cd2bd8ad 100644 --- a/src/mesa/swrast/s_texcombine.h +++ b/src/mesa/swrast/s_texcombine.h @@ -27,7 +27,7 @@ #define S_TEXCOMBINE_H -#include "mtypes.h" +#include "main/mtypes.h" #include "swrast.h" extern void diff --git a/src/mesa/swrast/s_texfilter.c b/src/mesa/swrast/s_texfilter.c index c2a7512388..bb0fc823e7 100644 --- a/src/mesa/swrast/s_texfilter.c +++ b/src/mesa/swrast/s_texfilter.c @@ -23,10 +23,10 @@ */ -#include "glheader.h" -#include "context.h" -#include "colormac.h" -#include "imports.h" +#include "main/glheader.h" +#include "main/context.h" +#include "main/colormac.h" +#include "main/imports.h" #include "texformat.h" #include "s_context.h" diff --git a/src/mesa/swrast/s_texfilter.h b/src/mesa/swrast/s_texfilter.h index e4445e79a0..6267ad17eb 100644 --- a/src/mesa/swrast/s_texfilter.h +++ b/src/mesa/swrast/s_texfilter.h @@ -27,7 +27,7 @@ #define S_TEXFILTER_H -#include "mtypes.h" +#include "main/mtypes.h" #include "swrast.h" diff --git a/src/mesa/swrast/s_texstore.c b/src/mesa/swrast/s_texstore.c index 3f49b40d9c..f5d081d7a3 100644 --- a/src/mesa/swrast/s_texstore.c +++ b/src/mesa/swrast/s_texstore.c @@ -36,13 +36,13 @@ -#include "glheader.h" -#include "imports.h" -#include "colormac.h" -#include "context.h" +#include "main/glheader.h" +#include "main/imports.h" +#include "main/colormac.h" +#include "main/context.h" #include "convolve.h" #include "image.h" -#include "macros.h" +#include "main/macros.h" #include "mipmap.h" #include "texformat.h" #include "teximage.h" diff --git a/src/mesa/swrast/s_triangle.c b/src/mesa/swrast/s_triangle.c index c255545217..00cff6635f 100644 --- a/src/mesa/swrast/s_triangle.c +++ b/src/mesa/swrast/s_triangle.c @@ -29,11 +29,11 @@ * functions to draw triangles. */ -#include "glheader.h" -#include "context.h" -#include "colormac.h" -#include "imports.h" -#include "macros.h" +#include "main/glheader.h" +#include "main/context.h" +#include "main/colormac.h" +#include "main/imports.h" +#include "main/macros.h" #include "texformat.h" #include "s_aatriangle.h" diff --git a/src/mesa/swrast/s_triangle.h b/src/mesa/swrast/s_triangle.h index 0de812500c..c3cadae2d4 100644 --- a/src/mesa/swrast/s_triangle.h +++ b/src/mesa/swrast/s_triangle.h @@ -28,7 +28,7 @@ #define S_TRIANGLES_H -#include "mtypes.h" +#include "main/mtypes.h" #include "swrast.h" diff --git a/src/mesa/swrast/s_zoom.c b/src/mesa/swrast/s_zoom.c index 9f1a4c6f0a..48b4d1e240 100644 --- a/src/mesa/swrast/s_zoom.c +++ b/src/mesa/swrast/s_zoom.c @@ -22,10 +22,10 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include "glheader.h" -#include "macros.h" -#include "imports.h" -#include "colormac.h" +#include "main/glheader.h" +#include "main/macros.h" +#include "main/imports.h" +#include "main/colormac.h" #include "s_context.h" #include "s_span.h" diff --git a/src/mesa/swrast/s_zoom.h b/src/mesa/swrast/s_zoom.h index 6ca11ac211..7701515476 100644 --- a/src/mesa/swrast/s_zoom.h +++ b/src/mesa/swrast/s_zoom.h @@ -25,7 +25,7 @@ #ifndef S_ZOOM_H #define S_ZOOM_H -#include "mtypes.h" +#include "main/mtypes.h" #include "swrast.h" diff --git a/src/mesa/swrast_setup/ss_context.c b/src/mesa/swrast_setup/ss_context.c index a9c7d941e5..fd6935e7be 100644 --- a/src/mesa/swrast_setup/ss_context.c +++ b/src/mesa/swrast_setup/ss_context.c @@ -25,9 +25,9 @@ * Keith Whitwell */ -#include "glheader.h" -#include "imports.h" -#include "colormac.h" +#include "main/glheader.h" +#include "main/imports.h" +#include "main/colormac.h" #include "ss_context.h" #include "ss_triangle.h" #include "swrast_setup.h" diff --git a/src/mesa/swrast_setup/ss_context.h b/src/mesa/swrast_setup/ss_context.h index 11f9ded3ff..1ec293fade 100644 --- a/src/mesa/swrast_setup/ss_context.h +++ b/src/mesa/swrast_setup/ss_context.h @@ -28,7 +28,7 @@ #ifndef SS_CONTEXT_H #define SS_CONTEXT_H -#include "mtypes.h" +#include "main/mtypes.h" #include "swrast/swrast.h" #include "swrast_setup.h" #include "tnl/t_context.h" diff --git a/src/mesa/swrast_setup/ss_triangle.c b/src/mesa/swrast_setup/ss_triangle.c index b4207f2c64..9fef7a52ec 100644 --- a/src/mesa/swrast_setup/ss_triangle.c +++ b/src/mesa/swrast_setup/ss_triangle.c @@ -25,10 +25,10 @@ * Keith Whitwell */ -#include "glheader.h" -#include "colormac.h" -#include "macros.h" -#include "mtypes.h" +#include "main/glheader.h" +#include "main/colormac.h" +#include "main/macros.h" +#include "main/mtypes.h" #include "tnl/t_context.h" diff --git a/src/mesa/swrast_setup/ss_triangle.h b/src/mesa/swrast_setup/ss_triangle.h index 78833269e6..863e744607 100644 --- a/src/mesa/swrast_setup/ss_triangle.h +++ b/src/mesa/swrast_setup/ss_triangle.h @@ -29,7 +29,7 @@ #ifndef SS_TRIANGLE_H #define SS_TRIANGLE_H -#include "mtypes.h" +#include "main/mtypes.h" #include "ss_context.h" diff --git a/src/mesa/swrast_setup/ss_vb.h b/src/mesa/swrast_setup/ss_vb.h index 6ea0cb1a70..2ad1f56f39 100644 --- a/src/mesa/swrast_setup/ss_vb.h +++ b/src/mesa/swrast_setup/ss_vb.h @@ -29,7 +29,7 @@ #ifndef SS_VB_H #define SS_VB_H -#include "mtypes.h" +#include "main/mtypes.h" #include "swrast_setup.h" void _swsetup_vb_init( GLcontext *ctx ); diff --git a/src/mesa/tnl/t_draw.c b/src/mesa/tnl/t_draw.c index 5b2b2ae549..a1a46f6b82 100644 --- a/src/mesa/tnl/t_draw.c +++ b/src/mesa/tnl/t_draw.c @@ -26,13 +26,13 @@ * Keith Whitwell */ -#include "glheader.h" -#include "context.h" -#include "imports.h" +#include "main/glheader.h" +#include "main/context.h" +#include "main/imports.h" #include "state.h" -#include "mtypes.h" -#include "macros.h" -#include "enums.h" +#include "main/mtypes.h" +#include "main/macros.h" +#include "main/enums.h" #include "t_context.h" #include "t_pipeline.h" diff --git a/src/mesa/tnl/t_pipeline.h b/src/mesa/tnl/t_pipeline.h index 0952854b85..d110010f04 100644 --- a/src/mesa/tnl/t_pipeline.h +++ b/src/mesa/tnl/t_pipeline.h @@ -30,7 +30,7 @@ #ifndef _T_PIPELINE_H_ #define _T_PIPELINE_H_ -#include "mtypes.h" +#include "main/mtypes.h" #include "t_context.h" extern void _tnl_run_pipeline( GLcontext *ctx ); diff --git a/src/mesa/tnl/t_rasterpos.c b/src/mesa/tnl/t_rasterpos.c index be963867c0..dfbe0f1806 100644 --- a/src/mesa/tnl/t_rasterpos.c +++ b/src/mesa/tnl/t_rasterpos.c @@ -23,15 +23,15 @@ */ -#include "glheader.h" -#include "colormac.h" -#include "context.h" +#include "main/glheader.h" +#include "main/colormac.h" +#include "main/context.h" #include "feedback.h" #include "light.h" -#include "macros.h" +#include "main/macros.h" #include "rastpos.h" #include "simple_list.h" -#include "mtypes.h" +#include "main/mtypes.h" #include "math/m_matrix.h" #include "tnl/tnl.h" diff --git a/src/mesa/tnl/t_vb_cull.c b/src/mesa/tnl/t_vb_cull.c index 21a32e5b1d..712901acf3 100644 --- a/src/mesa/tnl/t_vb_cull.c +++ b/src/mesa/tnl/t_vb_cull.c @@ -26,12 +26,12 @@ */ -#include "glheader.h" -#include "colormac.h" -#include "context.h" -#include "macros.h" -#include "imports.h" -#include "mtypes.h" +#include "main/glheader.h" +#include "main/colormac.h" +#include "main/context.h" +#include "main/macros.h" +#include "main/imports.h" +#include "main/mtypes.h" #include "math/m_xform.h" diff --git a/src/mesa/tnl/t_vb_fog.c b/src/mesa/tnl/t_vb_fog.c index f6518500d8..00c0979f3f 100644 --- a/src/mesa/tnl/t_vb_fog.c +++ b/src/mesa/tnl/t_vb_fog.c @@ -26,12 +26,12 @@ */ -#include "glheader.h" -#include "colormac.h" -#include "context.h" -#include "macros.h" -#include "imports.h" -#include "mtypes.h" +#include "main/glheader.h" +#include "main/colormac.h" +#include "main/context.h" +#include "main/macros.h" +#include "main/imports.h" +#include "main/mtypes.h" #include "math/m_xform.h" diff --git a/src/mesa/tnl/t_vb_light.c b/src/mesa/tnl/t_vb_light.c index 12f2cc7735..ebd3412d20 100644 --- a/src/mesa/tnl/t_vb_light.c +++ b/src/mesa/tnl/t_vb_light.c @@ -24,13 +24,13 @@ -#include "glheader.h" -#include "colormac.h" +#include "main/glheader.h" +#include "main/colormac.h" #include "light.h" -#include "macros.h" -#include "imports.h" +#include "main/macros.h" +#include "main/imports.h" #include "simple_list.h" -#include "mtypes.h" +#include "main/mtypes.h" #include "math/m_translate.h" diff --git a/src/mesa/tnl/t_vb_normals.c b/src/mesa/tnl/t_vb_normals.c index 01fad0cee2..a4821cc1cc 100644 --- a/src/mesa/tnl/t_vb_normals.c +++ b/src/mesa/tnl/t_vb_normals.c @@ -26,12 +26,12 @@ */ -#include "glheader.h" -#include "colormac.h" -#include "context.h" -#include "macros.h" -#include "imports.h" -#include "mtypes.h" +#include "main/glheader.h" +#include "main/colormac.h" +#include "main/context.h" +#include "main/macros.h" +#include "main/imports.h" +#include "main/mtypes.h" #include "math/m_xform.h" diff --git a/src/mesa/tnl/t_vb_points.c b/src/mesa/tnl/t_vb_points.c index 1ac14fedf9..01d055c1dd 100644 --- a/src/mesa/tnl/t_vb_points.c +++ b/src/mesa/tnl/t_vb_points.c @@ -25,8 +25,8 @@ * Brian Paul */ -#include "mtypes.h" -#include "imports.h" +#include "main/mtypes.h" +#include "main/imports.h" #include "t_context.h" #include "t_pipeline.h" diff --git a/src/mesa/tnl/t_vb_program.c b/src/mesa/tnl/t_vb_program.c index f8e561ac57..c778f5d248 100644 --- a/src/mesa/tnl/t_vb_program.c +++ b/src/mesa/tnl/t_vb_program.c @@ -30,11 +30,11 @@ */ -#include "glheader.h" -#include "colormac.h" -#include "context.h" -#include "macros.h" -#include "imports.h" +#include "main/glheader.h" +#include "main/colormac.h" +#include "main/context.h" +#include "main/macros.h" +#include "main/imports.h" #include "shader/prog_instruction.h" #include "shader/prog_statevars.h" #include "shader/prog_execute.h" diff --git a/src/mesa/tnl/t_vb_render.c b/src/mesa/tnl/t_vb_render.c index c38f0745e1..c1bebc9942 100644 --- a/src/mesa/tnl/t_vb_render.c +++ b/src/mesa/tnl/t_vb_render.c @@ -38,12 +38,12 @@ */ -#include "glheader.h" -#include "context.h" -#include "enums.h" -#include "macros.h" -#include "imports.h" -#include "mtypes.h" +#include "main/glheader.h" +#include "main/context.h" +#include "main/enums.h" +#include "main/macros.h" +#include "main/imports.h" +#include "main/mtypes.h" #include "t_pipeline.h" diff --git a/src/mesa/tnl/t_vb_texgen.c b/src/mesa/tnl/t_vb_texgen.c index e98ab743c5..14d3876e54 100644 --- a/src/mesa/tnl/t_vb_texgen.c +++ b/src/mesa/tnl/t_vb_texgen.c @@ -35,12 +35,12 @@ * including any use thereof or modifications thereto. */ -#include "glheader.h" -#include "colormac.h" -#include "context.h" -#include "macros.h" -#include "imports.h" -#include "mtypes.h" +#include "main/glheader.h" +#include "main/colormac.h" +#include "main/context.h" +#include "main/macros.h" +#include "main/imports.h" +#include "main/mtypes.h" #include "math/m_xform.h" diff --git a/src/mesa/tnl/t_vb_texmat.c b/src/mesa/tnl/t_vb_texmat.c index 674d36f8cb..0abe8cc35d 100644 --- a/src/mesa/tnl/t_vb_texmat.c +++ b/src/mesa/tnl/t_vb_texmat.c @@ -26,12 +26,12 @@ */ -#include "glheader.h" -#include "colormac.h" -#include "context.h" -#include "macros.h" -#include "imports.h" -#include "mtypes.h" +#include "main/glheader.h" +#include "main/colormac.h" +#include "main/context.h" +#include "main/macros.h" +#include "main/imports.h" +#include "main/mtypes.h" #include "math/m_xform.h" diff --git a/src/mesa/tnl/t_vb_vertex.c b/src/mesa/tnl/t_vb_vertex.c index 276305b5e6..30aa7c4086 100644 --- a/src/mesa/tnl/t_vb_vertex.c +++ b/src/mesa/tnl/t_vb_vertex.c @@ -26,12 +26,12 @@ */ -#include "glheader.h" -#include "colormac.h" -#include "context.h" -#include "macros.h" -#include "imports.h" -#include "mtypes.h" +#include "main/glheader.h" +#include "main/colormac.h" +#include "main/context.h" +#include "main/macros.h" +#include "main/imports.h" +#include "main/mtypes.h" #include "math/m_xform.h" diff --git a/src/mesa/tnl/t_vertex.c b/src/mesa/tnl/t_vertex.c index a6728c318f..b661524c87 100644 --- a/src/mesa/tnl/t_vertex.c +++ b/src/mesa/tnl/t_vertex.c @@ -25,9 +25,9 @@ * Keith Whitwell */ -#include "glheader.h" -#include "context.h" -#include "colormac.h" +#include "main/glheader.h" +#include "main/context.h" +#include "main/colormac.h" #include "t_context.h" #include "t_vertex.h" diff --git a/src/mesa/tnl/t_vertex.h b/src/mesa/tnl/t_vertex.h index fda8f151d3..712311a146 100644 --- a/src/mesa/tnl/t_vertex.h +++ b/src/mesa/tnl/t_vertex.h @@ -28,7 +28,7 @@ #ifndef _TNL_VERTEX_H #define _TNL_VERTEX_H -#include "mtypes.h" +#include "main/mtypes.h" #include "t_context.h" /* New mechanism to specify hardware vertices so that tnl can build diff --git a/src/mesa/tnl/t_vertex_generic.c b/src/mesa/tnl/t_vertex_generic.c index 236a5bedc8..c399423b9e 100644 --- a/src/mesa/tnl/t_vertex_generic.c +++ b/src/mesa/tnl/t_vertex_generic.c @@ -26,9 +26,9 @@ * Keith Whitwell */ -#include "glheader.h" -#include "context.h" -#include "colormac.h" +#include "main/glheader.h" +#include "main/context.h" +#include "main/colormac.h" #include "t_context.h" #include "t_vertex.h" #include "simple_list.h" diff --git a/src/mesa/tnl/t_vertex_sse.c b/src/mesa/tnl/t_vertex_sse.c index a180441a5a..96def25206 100644 --- a/src/mesa/tnl/t_vertex_sse.c +++ b/src/mesa/tnl/t_vertex_sse.c @@ -25,13 +25,13 @@ * Keith Whitwell */ -#include "glheader.h" -#include "context.h" -#include "colormac.h" +#include "main/glheader.h" +#include "main/context.h" +#include "main/colormac.h" #include "t_context.h" #include "t_vertex.h" #include "simple_list.h" -#include "enums.h" +#include "main/enums.h" #if defined(USE_SSE_ASM) diff --git a/src/mesa/tnl/t_vp_build.c b/src/mesa/tnl/t_vp_build.c index 249bccb443..b3b63cd3e4 100644 --- a/src/mesa/tnl/t_vp_build.c +++ b/src/mesa/tnl/t_vp_build.c @@ -30,7 +30,7 @@ */ -#include "glheader.h" +#include "main/glheader.h" #include "main/ffvertex_prog.h" #include "t_vp_build.h" diff --git a/src/mesa/tnl/t_vp_build.h b/src/mesa/tnl/t_vp_build.h index efe12e41a4..d6ebc66c04 100644 --- a/src/mesa/tnl/t_vp_build.h +++ b/src/mesa/tnl/t_vp_build.h @@ -27,7 +27,7 @@ #ifndef T_VP_BUILD_H #define T_VP_BUILD_H -#include "mtypes.h" +#include "main/mtypes.h" #define TNL_FIXED_FUNCTION_STATE_FLAGS (_NEW_PROGRAM | \ _NEW_LIGHT | \ diff --git a/src/mesa/vf/vf.c b/src/mesa/vf/vf.c index cb25f2e113..82f3d2b641 100644 --- a/src/mesa/vf/vf.c +++ b/src/mesa/vf/vf.c @@ -25,9 +25,9 @@ * Keith Whitwell */ -#include "glheader.h" -#include "context.h" -#include "colormac.h" +#include "main/glheader.h" +#include "main/context.h" +#include "main/colormac.h" #include "vf.h" diff --git a/src/mesa/vf/vf_generic.c b/src/mesa/vf/vf_generic.c index 68d8d0897b..baa00af29a 100644 --- a/src/mesa/vf/vf_generic.c +++ b/src/mesa/vf/vf_generic.c @@ -26,10 +26,10 @@ * Keith Whitwell */ -#include "glheader.h" -#include "context.h" -#include "colormac.h" -#include "simple_list.h" +#include "main/glheader.h" +#include "main/context.h" +#include "main/colormac.h" +#include "main/simple_list.h" #include "vf/vf.h" diff --git a/src/mesa/vf/vf_sse.c b/src/mesa/vf/vf_sse.c index c3a2166578..4d70196ffe 100644 --- a/src/mesa/vf/vf_sse.c +++ b/src/mesa/vf/vf_sse.c @@ -25,10 +25,10 @@ * Keith Whitwell */ -#include "glheader.h" -#include "colormac.h" -#include "simple_list.h" -#include "enums.h" +#include "main/glheader.h" +#include "main/colormac.h" +#include "main/simple_list.h" +#include "main/enums.h" #include "vf/vf.h" diff --git a/src/mesa/x86-64/x86-64.c b/src/mesa/x86-64/x86-64.c index dee09fd648..9ec43c841d 100644 --- a/src/mesa/x86-64/x86-64.c +++ b/src/mesa/x86-64/x86-64.c @@ -30,8 +30,8 @@ #ifdef USE_X86_64_ASM -#include "glheader.h" -#include "context.h" +#include "main/glheader.h" +#include "main/context.h" #include "math/m_xform.h" #include "tnl/t_context.h" #include "x86-64.h" diff --git a/src/mesa/x86/3dnow.c b/src/mesa/x86/3dnow.c index 4122ee4b00..c037a61761 100644 --- a/src/mesa/x86/3dnow.c +++ b/src/mesa/x86/3dnow.c @@ -28,8 +28,8 @@ * Holger Waechtler */ -#include "glheader.h" -#include "context.h" +#include "main/glheader.h" +#include "main/context.h" #include "math/m_xform.h" #include "tnl/t_context.h" diff --git a/src/mesa/x86/common_x86.c b/src/mesa/x86/common_x86.c index 0caa36a5a0..dc80d26fa9 100644 --- a/src/mesa/x86/common_x86.c +++ b/src/mesa/x86/common_x86.c @@ -49,7 +49,7 @@ #endif #include "common_x86_asm.h" -#include "imports.h" +#include "main/imports.h" int _mesa_x86_cpu_features = 0; diff --git a/src/mesa/x86/rtasm/x86sse.c b/src/mesa/x86/rtasm/x86sse.c index 7a91364ed8..5c4bab7331 100644 --- a/src/mesa/x86/rtasm/x86sse.c +++ b/src/mesa/x86/rtasm/x86sse.c @@ -1,7 +1,7 @@ #ifdef USE_X86_ASM #if defined(__i386__) || defined(__386__) -#include "imports.h" +#include "main/imports.h" #include "x86sse.h" #define DISASSEM 0 diff --git a/src/mesa/x86/sse.c b/src/mesa/x86/sse.c index 4b016a1e85..1c185387c6 100644 --- a/src/mesa/x86/sse.c +++ b/src/mesa/x86/sse.c @@ -27,8 +27,8 @@ * Andre Werthmann */ -#include "glheader.h" -#include "context.h" +#include "main/glheader.h" +#include "main/context.h" #include "math/m_xform.h" #include "tnl/t_context.h" diff --git a/src/mesa/x86/x86.c b/src/mesa/x86/x86.c index 82caa42dbd..ce649f66b0 100644 --- a/src/mesa/x86/x86.c +++ b/src/mesa/x86/x86.c @@ -27,8 +27,8 @@ * Intel x86 assembly code by Josh Vanderhoof */ -#include "glheader.h" -#include "context.h" +#include "main/glheader.h" +#include "main/context.h" #include "math/m_xform.h" #include "tnl/t_context.h" -- cgit v1.2.3