mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-23 17:40:11 +01:00
nir: track existence of variable shared memory
Signed-off-by: Karol Herbst <kherbst@redhat.com> Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com> Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19855>
This commit is contained in:
parent
1995762d68
commit
0e5722cd22
2 changed files with 8 additions and 0 deletions
|
|
@ -513,6 +513,11 @@ typedef struct shader_info {
|
|||
*/
|
||||
enum gl_derivative_group derivative_group:2;
|
||||
|
||||
/*
|
||||
* If the shader might run with shared mem on top of `shared_size`.
|
||||
*/
|
||||
bool has_variable_shared_mem:1;
|
||||
|
||||
/**
|
||||
* pointer size is:
|
||||
* AddressingModelLogical: 0 (default)
|
||||
|
|
|
|||
|
|
@ -6499,6 +6499,9 @@ vtn_emit_kernel_entry_point_wrapper(struct vtn_builder *b,
|
|||
for (unsigned i = 0; i < entry_point->num_params; ++i) {
|
||||
struct vtn_type *param_type = b->entry_point->func->type->params[i];
|
||||
|
||||
b->shader->info.cs.has_variable_shared_mem |=
|
||||
param_type->storage_class == SpvStorageClassWorkgroup;
|
||||
|
||||
/* consider all pointers to function memory to be parameters passed
|
||||
* by value
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue