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:
@@ -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 {
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user