microsoft/compiler: Set the SampleFrequency runtime metadata

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12513>
This commit is contained in:
Michael Tang
2021-08-23 18:53:28 -07:00
committed by Marge Bot
parent 88220083cf
commit 74a24f4f1c
3 changed files with 9 additions and 3 deletions
+1
View File
@@ -159,6 +159,7 @@ struct dxil_features {
struct dxil_shader_info {
unsigned has_out_position:1;
unsigned has_out_depth:1;
unsigned has_per_sample_input:1;
};
struct dxil_module {
+5
View File
@@ -492,6 +492,11 @@ get_input_signature_group(struct dxil_module *mod, const struct dxil_mdnode **in
mod->num_psv_inputs = MAX2(mod->num_psv_inputs,
semantic.start_row + semantic.rows);
mod->info.has_per_sample_input |=
semantic.kind == DXIL_SEM_SAMPLE_INDEX ||
semantic.interpolation == DXIL_INTERP_LINEAR_SAMPLE ||
semantic.interpolation == DXIL_INTERP_LINEAR_NOPERSPECTIVE_SAMPLE;
++num_inputs;
assert(num_inputs < VARYING_SLOT_MAX);
}
+3 -3
View File
@@ -4711,9 +4711,9 @@ void dxil_fill_validation_state(struct ntd_context *ctx,
break;
case DXIL_PIXEL_SHADER:
/* TODO: handle depth outputs */
state->state.psv0.ps.depth_output = ctx->mod.info.has_out_depth;
/* just guessing */
state->state.psv0.ps.sample_frequency = 0;
state->state.psv0.ps.depth_output = ctx->mod.info.has_out_depth;
state->state.psv0.ps.sample_frequency =
ctx->mod.info.has_per_sample_input;
break;
case DXIL_COMPUTE_SHADER:
break;