mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 20:38:06 +02:00
limit max program/param length to 255 (spotted by sroland)
This commit is contained in:
parent
8a97946e0a
commit
34ba50522a
2 changed files with 3 additions and 1 deletions
|
|
@ -549,7 +549,8 @@ struct r300_vap_reg_state {
|
|||
/* Vertex shader state */
|
||||
|
||||
/* Perhaps more if we store programs in vmem? */
|
||||
#define VSF_MAX_FRAGMENT_LENGTH (256*4)
|
||||
/* drm_r300_cmd_header_t->vpu->count is unsigned char */
|
||||
#define VSF_MAX_FRAGMENT_LENGTH (255*4)
|
||||
|
||||
/* Can be tested with colormat currently. */
|
||||
#define VSF_MAX_FRAGMENT_TEMPS (14)
|
||||
|
|
|
|||
|
|
@ -1403,6 +1403,7 @@ void r300_setup_rs_unit(GLcontext *ctx)
|
|||
#define bump_vpu_count(ptr, new_count) do{\
|
||||
drm_r300_cmd_header_t* _p=((drm_r300_cmd_header_t*)(ptr));\
|
||||
int _nc=(new_count)/4; \
|
||||
assert(_nc < 256); \
|
||||
if(_nc>_p->vpu.count)_p->vpu.count=_nc;\
|
||||
}while(0)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue