mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 13:58:04 +02:00
r300/compiler: allow 1024 instructions in r5xx vertex shaders
This commit is contained in:
parent
dd90c3040e
commit
a20fa67448
3 changed files with 12 additions and 9 deletions
|
|
@ -349,7 +349,8 @@ static void translate_vertex_program(struct r300_vertex_program_compiler * compi
|
|||
if (!valid_dst(compiler->code, &vpi->DstReg))
|
||||
continue;
|
||||
|
||||
if (compiler->code->length >= VSF_MAX_FRAGMENT_LENGTH) {
|
||||
if (compiler->code->length >= R500_VS_MAX_ALU_DWORDS ||
|
||||
(compiler->code->length >= R300_VS_MAX_ALU_DWORDS && !compiler->Base.is_r500)) {
|
||||
rc_error(&compiler->Base, "Vertex program has too many instructions\n");
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -235,7 +235,10 @@ struct rX00_fragment_program_code {
|
|||
};
|
||||
|
||||
|
||||
#define VSF_MAX_FRAGMENT_LENGTH (255*4)
|
||||
#define R300_VS_MAX_ALU 256
|
||||
#define R300_VS_MAX_ALU_DWORDS (R300_VS_MAX_ALU * 4)
|
||||
#define R500_VS_MAX_ALU 1024
|
||||
#define R500_VS_MAX_ALU_DWORDS (R500_VS_MAX_ALU * 4)
|
||||
#define R300_VS_MAX_TEMPS 32
|
||||
|
||||
#define VSF_MAX_INPUTS 32
|
||||
|
|
@ -244,8 +247,8 @@ struct rX00_fragment_program_code {
|
|||
struct r300_vertex_program_code {
|
||||
int length;
|
||||
union {
|
||||
uint32_t d[VSF_MAX_FRAGMENT_LENGTH];
|
||||
float f[VSF_MAX_FRAGMENT_LENGTH];
|
||||
uint32_t d[R500_VS_MAX_ALU_DWORDS];
|
||||
float f[R500_VS_MAX_ALU_DWORDS];
|
||||
} body;
|
||||
|
||||
int pos_end;
|
||||
|
|
|
|||
|
|
@ -376,13 +376,12 @@ static void r300InitConstValues(GLcontext *ctx, radeonScreenPtr screen)
|
|||
ctx->Const.MaxDrawBuffers = 1;
|
||||
ctx->Const.MaxColorAttachments = 1;
|
||||
|
||||
/* currently bogus data */
|
||||
if (r300->options.hw_tcl_enabled) {
|
||||
ctx->Const.VertexProgram.MaxNativeInstructions = VSF_MAX_FRAGMENT_LENGTH / 4;
|
||||
ctx->Const.VertexProgram.MaxNativeAluInstructions = VSF_MAX_FRAGMENT_LENGTH / 4;
|
||||
ctx->Const.VertexProgram.MaxNativeAttribs = 16; /* r420 */
|
||||
ctx->Const.VertexProgram.MaxNativeInstructions = 255;
|
||||
ctx->Const.VertexProgram.MaxNativeAluInstructions = 255;
|
||||
ctx->Const.VertexProgram.MaxNativeAttribs = 16;
|
||||
ctx->Const.VertexProgram.MaxNativeTemps = 32;
|
||||
ctx->Const.VertexProgram.MaxNativeParameters = 256; /* r420 */
|
||||
ctx->Const.VertexProgram.MaxNativeParameters = 256;
|
||||
ctx->Const.VertexProgram.MaxNativeAddressRegs = 1;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue