summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/intel/compiler/brw_compiler.h92
-rw-r--r--src/mesa/drivers/dri/i965/brw_context.h12
-rw-r--r--src/mesa/drivers/dri/i965/brw_ff_gs.h31
3 files changed, 67 insertions, 68 deletions
diff --git a/src/intel/compiler/brw_compiler.h b/src/intel/compiler/brw_compiler.h
index 805537488e4..0f296b85eee 100644
--- a/src/intel/compiler/brw_compiler.h
+++ b/src/intel/compiler/brw_compiler.h
@@ -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;
@@ -553,31 +609,6 @@ struct brw_image_param {
#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.
*/
#define BRW_GFX6_SOL_BINDING_START 0
@@ -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
diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h
index b39c4a7d76d..506cbddd62f 100644
--- a/src/mesa/drivers/dri/i965/brw_context.h
+++ b/src/mesa/drivers/dri/i965/brw_context.h
@@ -336,18 +336,6 @@ struct brw_program {
bool compiled_once;
};
-
-struct brw_ff_gs_prog_data {
- GLuint urb_read_length;
- GLuint 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;
-};
-
/** Number of texture sampler units */
#define BRW_MAX_TEX_UNIT 32
diff --git a/src/mesa/drivers/dri/i965/brw_ff_gs.h b/src/mesa/drivers/dri/i965/brw_ff_gs.h
index 351bdb77097..7ab0b1d3eb3 100644
--- a/src/mesa/drivers/dri/i965/brw_ff_gs.h
+++ b/src/mesa/drivers/dri/i965/brw_ff_gs.h
@@ -39,37 +39,6 @@
#define MAX_GS_VERTS (4)
-struct brw_ff_gs_prog_key {
- GLbitfield64 attrs;
-
- /**
- * Hardware primitive type being drawn, e.g. _3DPRIM_TRILIST.
- */
- GLuint primitive:8;
-
- GLuint pv_first:1;
- GLuint need_gs_prog:1;
-
- /**
- * Number of varyings that are output to transform feedback.
- */
- GLuint 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];
-};
-
struct brw_ff_gs_compile {
struct brw_codegen func;
struct brw_ff_gs_prog_key key;