aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2020-05-21 15:27:21 -0400
committerMarge Bot <[email protected]>2020-05-21 20:17:52 +0000
commit55da8bcede40ebaf3bb28b381b815ebfe9c4c3b8 (patch)
tree0d916f5b01d78b3cf7865172a5e083244b28d516 /src
parentef57325fba6a1410861f39327c4f26da91b0c163 (diff)
panfrost: Fix transform feedback types
Don't assume float for everything. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5152>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/panfrost/pan_cmdstream.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/src/gallium/drivers/panfrost/pan_cmdstream.c b/src/gallium/drivers/panfrost/pan_cmdstream.c
index 0d96f842fa8..a6114f7cdc8 100644
--- a/src/gallium/drivers/panfrost/pan_cmdstream.c
+++ b/src/gallium/drivers/panfrost/pan_cmdstream.c
@@ -1689,19 +1689,6 @@ pan_get_so(struct pipe_stream_output_info *info, gl_varying_slot loc)
unreachable("Varying not captured");
}
-/* TODO: Integers */
-static enum mali_format
-pan_xfb_format(unsigned nr_components)
-{
- switch (nr_components) {
- case 1: return MALI_R32F;
- case 2: return MALI_RG32F;
- case 3: return MALI_RGB32F;
- case 4: return MALI_RGBA32F;
- default: unreachable("Invalid format");
- }
-}
-
void
panfrost_emit_varying_descriptor(struct panfrost_batch *batch,
unsigned vertex_count,
@@ -1887,9 +1874,9 @@ panfrost_emit_varying_descriptor(struct panfrost_batch *batch,
struct pipe_stream_output *o = pan_get_so(so, loc);
ovs[i].index = o->output_buffer;
- /* Set the type appropriately. TODO: Integer varyings XXX */
assert(o->stream == 0);
- ovs[i].format = pan_xfb_format(o->num_components);
+ ovs[i].format = (vs->varyings[i].format & ~MALI_NR_CHANNELS(4))
+ | MALI_NR_CHANNELS(o->num_components);
if (device->quirks & HAS_SWIZZLES)
ovs[i].swizzle = panfrost_get_default_swizzle(o->num_components);