X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fdrivers%2Fllvmpipe%2Flp_limits.h;h=5294ced3c4f64f6b48c29a20a6328b5b0eda4260;hb=013ff2fae13da41c2f5619c4698b0a7b5aa6a06d;hp=75be000f2feabf2898377ead14140b849daf7f25;hpb=2de31f2bf2b9c68aaa76a63fa0d0d3e0731ccfb5;p=mesa.git diff --git a/src/gallium/drivers/llvmpipe/lp_limits.h b/src/gallium/drivers/llvmpipe/lp_limits.h index 75be000f2fe..5294ced3c4f 100644 --- a/src/gallium/drivers/llvmpipe/lp_limits.h +++ b/src/gallium/drivers/llvmpipe/lp_limits.h @@ -43,8 +43,11 @@ /** * Max texture sizes */ -#define LP_MAX_TEXTURE_2D_LEVELS 12 /* 2K x 2K for now */ -#define LP_MAX_TEXTURE_3D_LEVELS 10 /* 512 x 512 x 512 for now */ +#define LP_MAX_TEXTURE_SIZE (1 * 1024 * 1024 * 1024ULL) /* 1GB for now */ +#define LP_MAX_TEXTURE_2D_LEVELS 14 /* 8K x 8K for now */ +#define LP_MAX_TEXTURE_3D_LEVELS 12 /* 2K x 2K x 2K for now */ +#define LP_MAX_TEXTURE_CUBE_LEVELS 14 /* 8K x 8K for now */ +#define LP_MAX_TEXTURE_ARRAY_LAYERS 512 /* 8K x 512 / 8K x 8K x 512 */ /** This must be the larger of LP_MAX_TEXTURE_2D/3D_LEVELS */ @@ -54,8 +57,40 @@ /** * Max drawing surface size is the max texture size */ -#define MAXHEIGHT (1 << (LP_MAX_TEXTURE_LEVELS - 1)) -#define MAXWIDTH (1 << (LP_MAX_TEXTURE_LEVELS - 1)) +#define LP_MAX_HEIGHT (1 << (LP_MAX_TEXTURE_LEVELS - 1)) +#define LP_MAX_WIDTH (1 << (LP_MAX_TEXTURE_LEVELS - 1)) +#define LP_MAX_THREADS 16 + + +/** + * Max bytes per scene. This may be replaced by a runtime parameter. + */ +#define LP_MAX_SCENE_SIZE (512 * 1024 * 1024) + +/** + * Max number of shader variants (for all shaders combined, + * per context) that will be kept around. + */ +#define LP_MAX_SHADER_VARIANTS 1024 + +/** + * Max number of instructions (for all fragment shaders combined per context) + * that will be kept around (counted in terms of llvm ir). + * Note: the definition looks odd, but there's branches which use a different + * number of max shader variants. + */ +#define LP_MAX_SHADER_INSTRUCTIONS MAX2(256*1024, 512*LP_MAX_SHADER_VARIANTS) + +/** + * Max number of setup variants that will be kept around. + * + * These are determined by the combination of the fragment shader + * input signature and a small amount of rasterization state (eg + * flatshading). It is likely that many active fragment shaders will + * share the same setup variant. + */ +#define LP_MAX_SETUP_VARIANTS 64 + #endif /* LP_LIMITS_H */