Commit 74e0a0a7 authored by Gert Wollny's avatar Gert Wollny Committed by Marge Bot

r600/sfn: Handle LDS output in VS

Signed-off-by: Gert Wollny's avatarGert Wollny <gert.wollny@collabora.com>
Part-of: <!4714>
parent f102301c
......@@ -110,17 +110,25 @@ protected:
bool as_last = true);
void inc_atomic_file_count();
std::bitset<8> m_sv_values;
enum ESlots {
es_face,
es_instanceid,
es_invocation_id,
es_patch_id,
es_pos,
es_rel_patch_id,
es_sample_mask_in,
es_sample_id,
es_tess_factor_base,
es_vertexid,
es_tess_coord,
es_primitive_id,
es_last
};
std::bitset<es_last> m_sv_values;
private:
virtual bool allocate_reserved_registers() = 0;
......
......@@ -28,6 +28,7 @@
#include "pipe/p_defines.h"
#include "tgsi/tgsi_from_mesa.h"
#include "sfn_shader_vertex.h"
#include "sfn_instruction_lds.h"
#include <queue>
......@@ -133,6 +134,9 @@ bool VertexShaderFromNir::scan_sysvalue_access(nir_instr *instr)
case nir_intrinsic_load_instance_id:
m_sv_values.set(es_instanceid);
break;
case nir_intrinsic_load_tcs_rel_patch_id_r600:
m_sv_values.set(es_rel_patch_id);
break;
default:
;
}
......@@ -148,8 +152,12 @@ bool VertexShaderFromNir::emit_intrinsic_instruction_override(nir_intrinsic_inst
switch (instr->intrinsic) {
case nir_intrinsic_load_vertex_id:
return load_preloaded_value(instr->dest, 0, m_vertex_id);
case nir_intrinsic_load_tcs_rel_patch_id_r600:
return load_preloaded_value(instr->dest, 0, m_rel_vertex_id);
case nir_intrinsic_load_instance_id:
return load_preloaded_value(instr->dest, 0, m_instance_id);
case nir_intrinsic_store_local_shared_r600:
return emit_store_local_shared(instr);
default:
return false;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment