Enable codegen based whenever __i386__ is defined.
This commit is contained in:
@@ -64,13 +64,11 @@ compute_clipmask(float cx, float cy, float cz, float cw)
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(USE_X86_ASM) || defined(SLANG_X86)
|
typedef void (XSTDCALL *codegen_function) (
|
||||||
typedef void (XSTDCALL *sse2_function)(
|
|
||||||
const struct tgsi_exec_vector *input,
|
const struct tgsi_exec_vector *input,
|
||||||
struct tgsi_exec_vector *output,
|
struct tgsi_exec_vector *output,
|
||||||
float (*constant)[4],
|
float (*constant)[4],
|
||||||
struct tgsi_exec_vector *temporary );
|
struct tgsi_exec_vector *temporary );
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Transform vertices with the current vertex program/shader
|
* Transform vertices with the current vertex program/shader
|
||||||
@@ -117,16 +115,12 @@ run_vertex_program(struct draw_context *draw,
|
|||||||
|
|
||||||
/* run shader */
|
/* run shader */
|
||||||
if( draw->vertex_shader.executable != NULL ) {
|
if( draw->vertex_shader.executable != NULL ) {
|
||||||
#if defined(USE_X86_ASM) || defined(SLANG_X86)
|
codegen_function func = (codegen_function) draw->vertex_shader.executable;
|
||||||
sse2_function func = (sse2_function) draw->vertex_shader.executable;
|
|
||||||
func(
|
func(
|
||||||
machine.Inputs,
|
machine.Inputs,
|
||||||
machine.Outputs,
|
machine.Outputs,
|
||||||
machine.Consts,
|
machine.Consts,
|
||||||
machine.Temps );
|
machine.Temps );
|
||||||
#else
|
|
||||||
assert( 0 );
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
tgsi_exec_machine_run( &machine );
|
tgsi_exec_machine_run( &machine );
|
||||||
|
@@ -64,14 +64,12 @@ quad_shade_stage(struct quad_stage *qs)
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(USE_X86_ASM) || defined(SLANG_X86)
|
typedef void (XSTDCALL *codegen_function)(
|
||||||
typedef void (XSTDCALL *sse2_function)(
|
|
||||||
const struct tgsi_exec_vector *input,
|
const struct tgsi_exec_vector *input,
|
||||||
struct tgsi_exec_vector *output,
|
struct tgsi_exec_vector *output,
|
||||||
float (*constant)[4],
|
float (*constant)[4],
|
||||||
struct tgsi_exec_vector *temporary,
|
struct tgsi_exec_vector *temporary,
|
||||||
const struct tgsi_interp_coef *coef );
|
const struct tgsi_interp_coef *coef );
|
||||||
#endif
|
|
||||||
|
|
||||||
/* This should be done by the fragment shader execution unit (code
|
/* This should be done by the fragment shader execution unit (code
|
||||||
* generated from the decl instructions). Do it here for now.
|
* generated from the decl instructions). Do it here for now.
|
||||||
@@ -121,17 +119,13 @@ shade_quad(
|
|||||||
|
|
||||||
/* run shader */
|
/* run shader */
|
||||||
if( softpipe->fs->executable != NULL ) {
|
if( softpipe->fs->executable != NULL ) {
|
||||||
#if defined(USE_X86_ASM) || defined(SLANG_X86)
|
codegen_function func = (codegen_function) softpipe->fs->executable;
|
||||||
sse2_function func = (sse2_function) softpipe->fs->executable;
|
|
||||||
func(
|
func(
|
||||||
machine.Inputs,
|
machine.Inputs,
|
||||||
machine.Outputs,
|
machine.Outputs,
|
||||||
machine.Consts,
|
machine.Consts,
|
||||||
machine.Temps,
|
machine.Temps,
|
||||||
machine.InterpCoefs );
|
machine.InterpCoefs );
|
||||||
#else
|
|
||||||
assert( 0 );
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
tgsi_exec_machine_run( &machine );
|
tgsi_exec_machine_run( &machine );
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
#include "tgsi_core.h"
|
#include "tgsi_core.h"
|
||||||
#include "x86/rtasm/x86sse.h"
|
#include "x86/rtasm/x86sse.h"
|
||||||
|
|
||||||
#if defined(USE_X86_ASM) || defined(SLANG_X86)
|
#if defined(__i386__) || defined(__386__)
|
||||||
|
|
||||||
#define FOR_EACH_CHANNEL( CHAN )\
|
#define FOR_EACH_CHANNEL( CHAN )\
|
||||||
for( CHAN = 0; CHAN < 4; CHAN++ )
|
for( CHAN = 0; CHAN < 4; CHAN++ )
|
||||||
|
@@ -86,7 +86,7 @@ static struct gl_program *st_new_program( GLcontext *ctx,
|
|||||||
|
|
||||||
prog->serialNo = 1;
|
prog->serialNo = 1;
|
||||||
|
|
||||||
#if defined(USE_X86_ASM) || defined(SLANG_X86)
|
#if defined(__i386__) || defined(__386__)
|
||||||
x86_init_func( &prog->sse2_program );
|
x86_init_func( &prog->sse2_program );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -102,7 +102,7 @@ static struct gl_program *st_new_program( GLcontext *ctx,
|
|||||||
|
|
||||||
prog->serialNo = 1;
|
prog->serialNo = 1;
|
||||||
|
|
||||||
#if defined(USE_X86_ASM) || defined(SLANG_X86)
|
#if defined(__i386__) || defined(__386__)
|
||||||
x86_init_func( &prog->sse2_program );
|
x86_init_func( &prog->sse2_program );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -129,7 +129,7 @@ static void st_delete_program( GLcontext *ctx,
|
|||||||
case GL_VERTEX_PROGRAM_ARB:
|
case GL_VERTEX_PROGRAM_ARB:
|
||||||
{
|
{
|
||||||
struct st_vertex_program *stvp = (struct st_vertex_program *) prog;
|
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 );
|
x86_release_func( &stvp->sse2_program );
|
||||||
#endif
|
#endif
|
||||||
st_remove_vertex_program(st, stvp);
|
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 *stfp
|
||||||
= (struct st_fragment_program *) prog;
|
= (struct st_fragment_program *) prog;
|
||||||
#if defined(USE_X86_ASM) || defined(SLANG_X86)
|
#if defined(__i386__) || defined(__386__)
|
||||||
x86_release_func( &stfp->sse2_program );
|
x86_release_func( &stfp->sse2_program );
|
||||||
#endif
|
#endif
|
||||||
st_remove_fragment_program(st, stfp);
|
st_remove_fragment_program(st, stfp);
|
||||||
|
@@ -253,7 +253,7 @@ st_translate_vertex_program(struct st_context *st,
|
|||||||
if (TGSI_DEBUG)
|
if (TGSI_DEBUG)
|
||||||
tgsi_dump( tokensOut, 0 );
|
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)
|
if (stvp->sse2_program.csr == stvp->sse2_program.store)
|
||||||
tgsi_emit_sse2( tokensOut, &stvp->sse2_program );
|
tgsi_emit_sse2( tokensOut, &stvp->sse2_program );
|
||||||
|
|
||||||
@@ -398,7 +398,7 @@ st_translate_fragment_program(struct st_context *st,
|
|||||||
if (TGSI_DEBUG)
|
if (TGSI_DEBUG)
|
||||||
tgsi_dump( tokensOut, 0/*TGSI_DUMP_VERBOSE*/ );
|
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)
|
if (stfp->sse2_program.csr == stfp->sse2_program.store)
|
||||||
tgsi_emit_sse2_fs( tokensOut, &stfp->sse2_program );
|
tgsi_emit_sse2_fs( tokensOut, &stfp->sse2_program );
|
||||||
|
|
||||||
|
@@ -53,7 +53,7 @@ struct st_fragment_program
|
|||||||
/** The program in TGSI format */
|
/** The program in TGSI format */
|
||||||
struct tgsi_token tokens[ST_FP_MAX_TOKENS];
|
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;
|
struct x86_function sse2_program;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -79,7 +79,7 @@ struct st_vertex_program
|
|||||||
/** The program in TGSI format */
|
/** The program in TGSI format */
|
||||||
struct tgsi_token tokens[ST_FP_MAX_TOKENS];
|
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;
|
struct x86_function sse2_program;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
#if defined(USE_X86_ASM) || defined(SLANG_X86)
|
#if defined(__i386__) || defined(__386__)
|
||||||
|
|
||||||
#include "imports.h"
|
#include "imports.h"
|
||||||
#include "x86sse.h"
|
#include "x86sse.h"
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
#ifndef _X86SSE_H_
|
#ifndef _X86SSE_H_
|
||||||
#define _X86SSE_H_
|
#define _X86SSE_H_
|
||||||
|
|
||||||
#if defined(USE_X86_ASM) || defined(SLANG_X86)
|
#if defined(__i386__) || defined(__386__)
|
||||||
|
|
||||||
#include "glheader.h"
|
#include "glheader.h"
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user