r600g/compute: Fix segfault caused by new shader disassembler
This commit is contained in:
parent
02a423b239
commit
8aaee4d64e
|
@ -650,7 +650,8 @@ static const struct cf_op_info cf_op_table[] = {
|
||||||
{"ALU_EXT", { -1, -1, 0x0C, 0x0C }, CF_CLAUSE | CF_ALU | CF_ALU_EXT },
|
{"ALU_EXT", { -1, -1, 0x0C, 0x0C }, CF_CLAUSE | CF_ALU | CF_ALU_EXT },
|
||||||
{"ALU_CONTINUE", { 0x0D, 0x0D, 0x0D, -1 }, CF_CLAUSE | CF_ALU },
|
{"ALU_CONTINUE", { 0x0D, 0x0D, 0x0D, -1 }, CF_CLAUSE | CF_ALU },
|
||||||
{"ALU_BREAK", { 0x0E, 0x0E, 0x0E, -1 }, CF_CLAUSE | CF_ALU },
|
{"ALU_BREAK", { 0x0E, 0x0E, 0x0E, -1 }, CF_CLAUSE | CF_ALU },
|
||||||
{"ALU_ELSE_AFTER", { 0x0F, 0x0F, 0x0F, 0x0F }, CF_CLAUSE | CF_ALU }
|
{"ALU_ELSE_AFTER", { 0x0F, 0x0F, 0x0F, 0x0F }, CF_CLAUSE | CF_ALU },
|
||||||
|
{"CF_NATIVE", { 0x00, 0x00, 0x00, 0x00 }, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -1112,7 +1113,7 @@ static const struct cf_op_info cf_op_table[] = {
|
||||||
#define CF_OP_ALU_ELSE_AFTER 87
|
#define CF_OP_ALU_ELSE_AFTER 87
|
||||||
|
|
||||||
/* CF_NATIVE means that r600_bytecode_cf contains pre-encoded native data */
|
/* CF_NATIVE means that r600_bytecode_cf contains pre-encoded native data */
|
||||||
#define CF_NATIVE (-1)
|
#define CF_NATIVE 88
|
||||||
|
|
||||||
enum r600_chip_class {
|
enum r600_chip_class {
|
||||||
ISA_CC_R600,
|
ISA_CC_R600,
|
||||||
|
|
|
@ -271,6 +271,7 @@ int r600_compute_shader_create(struct pipe_context * ctx,
|
||||||
r600_bytecode_init(shader_ctx.bc, r600_ctx->chip_class, r600_ctx->family,
|
r600_bytecode_init(shader_ctx.bc, r600_ctx->chip_class, r600_ctx->family,
|
||||||
r600_ctx->screen->msaa_texture_support);
|
r600_ctx->screen->msaa_texture_support);
|
||||||
shader_ctx.bc->type = TGSI_PROCESSOR_COMPUTE;
|
shader_ctx.bc->type = TGSI_PROCESSOR_COMPUTE;
|
||||||
|
shader_ctx.bc->isa = r600_ctx->isa;
|
||||||
r600_bytecode_from_byte_stream(&shader_ctx, bytes, byte_count);
|
r600_bytecode_from_byte_stream(&shader_ctx, bytes, byte_count);
|
||||||
if (shader_ctx.bc->chip_class == CAYMAN) {
|
if (shader_ctx.bc->chip_class == CAYMAN) {
|
||||||
cm_bytecode_add_cf_end(shader_ctx.bc);
|
cm_bytecode_add_cf_end(shader_ctx.bc);
|
||||||
|
|
Loading…
Reference in New Issue