mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-30 16:30:10 +01:00
rbug: Handle non-TGSI shaders
NIR shaders aren't yet transferred over the wire, but at least they don't cause a crash. Acked-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7495>
This commit is contained in:
parent
44875361c8
commit
19b181f0f5
2 changed files with 14 additions and 11 deletions
|
|
@ -577,17 +577,19 @@ rbug_shader_info(struct rbug_rbug *tr_rbug, struct rbug_header *header, uint32_t
|
|||
/* just in case */
|
||||
assert(sizeof(struct tgsi_token) == 4);
|
||||
|
||||
original_len = tgsi_num_tokens(tr_shdr->tokens);
|
||||
if (tr_shdr->replaced_tokens)
|
||||
replaced_len = tgsi_num_tokens(tr_shdr->replaced_tokens);
|
||||
else
|
||||
replaced_len = 0;
|
||||
if (tr_shdr->tokens) {
|
||||
original_len = tgsi_num_tokens(tr_shdr->tokens);
|
||||
if (tr_shdr->replaced_tokens)
|
||||
replaced_len = tgsi_num_tokens(tr_shdr->replaced_tokens);
|
||||
else
|
||||
replaced_len = 0;
|
||||
|
||||
rbug_send_shader_info_reply(tr_rbug->con, serial,
|
||||
(uint32_t*)tr_shdr->tokens, original_len,
|
||||
(uint32_t*)tr_shdr->replaced_tokens, replaced_len,
|
||||
tr_shdr->disabled,
|
||||
NULL);
|
||||
rbug_send_shader_info_reply(tr_rbug->con, serial,
|
||||
(uint32_t*)tr_shdr->tokens, original_len,
|
||||
(uint32_t*)tr_shdr->replaced_tokens, replaced_len,
|
||||
tr_shdr->disabled,
|
||||
NULL);
|
||||
}
|
||||
|
||||
mtx_unlock(&rb_context->list_mutex);
|
||||
mtx_unlock(&rb_screen->list_mutex);
|
||||
|
|
|
|||
|
|
@ -207,7 +207,8 @@ rbug_shader_create(struct rbug_context *rb_context,
|
|||
|
||||
rb_shader->type = type;
|
||||
rb_shader->shader = result;
|
||||
rb_shader->tokens = tgsi_dup_tokens(state->tokens);
|
||||
if (state->tokens)
|
||||
rb_shader->tokens = tgsi_dup_tokens(state->tokens);
|
||||
|
||||
/* works on context as well since its just a macro */
|
||||
rbug_screen_add_to_list(rb_context, shaders, rb_shader);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue