mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 17:48:10 +02:00
rusticl/device: restrict const max size to 1 << 26 bytes
Signed-off-by: Karol Herbst <kherbst@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25937>
This commit is contained in:
parent
38deb97d10
commit
398fadf1cf
1 changed files with 11 additions and 3 deletions
|
|
@ -634,9 +634,17 @@ impl Device {
|
|||
|
||||
pub fn const_max_size(&self) -> cl_ulong {
|
||||
min(
|
||||
self.max_mem_alloc(),
|
||||
self.screen
|
||||
.param(pipe_cap::PIPE_CAP_MAX_SHADER_BUFFER_SIZE_UINT) as u64,
|
||||
// Needed to fix the `api min_max_constant_buffer_size` CL CTS test as it can't really
|
||||
// handle arbitrary values here. We might want to reconsider later and figure out how to
|
||||
// advertize higher values without tripping of the test.
|
||||
// should be at least 1 << 16 (native UBO size on NVidia)
|
||||
// advertising more just in case it benefits other hardware
|
||||
1 << 26,
|
||||
min(
|
||||
self.max_mem_alloc(),
|
||||
self.screen
|
||||
.param(pipe_cap::PIPE_CAP_MAX_SHADER_BUFFER_SIZE_UINT) as u64,
|
||||
),
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue