diff options
author | Kenneth Graunke <[email protected]> | 2011-04-12 15:21:21 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2011-04-12 15:21:21 -0700 |
commit | 3f7318c1b8d2ad4f4aef66362cdb7b9e8dc89eac (patch) | |
tree | b3b91e9eb0ecd322207a1fc5a4f770d60ad6bf4e /src | |
parent | 35b3f597bd1729da4483857cc0e88e81fb2a2419 (diff) |
i965: Add comments about URB size units and limits.
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Acked-by: Chris Wilson <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_context.h | 8 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vs_emit.c | 6 |
2 files changed, 10 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h index ab0c78ff8f8..f3312360213 100644 --- a/src/mesa/drivers/dri/i965/brw_context.h +++ b/src/mesa/drivers/dri/i965/brw_context.h @@ -555,12 +555,12 @@ struct brw_context GLuint nr_sf_entries; GLuint nr_cs_entries; - /* gen6 */ + /* gen6: + * The length of each URB entry owned by the VS (or GS), as + * a number of 1024-bit (128-byte) rows. Should be >= 1. + */ GLuint vs_size; /* GLuint gs_size; */ -/* GLuint clip_size; */ -/* GLuint sf_size; */ -/* GLuint cs_size; */ GLuint vs_start; GLuint gs_start; diff --git a/src/mesa/drivers/dri/i965/brw_vs_emit.c b/src/mesa/drivers/dri/i965/brw_vs_emit.c index acacf374b75..96150ecc377 100644 --- a/src/mesa/drivers/dri/i965/brw_vs_emit.c +++ b/src/mesa/drivers/dri/i965/brw_vs_emit.c @@ -437,8 +437,14 @@ static void brw_vs_alloc_regs( struct brw_vs_compile *c ) if (c->key.nr_userclip) header_regs += 2; + /* Each attribute is 16 bytes (1 vec4), so dividing by 8 gives us the + * number of 128-byte (1024-bit) units. + */ c->prog_data.urb_entry_size = (attributes_in_vue + header_regs + 7) / 8; } else if (intel->gen == 5) + /* Each attribute is 16 bytes (1 vec4), so dividing by 4 gives us the + * number of 64-byte (512-bit) units. + */ c->prog_data.urb_entry_size = (attributes_in_vue + 6 + 3) / 4; else c->prog_data.urb_entry_size = (attributes_in_vue + 2 + 3) / 4; |