diff options
Diffstat (limited to 'src/mesa/pipe/llvm/llvm_entry.c')
-rw-r--r-- | src/mesa/pipe/llvm/llvm_entry.c | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/src/mesa/pipe/llvm/llvm_entry.c b/src/mesa/pipe/llvm/llvm_entry.c index 03f7ac8..909bef3 100644 --- a/src/mesa/pipe/llvm/llvm_entry.c +++ b/src/mesa/pipe/llvm/llvm_entry.c @@ -68,6 +68,7 @@ compute_clipmask(float4 clip, float4 (*plane), unsigned nr) return mask; } + inline void collect_results(float4 *results, struct vertex_header *vOut, float4 *planes, int nr_planes, float4 scale, float4 trans, @@ -76,7 +77,6 @@ inline void collect_results(float4 *results, struct vertex_header *vOut, /* store results */ unsigned slot; float x, y, z, w; - /* Handle attr[0] (position) specially: */ float4 res0 = results[0]; @@ -85,7 +85,6 @@ inline void collect_results(float4 *results, struct vertex_header *vOut, y = clip[1] = res0.y; z = clip[2] = res0.z; w = clip[3] = res0.w; - vOut->clipmask = compute_clipmask(res0, planes, nr_planes); vOut->edgeflag = 1; @@ -176,23 +175,20 @@ struct ShaderInput extern void execute_shader(struct ShaderInput *input); -void run_vertex_shader(float (*ainputs)[16][4], - float (*dests)[16][4], +void run_vertex_shader(float4 (*inputs)[16], + float4 (*results)[16], float (*aconsts)[4], int num_vertices, int num_inputs, int num_attribs, int num_consts) { - float4 inputs[16*32*4][16]; float4 consts[32]; - float4 results[16*32*4][16]; float4 temps[128];//MAX_PROGRAM_TEMPS struct ShaderInput args; /*printf("XXX LLVM run_vertex_shader vertices = %d, inputs = %d, attribs = %d, consts = %d\n", num_vertices, num_inputs, num_attribs, num_consts);*/ - from_array(inputs, ainputs, num_vertices, num_inputs); from_consts(consts, aconsts, num_consts); args.consts = consts; args.temps = temps; @@ -200,7 +196,6 @@ void run_vertex_shader(float (*ainputs)[16][4], args.dests = results[i]; args.inputs = inputs[i]; execute_shader(&args); - to_array(dests[i], args.dests, num_attribs); } } @@ -227,22 +222,19 @@ struct tgsi_sampler int run_fragment_shader(float x, float y, - float (*dests)[16][4], - float (*ainputs)[16][4], + float4 (*results)[16], + float4 (*inputs)[16], int num_inputs, float (*aconsts)[4], int num_consts, struct tgsi_sampler *samplers) { - float4 inputs[4][16]; float4 consts[32]; - float4 results[4][16]; float4 temps[128];//MAX_PROGRAM_TEMPS struct ShaderInput args; int mask = 0; args.kilmask = 0; - from_array(inputs, ainputs, 4, num_inputs); from_consts(consts, aconsts, num_consts); args.consts = consts; args.temps = temps; @@ -254,8 +246,6 @@ int run_fragment_shader(float x, float y, args.kilmask = 0; execute_shader(&args); args.kilmask = mask | (args.kilmask << i); - - to_array(dests[i], args.dests, 2); } return ~args.kilmask; } |