intel: Add and use max_constant_urb_size_kb
This knowledge was repeated in multiple places so move the values to intel_device_info struct. Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Acked-by: Jason Ekstrand <jason@jlekstrand.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13014>
This commit is contained in:
committed by
Marge Bot
parent
f349c8ab4b
commit
37f03e89f2
@@ -219,6 +219,7 @@ static const struct intel_device_info intel_device_info_snb_gt2 = {
|
||||
.has_64bit_float = true, \
|
||||
.has_surface_tile_offset = true, \
|
||||
.timestamp_frequency = 12500000, \
|
||||
.max_constant_urb_size_kb = 16, \
|
||||
.cs_prefetch_size = 512
|
||||
|
||||
static const struct intel_device_info intel_device_info_ivb_gt1 = {
|
||||
@@ -394,6 +395,7 @@ static const struct intel_device_info intel_device_info_hsw_gt3 = {
|
||||
[MESA_SHADER_GEOMETRY] = 640,
|
||||
},
|
||||
},
|
||||
.max_constant_urb_size_kb = 32,
|
||||
.simulator_id = 9,
|
||||
};
|
||||
|
||||
@@ -419,6 +421,7 @@ static const struct intel_device_info intel_device_info_hsw_gt3 = {
|
||||
.max_gs_threads = 504, \
|
||||
.max_wm_threads = 384, \
|
||||
.timestamp_frequency = 12500000, \
|
||||
.max_constant_urb_size_kb = 32, \
|
||||
.cs_prefetch_size = 512
|
||||
|
||||
static const struct intel_device_info intel_device_info_bdw_gt1 = {
|
||||
|
||||
@@ -265,6 +265,12 @@ struct intel_device_info
|
||||
unsigned max_entries[4];
|
||||
} urb;
|
||||
|
||||
/* Maximum size in Kb that can be allocated to constants in the URB, this
|
||||
* is usually divided among the stages for implementing push constants.
|
||||
* See 3DSTATE_PUSH_CONSTANT_ALLOC_*.
|
||||
*/
|
||||
unsigned max_constant_urb_size_kb;
|
||||
|
||||
/**
|
||||
* Size of the command streamer prefetch. This is important to know for
|
||||
* self modifying batches.
|
||||
|
||||
@@ -28,6 +28,8 @@ main(int argc, char *argv[])
|
||||
assert(devinfo.num_thread_per_eu != 0);
|
||||
assert(devinfo.timestamp_frequency != 0);
|
||||
assert(devinfo.cs_prefetch_size > 0);
|
||||
|
||||
assert(devinfo.ver < 7 || devinfo.max_constant_urb_size_kb > 0);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user