r600/sfn: Don't reorder outputs by location
authorGert Wollny <gert.wollny@collabora.com>
Wed, 6 May 2020 22:01:11 +0000 (00:01 +0200)
committerMarge Bot <eric+marge@anholt.net>
Tue, 19 May 2020 07:52:14 +0000 (07:52 +0000)
This was wrong, if anything it should be sorted by device_location, and NIR usually
provides this.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5085>

src/gallium/drivers/r600/sfn/sfn_shader_vertex.cpp
src/gallium/drivers/r600/sfn/sfn_vertexstageexport.cpp
src/gallium/drivers/r600/sfn/sfn_vertexstageexport.h

index 2447a07d5c34ee375d7ffb0becc38df5f60d782a..3c6e1f01dad225e18933201edcdb6ba805007afc 100644 (file)
@@ -120,7 +120,6 @@ bool VertexShaderFromNir::do_allocate_reserved_registers()
 
 void VertexShaderFromNir::emit_shader_start()
 {
-   m_export_processor->setup_paramn_map();
 }
 
 bool VertexShaderFromNir::scan_sysvalue_access(nir_instr *instr)
index 061097359ba35d682b3e5d0015b2d6e6b9c17cee..bcaa5f405f675d89a79ee9bf395870a7327c9986 100644 (file)
@@ -33,21 +33,6 @@ VertexStageExportForFS::VertexStageExportForFS(VertexStage& proc,
 {
 }
 
-void VertexStageExportBase::setup_paramn_map()
-{
-   priority_queue<int, std::vector<int>, std::greater<int>>  q;
-   for (auto a: m_param_map) {
-      q.push(a.first);
-   }
-
-   int next_param = 0;
-   while (!q.empty()) {
-      int loc = q.top();
-      q.pop();
-      m_param_map[loc] = next_param++;
-   }
-}
-
 bool VertexStageExportBase::do_process_outputs(nir_variable *output)
 {
    if (output->data.location == VARYING_SLOT_COL0 ||
index a48f9d34153e59494a7d2ce1ddcfa3419db09bc5..3740a325f143ca6f61ea1d151590b7e15559e7c5 100644 (file)
@@ -17,7 +17,6 @@ class VertexStageExportBase
 public:
    VertexStageExportBase(VertexStage& proc);
    virtual ~VertexStageExportBase();
-   void setup_paramn_map();
    virtual bool store_deref(const nir_variable *out_var, nir_intrinsic_instr* instr) = 0;
    virtual void finalize_exports() = 0;
    virtual bool do_process_outputs(nir_variable *output);