intel/compiler: drop unused ray-tracing fields from cache hash
The compiler only references `intel_device_info->subslice_masks` for ray tracing workloads. Platforms which lack raytracing support can share a cache even if they differ on this field. Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28311>
This commit is contained in:
@@ -47,7 +47,12 @@ void
|
||||
brw_device_sha1_update(struct mesa_sha1 *ctx,
|
||||
const struct intel_device_info *devinfo) {
|
||||
% for member in compiler_fields:
|
||||
% if member.ray_tracing_field:
|
||||
if (devinfo->has_ray_tracing)
|
||||
SHA_UPDATE_FIELD(${member.name});
|
||||
% else:
|
||||
SHA_UPDATE_FIELD(${member.name});
|
||||
% endif
|
||||
% endfor
|
||||
}
|
||||
|
||||
|
||||
@@ -65,13 +65,16 @@ class Enum:
|
||||
|
||||
class Member:
|
||||
"""Stores details needed to declare and serialize the member of a struct."""
|
||||
def __init__(self, member_type, name, array=None, compiler_field=False, comment=None):
|
||||
def __init__(self, member_type, name, array=None,
|
||||
compiler_field=False, ray_tracing_field=False,
|
||||
comment=None):
|
||||
self.member_type = member_type
|
||||
self.name = name
|
||||
self.array = array
|
||||
# indicates whether this field is used by the compiler, and whether it
|
||||
# should be included in the shader compiler cache hash function.
|
||||
self.compiler_field = compiler_field
|
||||
self.ray_tracing_field = ray_tracing_field
|
||||
self.comment=comment
|
||||
|
||||
class Struct:
|
||||
@@ -362,6 +365,7 @@ Struct("intel_device_info",
|
||||
Member("uint8_t", "subslice_masks",
|
||||
array="INTEL_DEVICE_MAX_SLICES * DIV_ROUND_UP(INTEL_DEVICE_MAX_SUBSLICES, 8)",
|
||||
compiler_field=True,
|
||||
ray_tracing_field=True,
|
||||
comment=dedent("""\
|
||||
An array of bit mask of the subslices available, use subslice_slice_stride
|
||||
to access this array.""")),
|
||||
|
||||
Reference in New Issue
Block a user