intel: move brw_ff_gs_prog_key/data to compiler.
Step one to moving the ff_gs emitter to compiler for sharing, move BRW_MAX_SOL_BINDINGS up so the keys are in same area Reviewed-by: Eric Anholt <eric@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9721>
This commit is contained in:
@@ -280,6 +280,31 @@ struct brw_base_prog_key {
|
||||
#define MAX_GL_VERT_ATTRIB VERT_ATTRIB_MAX
|
||||
#define MAX_VK_VERT_ATTRIB (VERT_ATTRIB_GENERIC0 + 28)
|
||||
|
||||
/**
|
||||
* Max number of binding table entries used for stream output.
|
||||
*
|
||||
* From the OpenGL 3.0 spec, table 6.44 (Transform Feedback State), the
|
||||
* minimum value of MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS is 64.
|
||||
*
|
||||
* On Gfx6, the size of transform feedback data is limited not by the number
|
||||
* of components but by the number of binding table entries we set aside. We
|
||||
* use one binding table entry for a float, one entry for a vector, and one
|
||||
* entry per matrix column. Since the only way we can communicate our
|
||||
* transform feedback capabilities to the client is via
|
||||
* MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS, we need to plan for the
|
||||
* worst case, in which all the varyings are floats, so we use up one binding
|
||||
* table entry per component. Therefore we need to set aside at least 64
|
||||
* binding table entries for use by transform feedback.
|
||||
*
|
||||
* Note: since we don't currently pack varyings, it is currently impossible
|
||||
* for the client to actually use up all of these binding table entries--if
|
||||
* all of their varyings were floats, they would run out of varying slots and
|
||||
* fail to link. But that's a bug, so it seems prudent to go ahead and
|
||||
* allocate the number of binding table entries we will need once the bug is
|
||||
* fixed.
|
||||
*/
|
||||
#define BRW_MAX_SOL_BINDINGS 64
|
||||
|
||||
/** The program key for Vertex Shaders. */
|
||||
struct brw_vs_prog_key {
|
||||
struct brw_base_prog_key base;
|
||||
@@ -495,6 +520,37 @@ struct brw_bs_prog_key {
|
||||
struct brw_base_prog_key base;
|
||||
};
|
||||
|
||||
struct brw_ff_gs_prog_key {
|
||||
uint64_t attrs;
|
||||
|
||||
/**
|
||||
* Hardware primitive type being drawn, e.g. _3DPRIM_TRILIST.
|
||||
*/
|
||||
unsigned primitive:8;
|
||||
|
||||
unsigned pv_first:1;
|
||||
unsigned need_gs_prog:1;
|
||||
|
||||
/**
|
||||
* Number of varyings that are output to transform feedback.
|
||||
*/
|
||||
unsigned num_transform_feedback_bindings:7; /* 0-BRW_MAX_SOL_BINDINGS */
|
||||
|
||||
/**
|
||||
* Map from the index of a transform feedback binding table entry to the
|
||||
* gl_varying_slot that should be streamed out through that binding table
|
||||
* entry.
|
||||
*/
|
||||
unsigned char transform_feedback_bindings[BRW_MAX_SOL_BINDINGS];
|
||||
|
||||
/**
|
||||
* Map from the index of a transform feedback binding table entry to the
|
||||
* swizzles that should be used when streaming out data through that
|
||||
* binding table entry.
|
||||
*/
|
||||
unsigned char transform_feedback_swizzles[BRW_MAX_SOL_BINDINGS];
|
||||
};
|
||||
|
||||
/* brw_any_prog_key is any of the keys that map to an API stage */
|
||||
union brw_any_prog_key {
|
||||
struct brw_base_prog_key base;
|
||||
@@ -552,31 +608,6 @@ struct brw_image_param {
|
||||
/** Max number of render targets in a shader */
|
||||
#define BRW_MAX_DRAW_BUFFERS 8
|
||||
|
||||
/**
|
||||
* Max number of binding table entries used for stream output.
|
||||
*
|
||||
* From the OpenGL 3.0 spec, table 6.44 (Transform Feedback State), the
|
||||
* minimum value of MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS is 64.
|
||||
*
|
||||
* On Gfx6, the size of transform feedback data is limited not by the number
|
||||
* of components but by the number of binding table entries we set aside. We
|
||||
* use one binding table entry for a float, one entry for a vector, and one
|
||||
* entry per matrix column. Since the only way we can communicate our
|
||||
* transform feedback capabilities to the client is via
|
||||
* MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS, we need to plan for the
|
||||
* worst case, in which all the varyings are floats, so we use up one binding
|
||||
* table entry per component. Therefore we need to set aside at least 64
|
||||
* binding table entries for use by transform feedback.
|
||||
*
|
||||
* Note: since we don't currently pack varyings, it is currently impossible
|
||||
* for the client to actually use up all of these binding table entries--if
|
||||
* all of their varyings were floats, they would run out of varying slots and
|
||||
* fail to link. But that's a bug, so it seems prudent to go ahead and
|
||||
* allocate the number of binding table entries we will need once the bug is
|
||||
* fixed.
|
||||
*/
|
||||
#define BRW_MAX_SOL_BINDINGS 64
|
||||
|
||||
/**
|
||||
* Binding table index for the first gfx6 SOL binding.
|
||||
*/
|
||||
@@ -1041,6 +1072,17 @@ struct brw_bs_prog_data {
|
||||
uint32_t stack_size;
|
||||
};
|
||||
|
||||
struct brw_ff_gs_prog_data {
|
||||
unsigned urb_read_length;
|
||||
unsigned total_grf;
|
||||
|
||||
/**
|
||||
* Gfx6 transform feedback: Amount by which the streaming vertex buffer
|
||||
* indices should be incremented each time the GS is invoked.
|
||||
*/
|
||||
unsigned svbi_postincrement_value;
|
||||
};
|
||||
|
||||
/**
|
||||
* Enum representing the i965-specific vertex results that don't correspond
|
||||
* exactly to any element of gl_varying_slot. The values of this enum are
|
||||
|
Reference in New Issue
Block a user