OSDN Git Service

i965: old VS: use the VUE map to compute the URB entry size.
authorPaul Berry <stereotype441@gmail.com>
Tue, 23 Aug 2011 05:09:02 +0000 (22:09 -0700)
committerPaul Berry <stereotype441@gmail.com>
Tue, 6 Sep 2011 18:04:01 +0000 (11:04 -0700)
commit85e57eb9cada5c97d49e11295e23cc6e472b3130
tree2d741d828d8668dc0e101e72cc52acac980401b7
parent3c17efd14888e453d1a15d92e97c99f2a278e213
i965: old VS: use the VUE map to compute the URB entry size.

Previously, the old VS backend computed the URB entry size by adding
the number of vertex shader outputs to the size of the URB header.
This often produced a larger result than necessary, because some
vertex shader outputs are stored in the header, so they were being
double counted.  This patch changes the old VS backend to compute the
URB entry size directly from the number of slots in the VUE map.

Note: there's a subtle change in that we no longer count header
registers towards the size of the VF input.  I believe this is
correct, because the header is only emitted in the output of the VS
stage--it is not present in the input.  (As evidence for this, note
that brw_vs_state.c sets urb_entry_read_offset to 0--it does not
include space for the header as part of the VS input).

Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/drivers/dri/i965/brw_vs.h
src/mesa/drivers/dri/i965/brw_vs_emit.c