Commit graph

185092 commits

Author SHA1 Message Date
Christian Gmeiner
028080c716 isaspec: encode.py: Include util/log.h
Generated encode functions are making use of mesa_loge(..).

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27714>
2024-02-23 20:29:57 +00:00
Marek Olšák
c9abb7ff6e glthread: generate packed versions of gl*Pointer/Offset calls
The pointer/offset parameter is often NULL or a small number with VBOs.

The idea is:
- If the pointer/offset parameter is NULL/0, use a different cmd structure
  and unmarshal function that doesn't contain the pointer/offset parameter
  to save 8 bytes per call.
- If the cmd structure has a hole and the pointer/offset parameter is
  a small number that fits into the hole, use a different cmd structure
  and unmarshal function that stores the value within the hole using
  a smaller type to save 8 bytes per call.

This implements those ideas. It will continue generating the most optimal
code even if we change the packing of other parameters.

This decreases the size of 1 frame in glthread batches by 21%
in Viewperf2020/Catia1.

Example of generated code for glVertexPointer with and without the pointer
parameter if it's NULL. See the arrows for comments.

/* VertexPointer: marshalled asynchronously */
struct marshal_cmd_VertexPointer
{
   struct marshal_cmd_base cmd_base;
   GLpacked16i size;
   GLenum16 type;
   GLclamped16i stride;
   const GLvoid * pointer;
};
struct marshal_cmd_VertexPointer_packed
{
   struct marshal_cmd_base cmd_base;
   GLpacked16i size;
   GLenum16 type;
   GLclamped16i stride;                                 // <------- no "pointer"
};
uint32_t _mesa_unmarshal_VertexPointer(struct gl_context *ctx, const struct marshal_cmd_VertexPointer *restrict cmd)
{
   GLpacked16i size = cmd->size;
   GLenum16 type = cmd->type;
   GLclamped16i stride = cmd->stride;
   const GLvoid * pointer = cmd->pointer;
   CALL_VertexPointer(ctx->Dispatch.Current, (size, type, stride, pointer));
   return align(sizeof(struct marshal_cmd_VertexPointer), 8) / 8;
}
uint32_t _mesa_unmarshal_VertexPointer_packed(struct gl_context *ctx, const struct marshal_cmd_VertexPointer_packed *restrict cmd)
{
   GLpacked16i size = cmd->size;
   GLenum16 type = cmd->type;
   GLclamped16i stride = cmd->stride;
   const GLvoid * pointer = (const GLvoid *)(uintptr_t)0;       // <------- using NULL
   CALL_VertexPointer(ctx->Dispatch.Current, (size, type, stride, pointer));
   return align(sizeof(struct marshal_cmd_VertexPointer_packed), 8) / 8;
}
static void GLAPIENTRY
_mesa_marshal_VertexPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
{
   GET_CURRENT_CONTEXT(ctx);
   if (!pointer) {                              // <------- the condition
      int cmd_size = sizeof(struct marshal_cmd_VertexPointer_packed);
      struct marshal_cmd_VertexPointer_packed *cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_VertexPointer_packed, cmd_size);
      cmd->size = size < 0 ? UINT16_MAX : MIN2(size, UINT16_MAX);
      cmd->type = MIN2(type, 0xffff); /* clamped to 0xffff (invalid enum) */
      cmd->stride = CLAMP(stride, INT16_MIN, INT16_MAX);
   } else {
      int cmd_size = sizeof(struct marshal_cmd_VertexPointer);
      struct marshal_cmd_VertexPointer *cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_VertexPointer, cmd_size);
      cmd->size = size < 0 ? UINT16_MAX : MIN2(size, UINT16_MAX);
      cmd->type = MIN2(type, 0xffff); /* clamped to 0xffff (invalid enum) */
      cmd->stride = CLAMP(stride, INT16_MIN, INT16_MAX);
      cmd->pointer = pointer;
   }
   _mesa_glthread_AttribPointer(ctx, VERT_ATTRIB_POS, MESA_PACK_VFORMAT(type, size, 0, 0, 0), stride, pointer);
}

Example of generated code for glNormalPointer using a smaller type:

/* NormalPointer: marshalled asynchronously */
struct marshal_cmd_NormalPointer
{
   struct marshal_cmd_base cmd_base;
   GLenum16 type;
   GLclamped16i stride;
   const GLvoid * pointer;
};
struct marshal_cmd_NormalPointer_packed
{
   struct marshal_cmd_base cmd_base;
   GLenum16 type;
   GLclamped16i stride;
   GLushort pointer;                                    // <-------- truncated "pointer"
};
uint32_t _mesa_unmarshal_NormalPointer(struct gl_context *ctx, const struct marshal_cmd_NormalPointer *restrict cmd)
{
   GLenum16 type = cmd->type;
   GLclamped16i stride = cmd->stride;
   const GLvoid * pointer = cmd->pointer;
   CALL_NormalPointer(ctx->Dispatch.Current, (type, stride, pointer));
   return align(sizeof(struct marshal_cmd_NormalPointer), 8) / 8;
}
uint32_t _mesa_unmarshal_NormalPointer_packed(struct gl_context *ctx, const struct marshal_cmd_NormalPointer_packed *restrict cmd)
{
   GLenum16 type = cmd->type;
   GLclamped16i stride = cmd->stride;
   const GLvoid * pointer = (const GLvoid *)(uintptr_t)cmd->pointer;  // <-------- upcasting
   CALL_NormalPointer(ctx->Dispatch.Current, (type, stride, pointer));
   return align(sizeof(struct marshal_cmd_NormalPointer_packed), 8) / 8;
}
static void GLAPIENTRY
_mesa_marshal_NormalPointer(GLenum type, GLsizei stride, const GLvoid *pointer)
{
   GET_CURRENT_CONTEXT(ctx);
   if (((uintptr_t)pointer & 0xffff) == (uintptr_t)pointer) {        // <-------- the condition
      int cmd_size = sizeof(struct marshal_cmd_NormalPointer_packed);
      struct marshal_cmd_NormalPointer_packed *cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_NormalPointer_packed, cmd_size);
      cmd->type = MIN2(type, 0xffff); /* clamped to 0xffff (invalid enum) */
      cmd->stride = CLAMP(stride, INT16_MIN, INT16_MAX);
      cmd->pointer = (uintptr_t)pointer; /* truncated */             // <-------- the truncation
   } else {
      int cmd_size = sizeof(struct marshal_cmd_NormalPointer);
      struct marshal_cmd_NormalPointer *cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_NormalPointer, cmd_size);
      cmd->type = MIN2(type, 0xffff); /* clamped to 0xffff (invalid enum) */
      cmd->stride = CLAMP(stride, INT16_MIN, INT16_MAX);
      cmd->pointer = pointer;
   }
   _mesa_glthread_AttribPointer(ctx, VERT_ATTRIB_NORMAL, MESA_PACK_VFORMAT(type, 3, 1, 0, 0), stride, pointer);
}

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27350>
2024-02-23 18:03:59 +00:00
Marek Olšák
24f14f8daa glthread: add a packed version of DrawElementsUserBuf
The reduces the call size by 24 bytes.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27350>
2024-02-23 18:03:59 +00:00
Marek Olšák
c566df8b39 glthread: add a packed variant of glDrawElements with 16-bit count and indices
This is just to decrease the size of glDrawElements by 8 more bytes.
This packed glDrawElements call occupies only 1 slot in glthread_batch.

This decreases the size of 1 frame in glthread batches by 13%
in Viewperf2020/Catia1.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27350>
2024-02-23 18:03:59 +00:00
Marek Olšák
5925a864b5 glthread: rewrite glBindBuffer packing
We always reserved space for a doubled glBindBuffer call, occupying
2 slots. Thanks to the removal of cmd_size, we can finally represent
glBindBuffer in only 1 slot, so do that. This saves space if there is
only 1 glBindBuffer call.

The combining of back-to-back BindBuffer calls is preserved by keeping
track of 2 last BindBuffer calls.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27350>
2024-02-23 18:03:59 +00:00
Marek Olšák
1f9b554839 glthread: use marshal_count instead of count for more functions
Same as the previous commit, just applied to more functions.
This removes safe_mul and checking whether cmd_size is too large
because the size is always small with these functions.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27350>
2024-02-23 18:03:59 +00:00
Marek Olšák
e8721fefcd glthread: don't check cmd_size for small variable-sized calls
This removes the size checking, syncing, and direct execution if
the variable-sized call is always small. Don't use safe_mul in that case
either. Only calls already using marshal_count are affected. Example:

Before:

static void GLAPIENTRY
_mesa_marshal_PointParameterfv(GLenum pname, const GLfloat *params)
{
   GET_CURRENT_CONTEXT(ctx);
   int params_size = safe_mul(_mesa_point_param_enum_to_count(pname), 1 * sizeof(GLfloat));
   int cmd_size = sizeof(struct marshal_cmd_PointParameterfv) + params_size;
   if (unlikely(params_size < 0 || (params_size > 0 && !params) || (unsigned)cmd_size > MARSHAL_MAX_CMD_SIZE)) {
      _mesa_glthread_finish_before(ctx, "PointParameterfv");
      CALL_PointParameterfv(ctx->Dispatch.Current, (pname, params));
      return;
   }
   struct marshal_cmd_PointParameterfv *cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_PointParameterfv, cmd_size);
   cmd->num_slots = align(cmd_size, 8) / 8;
   cmd->pname = MIN2(pname, 0xffff); /* clamped to 0xffff (invalid enum) */
   char *variable_data = (char *) (cmd + 1);
   memcpy(variable_data, params, params_size);
}

After:

static void GLAPIENTRY
_mesa_marshal_PointParameterfv(GLenum pname, const GLfloat *params)
{
   GET_CURRENT_CONTEXT(ctx);
   int params_size = _mesa_point_param_enum_to_count(pname) * 1 * sizeof(GLfloat);
   int cmd_size = sizeof(struct marshal_cmd_PointParameterfv) + params_size;
   assert(cmd_size >= 0 && cmd_size <= MARSHAL_MAX_CMD_SIZE);
   struct marshal_cmd_PointParameterfv *cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_PointParameterfv, cmd_size);
   cmd->num_slots = align(cmd_size, 8) / 8;
   cmd->pname = MIN2(pname, 0xffff); /* clamped to 0xffff (invalid enum) */
   char *variable_data = (char *) (cmd + 1);
   memcpy(variable_data, params, params_size);
}

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27350>
2024-02-23 18:03:59 +00:00
Marek Olšák
798f430777 glthread: deduplicate batch finalization code
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27350>
2024-02-23 18:03:59 +00:00
Marek Olšák
5d70c21d82 glthread: pack uploaded user vertex buffers and offsets better
glthread_attrib_binding has 2 fields and 4 bytes of padding, which is
arranged in array. This removes the padding by splitting the structure
into 2 arrays, one for each field.

This also fixes the pointer alignment.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27350>
2024-02-23 18:03:59 +00:00
Marek Olšák
97532db988 glthread: fix multi draws with a negative draw count
This fixes the invalid pointers when draw_count is invalid.
I don't know if it had any adverse affect.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27350>
2024-02-23 18:03:59 +00:00
Marek Olšák
eda0b9f8d4 glthread: pack glVertexAttribPointer calls better
These parameters can use 8 bits.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27350>
2024-02-23 18:03:59 +00:00
Marek Olšák
ad34c932cd glapi: pass pointer size to python for glthread from meson
glthread (the python generator) needs to know the pointer size at compile
time to sort structure fields of calls for optimal structure packing based
on the CPU.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27350>
2024-02-23 18:03:59 +00:00
Marek Olšák
610bc4d115 glthread: remove "if True" from print_marshal_async_code
This only changes indentation. No functional change.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27350>
2024-02-23 18:03:59 +00:00
Marek Olšák
e299473968 glthread: separate marshal code generation into print_marshal_async_code
I added "if True" to make the diff readable.

No functional change.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27350>
2024-02-23 18:03:59 +00:00
Marek Olšák
2d796de157 glthread: separate unmarshal function generation into print_unmarshal_func
No functional change.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27350>
2024-02-23 18:03:59 +00:00
Marek Olšák
dd6b0ea015 gltrhead: merge 3 blocks conditional on marshal_sync in print_async_body
There are 3 blocks next to each other that check marshal_sync. Merge them.

No functional change.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27350>
2024-02-23 18:03:59 +00:00
Marek Olšák
e9819744b3 glthread: precompute fixed_params and variable_params lists
This removes functions get_fixed_params and get_variable_params.

No functional change.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27350>
2024-02-23 18:03:59 +00:00
Marek Olšák
6eef0c60f8 glthread: move global marshal_XML.py functions into class marshal_function
No functional change.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27350>
2024-02-23 18:03:58 +00:00
Marek Olšák
aea16b5ae9 glthread: sort fixed-sized parameters before returning them
No functional change.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27350>
2024-02-23 18:03:58 +00:00
Marek Olšák
ee0d869d66 glapi: fix type names for glthread and handle all types
glthread will compare the whole type string, so the string must not have
trailing spaces.

No functional change.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27350>
2024-02-23 18:03:58 +00:00
Marek Olšák
12754aec1a glthread: rewrite glDrawArrays call packing
Since changing 1 field to 8 bits and the removal of cmd_size, call sizes
have decreased, so we have 4 unused bytes in 2 DrawArrays structures
So far we use:

- DrawArrays
- DrawArraysInstancedBaseInstance
- DrawArraysInstancedBaseInstanceDrawID

Change them to these by either removing 4 more bytes or adding 4 bytes,
so that we don't waste space, which drops the number of used calls by 1:

- DrawArraysInstanced
- DrawArraysInstancedBaseInstanceDrawID

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27350>
2024-02-23 18:03:58 +00:00
Marek Olšák
5e5d91671e glthread: rewrite glDrawElements call packing
Since changing 2 fields to 8 bits and the removal of cmd_size, call sizes
have decreased by 4 bytes, so we have 4 unused bytes in most DrawElements
structures. So far we have used these calls for all DrawElements variants:

- DrawElementsBaseVertex
- DrawElementsInstanced
- DrawElementsInstancedBaseVertexBaseInstance
- DrawElementsInstancedBaseVertexBaseInstanceDrawID

Change them to these by either removing 4 more bytes or adding 4 bytes,
so that we don't waste space.

- DrawElements
- DrawElementsInstancedBaseVertex
- DrawElementsInstancedBaseInstance
- DrawElementsInstancedBaseVertexBaseInstanceDrawID

This decreases the size of 1 frame in glthread batches by 12%
in Viewperf2020/Catia1.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27350>
2024-02-23 18:03:58 +00:00
Marek Olšák
99f8f01dfb glthread: pack the index type to 8 bits
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27350>
2024-02-23 18:03:58 +00:00
Marek Olšák
15bc7e1d62 glthread: pack the primitive type to 8 bits
The maximum valid enum is only 14.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27350>
2024-02-23 18:03:58 +00:00
Marek Olšák
39edcd695a mesa: deduplicate is_index_type_valid code
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27350>
2024-02-23 18:03:58 +00:00
Marek Olšák
259a0a9aeb mesa: deduplicate get_index_size_shift code
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27350>
2024-02-23 18:03:58 +00:00
Marek Olšák
1388be4d39 glthread: pack "size" in Pointer calls as 16 bits
The only legal values are {1, 2, 3, 4, GL_BGRA}.
We need GLpacked16i to be unsigned, not signed, because GL_BGRA is
greater than 0x8000.

This decreases the size of 1 frame by 10% in Viewperf2020/Catia1.
It decreases the size of many Pointer calls by 8 bytes.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27350>
2024-02-23 18:03:58 +00:00
Marek Olšák
13a8efcb2c glthread: clean up how vertex stride is packed
Use a better type name. Also check the function name more accurately
(no change in behavior).

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27350>
2024-02-23 18:03:58 +00:00
Marek Olšák
617cdedd35 glthread: remove cmd_size from constant-sized calls
Only variable-sized calls keep cmd_size in their structures, and it's
renamed to num_slots because it's in units of 8-byte elements.

The motivation is to make room for reducing call sizes.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27350>
2024-02-23 18:03:58 +00:00
Marek Olšák
acfefc1f14 glthread: add no_error variants of glDrawArrays*
The main motivation is that no_error allows us to drop count==0 draws
at the beginning of the marshal function, instead of forwarding them
to the frontend thread. Such draws are plentiful with Viewperf.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27350>
2024-02-23 18:03:58 +00:00
Marek Olšák
138804fdfc glthread: add no_error variants of glDrawElements*
The main motivation is that no_error allows us to drop count==0 draws
at the beginning of the marshal function, instead of forwarding them
to the frontend thread. Such draws are plentiful with Viewperf.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27350>
2024-02-23 18:03:58 +00:00
Marek Olšák
c52e1f916a glthread: use _mesa_glthread_fence_call() instead of duplicating that code
no change in behavior

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27350>
2024-02-23 18:03:58 +00:00
Marek Olšák
47d589e7d4 glthread: re-enable thread scheduling in st/mesa when glthread is disabled
This happens when GL_DEBUG_OUTPUT_SYNCHRONOUS is enabled.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27350>
2024-02-23 18:03:58 +00:00
Chris Rankin
c3ceec6cd8 vdpau: Refactor query for video surface formats.
Cc: mesa-stable

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10614
Signed-off-by: Chris Rankin <rankincj@gmail.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27730>
2024-02-23 16:26:27 +00:00
Biju Das
174b715391 gallium: Add Renesas rzg2l-du DRM entry point
RZ/{G2L,G2LC,V2L} SoCs implements an ARM Mali-G31[1]. Add an entry point
for Renesas rzg2l-du DRM vendor, so mesa can be used with it.

[1] https://lore.kernel.org/all/20211208104026.421-3-biju.das.jz@bp.renesas.com/

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27763>
2024-02-23 15:47:56 +00:00
Karol Herbst
d096523af0 rusticl/kernel: make builds private
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27747>
2024-02-23 14:47:19 +00:00
Karol Herbst
14ccfb41bc rusticl/meson: remove -Aclippy::arc-with-non-send-sync flag
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27747>
2024-02-23 14:47:19 +00:00
Karol Herbst
ce06bdf916 rusticl/icd: verify all cl classes are Send and Sync
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27747>
2024-02-23 14:47:19 +00:00
Karol Herbst
e202903007 rusticl/kernel: make it Send and Sync
There are a few APIs which don't have to be thread-safe, but we can
optimize it later.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27747>
2024-02-23 14:47:19 +00:00
Karol Herbst
59cba70751 rusticl/spirv: mark SPIRVBin as Send and Sync
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27747>
2024-02-23 14:47:19 +00:00
Karol Herbst
17e97a8f06 rusticl/event: make EventSig Send + Sync
The code was effecitvely that already, but now we can have the compiler
actually verify this.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27747>
2024-02-23 14:47:18 +00:00
Karol Herbst
a97108d3c7 rusticl/memory: make closures Send and Sync
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27747>
2024-02-23 14:47:18 +00:00
Karol Herbst
aa3b44c02b rusticl/memory: store host_ptr as usize
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27747>
2024-02-23 14:47:18 +00:00
Karol Herbst
1753b59cfd rusticl/context: complete conversion of SVM pointers to usize
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27747>
2024-02-23 14:47:18 +00:00
Danylo Piliaiev
ebde7d5e87 tu/a7xx: Write even more magic regs to fix rendering issues on Android
We have to write all the same regs blob is writing or we risk using
stale reg value written by blob.

I went through blob trace again and added all missing magic regs,
I hope for the last time.

This fixes screen corruption for Mobox users and in some cases
for different emulators users. The reg which caused the issue
is HLSQ_UNKNOWN_A9AC.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27721>
2024-02-23 14:19:11 +00:00
Antonio Gomes
38ffdb883d rusticl/device: Verify for PIPE_CAP_CL_GL_SHARING when enabling gl_sharing
I think it's better to keep the other checks (check for dmabuf, uuid,
...) as we can use them to know the features required.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26071>
2024-02-23 13:29:00 +00:00
Antonio Gomes
d43f9f9c60 radeonsi: Set PIPE_CAP_CL_GL_SHARING to true
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26071>
2024-02-23 13:29:00 +00:00
Antonio Gomes
6e7d1725a3 iris: Set PIPE_CAP_CL_GL_SHARING to true
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26071>
2024-02-23 13:29:00 +00:00
Antonio Gomes
12f1a4c311 gallium: Add new PIPE_CAP_CL_GL_SHARING
We have a situation where some drivers have all the required features,
but they are not working with gl_sharing, so we end up advertising it
wrongly. Add this cap to ensure this driver was tested to work with
cl_khr_gl_sharing.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26071>
2024-02-23 13:29:00 +00:00
Antonio Gomes
50f6478e3d rusticl/gl: Bump mesa_glinterop_device_info to version 4
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26071>
2024-02-23 13:29:00 +00:00