mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 09:38:07 +02:00
i965: Add functions to compute offsets within the VUE map.
Some parts of the i965 driver keep track of locations within the VUE (vertex URB entry) using byte offsets. This patch adds inline functions to compute these byte offsets using the VUE map. Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
parent
45f1d7a666
commit
7bb2dbfc97
1 changed files with 18 additions and 0 deletions
|
|
@ -334,6 +334,24 @@ struct brw_vue_map {
|
|||
int num_slots;
|
||||
};
|
||||
|
||||
/**
|
||||
* Convert a VUE slot number into a byte offset within the VUE.
|
||||
*/
|
||||
static inline GLuint brw_vue_slot_to_offset(GLuint slot)
|
||||
{
|
||||
return 16*slot;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert a vert_result into a byte offset within the VUE.
|
||||
*/
|
||||
static inline GLuint brw_vert_result_to_offset(struct brw_vue_map *vue_map,
|
||||
GLuint vert_result)
|
||||
{
|
||||
return brw_vue_slot_to_offset(vue_map->vert_result_to_slot[vert_result]);
|
||||
}
|
||||
|
||||
|
||||
struct brw_sf_prog_data {
|
||||
GLuint urb_read_length;
|
||||
GLuint total_grf;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue