mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 11:48:06 +02:00
nir: xfb_buffer_info::stride is in bytes
For the NIR XFB gathering as well as all the Vulkan drivers, buffer
strides in nir_xfb_info are in bytes. When Marek started using
nir_xfb_info for GLSL on radeonsi, he copied directly from the GLSL
struct which has strides in dwords. This inconsistency didn't show up
until I went through and started us using the NIR passes for GL drivers
directly without going through the GLSL structs. We could change the
nir_xfb_buffer_info field to be in dwords to be consistent with
shader_info but that would mean changing all the Vulkan drivers but, for
now, it's easier to always use bytes in nir_xfb_info.
Fixes: 2a22885a45 ("st,nir: Use nir_shader::xfb_info in nir_lower_io_passes")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16819>
This commit is contained in:
parent
7c876a6b2f
commit
d8df87056c
2 changed files with 2 additions and 2 deletions
|
|
@ -208,7 +208,7 @@ gl_to_nir_xfb_info(struct gl_transform_feedback_info *info, void *mem_ctx)
|
|||
xfb->output_count = info->NumOutputs;
|
||||
|
||||
for (unsigned i = 0; i < MAX_FEEDBACK_BUFFERS; i++) {
|
||||
xfb->buffers[i].stride = info->Buffers[i].Stride;
|
||||
xfb->buffers[i].stride = info->Buffers[i].Stride * 4;
|
||||
xfb->buffers[i].varying_count = info->Buffers[i].NumVaryings;
|
||||
xfb->buffer_to_stream[i] = info->Buffers[i].Stream;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2950,7 +2950,7 @@ nir_add_xfb_info(nir_shader *nir)
|
|||
bool progress = false;
|
||||
|
||||
for (unsigned i = 0; i < NIR_MAX_XFB_BUFFERS; i++)
|
||||
nir->info.xfb_stride[i] = nir->xfb_info->buffers[i].stride;
|
||||
nir->info.xfb_stride[i] = nir->xfb_info->buffers[i].stride / 4;
|
||||
|
||||
nir_foreach_block (block, impl) {
|
||||
nir_foreach_instr_safe (instr, block) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue