ir3: Support geometry streams
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6962>
This commit is contained in:
parent
48cfaecd4f
commit
563789ce37
|
@ -836,6 +836,11 @@ lower_gs_block(nir_block *block, nir_builder *b, struct state *state)
|
|||
|
||||
switch (intr->intrinsic) {
|
||||
case nir_intrinsic_end_primitive: {
|
||||
/* Note: This ignores the stream, which seems to match the blob
|
||||
* behavior. I'm guessing the HW ignores any extraneous cut
|
||||
* signals from an EndPrimitive() that doesn't correspond to the
|
||||
* rasterized stream.
|
||||
*/
|
||||
b->cursor = nir_before_instr(&intr->instr);
|
||||
nir_store_var(b, state->vertex_flags_out, nir_imm_int(b, 4), 0x1);
|
||||
nir_instr_remove(&intr->instr);
|
||||
|
@ -849,6 +854,12 @@ lower_gs_block(nir_block *block, nir_builder *b, struct state *state)
|
|||
|
||||
nir_push_if(b, nir_ieq(b, count, local_thread_id(b)));
|
||||
|
||||
unsigned stream = nir_intrinsic_stream_id(intr);
|
||||
/* vertex_flags_out |= stream */
|
||||
nir_store_var(b, state->vertex_flags_out,
|
||||
nir_ior(b, nir_load_var(b, state->vertex_flags_out),
|
||||
nir_imm_int(b, stream)), 0x1 /* .x */);
|
||||
|
||||
foreach_two_lists(dest_node, &state->emit_outputs, src_node, &state->old_outputs) {
|
||||
nir_variable *dest = exec_node_data(nir_variable, dest_node, node);
|
||||
nir_variable *src = exec_node_data(nir_variable, src_node, node);
|
||||
|
|
|
@ -219,6 +219,10 @@ struct ir3_stream_output_info {
|
|||
/** stride for an entire vertex for each buffer in dwords */
|
||||
uint16_t stride[IR3_MAX_SO_BUFFERS];
|
||||
|
||||
/* These correspond to the VPC_SO_STREAM_CNTL fields */
|
||||
uint8_t streams_written;
|
||||
uint8_t buffer_to_stream[IR3_MAX_SO_BUFFERS];
|
||||
|
||||
/**
|
||||
* Array of stream outputs, in the order they are to be written in.
|
||||
* Selected components are tightly packed into the output buffer.
|
||||
|
|
Loading…
Reference in New Issue