[Mesa-dev] [PATCH v02 33/37] i965: Port push constant code to genxml.

Kenneth Graunke kenneth at whitecape.org
Thu Apr 27 07:54:19 UTC 2017


On Monday, April 24, 2017 3:19:28 PM PDT Rafael Antognolli wrote:
> The following states are ported on this patch:
>    - gen6_gs_push_constants
>    - gen6_vs_push_constants
>    - gen6_wm_push_constants
>    - gen7_tes_push_constants
> 
> v2:
>    - Use helper to setup brw_address (Kristian)
> 
> Signed-off-by: Rafael Antognolli <rafael.antognolli at intel.com>

I don't really like this one - there's a lot of code duplication still,
and then the bulk of the work in upload_constant_state is a macro and
can't do gen-specific compilation...

The thing is, all the commands are basically the same, even if genxml
technically has different structures.  We should be able to make
upload_constant_state a real function.

See intel/vulkan/genX_cmd_buffer.c and cmd_buffer_flush_push_constants
for the trick.  It just uses GENX(3DSTATE_CONSTANT_VS), but overrides
c._3DCommandSubOpcode to the right opcode.

A macro might make sense for the rest - the upload functions and atoms
are nearly exactly the same...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170427/446c0fb5/attachment.sig>


More information about the mesa-dev mailing list