nir: Add per_view attribute to nir_variable
If a nir_variable is tagged with per_view, it must be an array with size corresponding to the number of views. For slot-tracking, it is considered to take just the slot for a single element -- drivers will take care of expanding this appropriately. This will be used to implement the ability of having per-view position in a vertex shader in Intel platforms. Acked-by: Rafael Antognolli <rafael.antognolli@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2313>
This commit is contained in:

committed by
Marge Bot

parent
0bc77bcdb2
commit
5dc85abc4f
@@ -461,8 +461,10 @@ print_var_decl(nir_variable *var, print_state *state)
|
||||
const char *const samp = (var->data.sample) ? "sample " : "";
|
||||
const char *const patch = (var->data.patch) ? "patch " : "";
|
||||
const char *const inv = (var->data.invariant) ? "invariant " : "";
|
||||
fprintf(fp, "%s%s%s%s%s %s ",
|
||||
cent, samp, patch, inv, get_variable_mode_str(var->data.mode, false),
|
||||
const char *const per_view = (var->data.per_view) ? "per_view " : "";
|
||||
fprintf(fp, "%s%s%s%s%s%s %s ",
|
||||
cent, samp, patch, inv, per_view,
|
||||
get_variable_mode_str(var->data.mode, false),
|
||||
glsl_interp_mode_name(var->data.interpolation));
|
||||
|
||||
enum gl_access_qualifier access = var->data.access;
|
||||
|
Reference in New Issue
Block a user