Mesa (master): r600/sfn: Fix loading vertex attributes
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Sep 16 08:36:17 UTC 2020
Module: Mesa
Branch: master
Commit: 09558ad84ee8763fdaf98b62e781c0c5774f287d
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=09558ad84ee8763fdaf98b62e781c0c5774f287d
Author: Gert Wollny <gert.wollny at collabora.com>
Date: Thu Jul 30 23:16:44 2020 +0200
r600/sfn: Fix loading vertex attributes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6706>
---
src/gallium/drivers/r600/sfn/sfn_shader_vertex.cpp | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/gallium/drivers/r600/sfn/sfn_shader_vertex.cpp b/src/gallium/drivers/r600/sfn/sfn_shader_vertex.cpp
index 3c6e1f01dad..f4a8b267b0a 100644
--- a/src/gallium/drivers/r600/sfn/sfn_shader_vertex.cpp
+++ b/src/gallium/drivers/r600/sfn/sfn_shader_vertex.cpp
@@ -190,11 +190,10 @@ bool VertexShaderFromNir::do_process_outputs(nir_variable *output)
bool VertexShaderFromNir::do_emit_load_deref(const nir_variable *in_var, nir_intrinsic_instr* instr)
{
if (in_var->data.location < VERT_ATTRIB_MAX) {
- for (int i = 0; i < instr->num_components ; ++i) {
+ for (unsigned i = 0; i < nir_dest_num_components(instr->dest); ++i) {
auto s = new GPRValue(in_var->data.driver_location + 1, i);
s->set_as_input();
auto src = PValue(s);
- inject_register(in_var->data.driver_location + 1, i, src, false);
if (i == 0)
set_input(in_var->data.driver_location, src);
More information about the mesa-commit
mailing list