microsoft/compiler: Pick a type that matches interpolation mode for structs
We can't use linear interpolation on integer types, and varyings using a struct type might actually contain only fp32 members, in which case interpolation should happen as requested. Reviewed-by: Jesse Natalie <jenatali@microsoft.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16961>
This commit is contained in:
parent
51bdac4846
commit
69339066fc
|
@ -263,10 +263,6 @@ spec/arb_gl_spirv/execution/xfb/vs_two_sets_struct: skip
|
|||
spec/arb_gl_spirv/linker/uniform/multisampler: skip
|
||||
spec/arb_gl_spirv/linker/uniform/multisampler-array: skip
|
||||
spec/arb_gpu_shader5/execution/built-in-functions/fs-interpolateatcentroid-array-of-structs: crash
|
||||
spec/arb_gpu_shader5/execution/built-in-functions/fs-interpolateatcentroid-struct: crash
|
||||
spec/arb_gpu_shader5/execution/built-in-functions/fs-interpolateatcentroid-struct2: crash
|
||||
spec/arb_gpu_shader5/execution/built-in-functions/fs-interpolateatoffset-struct: crash
|
||||
spec/arb_gpu_shader5/execution/built-in-functions/fs-interpolateatsample-struct: crash
|
||||
spec/arb_gpu_shader5/execution/ubo_array_indexing/fs-masked: fail
|
||||
spec/arb_gpu_shader5/execution/ubo_array_indexing/fs-nonuniform-control-flow: fail
|
||||
spec/arb_gpu_shader5/execution/ubo_array_indexing/vs-nonuniform-control-flow: fail
|
||||
|
@ -517,7 +513,6 @@ spec/arb_gpu_shader_int64/execution/indirect-array-two-accesses: fail
|
|||
spec/arb_gpu_shader_int64/execution/inout/vs-out-fs-in-s1/2-s2/2-s3/2-int64_t-location-0: crash
|
||||
spec/arb_gpu_shader_int64/execution/inout/vs-out-fs-in-s1/2-s2/2-s3/2-uint64_t-location-0: crash
|
||||
spec/arb_separate_shader_objects/execution/layout-location-block-with-struct-member: crash
|
||||
spec/arb_separate_shader_objects/execution/layout-location-struct: crash
|
||||
spec/arb_separate_shader_objects/execution/layout-location-struct-mixed-with-implicitly-assigned-varying: crash
|
||||
spec/arb_separate_shader_objects/linker/pervertex-culldistance-tcs-out-tes: skip
|
||||
spec/arb_separate_shader_objects/linker/pervertex-culldistance-tes-out-gs: skip
|
||||
|
@ -589,7 +584,6 @@ spec/arb_tessellation_shader/execution/variable-indexing/tcs-patch-output-array-
|
|||
spec/arb_tessellation_shader/execution/variable-indexing/tcs-patch-output-array-vec3-index-wr: crash
|
||||
spec/arb_tessellation_shader/execution/variable-indexing/tcs-patch-output-array-vec4-index-wr: crash
|
||||
spec/arb_tessellation_shader/execution/variable-indexing/tcs-patch-vec4-index-wr: crash
|
||||
spec/arb_tessellation_shader/execution/variable-indexing/tcs-tes-array-in-struct: crash
|
||||
spec/arb_tessellation_shader/execution/variable-indexing/tes-both-input-array-float-index-rd: crash
|
||||
spec/arb_tessellation_shader/execution/variable-indexing/tes-both-input-array-vec2-index-rd: crash
|
||||
spec/arb_tessellation_shader/execution/variable-indexing/tes-both-input-array-vec3-index-rd: crash
|
||||
|
@ -3089,9 +3083,9 @@ spec/oes_viewport_array/viewport-gs-writes-out-of-range: skip
|
|||
summary:
|
||||
name: results
|
||||
---- --------
|
||||
pass: 17153
|
||||
pass: 17159
|
||||
fail: 44
|
||||
crash: 94
|
||||
crash: 88
|
||||
skip: 2925
|
||||
timeout: 0
|
||||
warn: 25
|
||||
|
|
|
@ -43,7 +43,7 @@ enum dxil_prog_sig_comp_type dxil_get_prog_sig_comp_type(const struct glsl_type
|
|||
case GLSL_TYPE_UINT64: return DXIL_PROG_SIG_COMP_TYPE_UINT64;
|
||||
case GLSL_TYPE_INT64: return DXIL_PROG_SIG_COMP_TYPE_SINT64;
|
||||
case GLSL_TYPE_BOOL: return DXIL_PROG_SIG_COMP_TYPE_UINT32;
|
||||
case GLSL_TYPE_STRUCT: return DXIL_PROG_SIG_COMP_TYPE_UINT32;
|
||||
case GLSL_TYPE_STRUCT: return DXIL_PROG_SIG_COMP_TYPE_UNKNOWN;
|
||||
default:
|
||||
debug_printf("unexpected type: %s\n", glsl_get_type_name(type));
|
||||
return DXIL_PROG_SIG_COMP_TYPE_UNKNOWN;
|
||||
|
|
|
@ -127,8 +127,17 @@ get_additional_semantic_info(nir_shader *s, nir_variable *var, struct semantic_i
|
|||
dxil_get_prog_sig_comp_type(type);
|
||||
|
||||
bool is_depth = is_depth_output(info->kind);
|
||||
info->sig_comp_type = glsl_type_is_struct(type) ?
|
||||
DXIL_COMP_TYPE_U32 : dxil_get_comp_type(type);
|
||||
|
||||
if (!glsl_type_is_struct(type)) {
|
||||
info->sig_comp_type = dxil_get_comp_type(type);
|
||||
} else if (var->data.interpolation == INTERP_MODE_FLAT) {
|
||||
info->sig_comp_type = DXIL_COMP_TYPE_U32;
|
||||
info->comp_type = DXIL_PROG_SIG_COMP_TYPE_UINT32;
|
||||
} else {
|
||||
info->sig_comp_type = DXIL_COMP_TYPE_F32;
|
||||
info->comp_type = DXIL_PROG_SIG_COMP_TYPE_FLOAT32;
|
||||
}
|
||||
|
||||
bool is_gs_input = s->info.stage == MESA_SHADER_GEOMETRY &&
|
||||
(var->data.mode & (nir_var_shader_in | nir_var_system_value));
|
||||
|
||||
|
|
Loading…
Reference in New Issue