mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-29 09:30:20 +01:00
zink: move xfb stride off zink_shader_info struct
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39359>
This commit is contained in:
parent
0b54463485
commit
c4a1408e30
4 changed files with 6 additions and 7 deletions
|
|
@ -1885,7 +1885,7 @@ update_so_info(struct zink_shader *zs, nir_shader *nir, uint64_t outputs_written
|
|||
const nir_xfb_output_info *output = &nir->xfb_info->outputs[i];
|
||||
unsigned xfb_components = util_bitcount(output->component_mask);
|
||||
/* always set stride to be used during draw */
|
||||
zs->sinfo.stride[output->buffer] = nir->xfb_info->buffers[output->buffer].stride;
|
||||
zs->xfb_stride[output->buffer] = nir->xfb_info->buffers[output->buffer].stride;
|
||||
for (unsigned c = 0; !is_inlined(inlined[output->location], output) && c < xfb_components; c++) {
|
||||
unsigned slot = output->location;
|
||||
if (inlined[slot][output->component_offset + c])
|
||||
|
|
@ -1920,7 +1920,7 @@ update_so_info(struct zink_shader *zs, nir_shader *nir, uint64_t outputs_written
|
|||
(num_components > xfb_components && xfb_components == 4))) {
|
||||
var->data.explicit_xfb_buffer = 1;
|
||||
var->data.xfb.buffer = output->buffer;
|
||||
var->data.xfb.stride = zs->sinfo.stride[output->buffer];
|
||||
var->data.xfb.stride = zs->xfb_stride[output->buffer];
|
||||
var->data.offset = (output->offset + c * sizeof(uint32_t));
|
||||
var->data.stream = nir->xfb_info->buffer_to_stream[output->buffer];
|
||||
for (unsigned j = 0; j < MIN2(num_components, xfb_components); j++)
|
||||
|
|
@ -1990,7 +1990,7 @@ update_so_info(struct zink_shader *zs, nir_shader *nir, uint64_t outputs_written
|
|||
/* this output can be consolidated: blast out all the data inlined */
|
||||
var->data.explicit_xfb_buffer = 1;
|
||||
var->data.xfb.buffer = output->buffer;
|
||||
var->data.xfb.stride = zs->sinfo.stride[output->buffer];
|
||||
var->data.xfb.stride = zs->xfb_stride[output->buffer];
|
||||
var->data.offset = output->offset;
|
||||
var->data.stream = nir->xfb_info->buffer_to_stream[output->buffer];
|
||||
/* mark all slot components inlined to skip subsequent loop iterations */
|
||||
|
|
|
|||
|
|
@ -847,7 +847,7 @@ zink_draw(struct pipe_context *pctx,
|
|||
counter_buffers[i] = VK_NULL_HANDLE;
|
||||
if (t) {
|
||||
struct zink_resource *res = zink_resource(t->counter_buffer);
|
||||
t->stride = ctx->last_vertex_stage->sinfo.stride[i];
|
||||
t->stride = ctx->last_vertex_stage->xfb_stride[i];
|
||||
zink_batch_reference_resource_rw(ctx, res, true);
|
||||
if (!ctx->unordered_blitting)
|
||||
res->obj->unordered_read = res->obj->unordered_write = false;
|
||||
|
|
|
|||
|
|
@ -2859,7 +2859,7 @@ zink_set_primitive_emulation_keys(struct zink_context *ctx)
|
|||
shader->non_fs.is_generated = true;
|
||||
shader->non_fs.parent = ctx->gfx_stages[prev_vertex_stage];
|
||||
shader->can_inline = true;
|
||||
memcpy(shader->sinfo.stride, ctx->gfx_stages[prev_vertex_stage]->sinfo.stride, sizeof(shader->sinfo.stride));
|
||||
memcpy(shader->xfb_stride, ctx->gfx_stages[prev_vertex_stage]->xfb_stride, sizeof(shader->xfb_stride));
|
||||
}
|
||||
|
||||
ctx->base.bind_gs_state(&ctx->base,
|
||||
|
|
|
|||
|
|
@ -769,8 +769,6 @@ struct zink_framebuffer_clear {
|
|||
|
||||
/** compiler types */
|
||||
struct zink_shader_info {
|
||||
uint16_t stride[PIPE_MAX_SO_BUFFERS];
|
||||
uint32_t sampler_mask;
|
||||
bool have_sparse;
|
||||
bool have_vulkan_memory_model;
|
||||
bool have_workgroup_memory_explicit_layout;
|
||||
|
|
@ -808,6 +806,7 @@ struct zink_shader {
|
|||
nir_shader *nir;
|
||||
|
||||
struct zink_shader_info sinfo;
|
||||
uint16_t xfb_stride[PIPE_MAX_SO_BUFFERS];
|
||||
|
||||
struct {
|
||||
int index;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue