[Mesa-dev] [PATCH 06/14] i965: Add brw_scalar_prog_data structure

Kenneth Graunke kenneth at whitecape.org
Tue Sep 2 11:44:30 PDT 2014


On Monday, September 01, 2014 09:44:30 AM Jordan Justen wrote:
> All fields were migrated from brw_wm_prog_data. In future updates, we can move
> these FS specific fields back into brw_wm_prog_data.
> 
> The scalar_visitor and scalar_generator class mainly use these structures now.
> 
> Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>

I don't like this change.

num_varying_inputs, binding_table/render_target_start, dual_src_blend, uses_pos_offset, uses_omask, barycentric_interp_modes, and urb_setup are all FS specific.  reg_blocks/reg_blocks_16 is only interesting pre-SNB, which effectively makes it FS specific, as we don't have scalar VS/GS/HS/DS/Compute on that hardware.

So the only things you're really sharing are:
- total_scratch
- curb_read_length
- dispatch_grf_start_reg_16
- no_8

The first two are common to all shader stages, so I think we should move them to brw_stage_prog_data; I'll send a patch to do that.

Honestly, I think we should probably just make a brw_compute_prog_data structure that inherits from brw_stage_prog_data and adds those two fields back, along with anything else you need.

--Ken
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140902/c1d2f445/attachment.sig>


More information about the mesa-dev mailing list