mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-28 14:00:30 +01:00
r600: Remove Gallium dependencies in r600_isa
Signed-off-by: Vitaliy Triang3l Kuzmin <triang3l@yandex.ru> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25695>
This commit is contained in:
parent
564b972196
commit
10ef3b7fe3
3 changed files with 11 additions and 6 deletions
|
|
@ -24,9 +24,13 @@
|
|||
* Vadim Girlin
|
||||
*/
|
||||
|
||||
#include "r600_pipe.h"
|
||||
#include "r600_isa.h"
|
||||
|
||||
#include "util/macros.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
const struct alu_op_info r600_alu_op_table[] = {
|
||||
{"ADD", 2, { 0x00, 0x00 },{ AF_VS, AF_VS, AF_VS, AF_VS}, AF_M_COMM | AF_M_ASSOC },
|
||||
{"MUL", 2, { 0x01, 0x01 },{ AF_VS, AF_VS, AF_VS, AF_VS}, AF_M_COMM | AF_M_ASSOC },
|
||||
|
|
@ -535,11 +539,11 @@ r600_isa_cf(unsigned op) {
|
|||
return &cf_op_table[op];
|
||||
}
|
||||
|
||||
int r600_isa_init(struct r600_context *ctx, struct r600_isa *isa) {
|
||||
int r600_isa_init(enum amd_gfx_level gfx_level, struct r600_isa *isa) {
|
||||
unsigned i;
|
||||
|
||||
assert(ctx->b.gfx_level >= R600 && ctx->b.gfx_level <= CAYMAN);
|
||||
isa->hw_class = ctx->b.gfx_level - R600;
|
||||
assert(gfx_level >= R600 && gfx_level <= CAYMAN);
|
||||
isa->hw_class = gfx_level - R600;
|
||||
|
||||
/* reverse lookup maps are required for bytecode parsing */
|
||||
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
#ifndef R600_ISA_H_
|
||||
#define R600_ISA_H_
|
||||
|
||||
#include "amd_family.h"
|
||||
#include "util/u_debug.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
@ -679,7 +680,7 @@ struct r600_isa {
|
|||
|
||||
struct r600_context;
|
||||
|
||||
int r600_isa_init(struct r600_context *ctx, struct r600_isa *isa);
|
||||
int r600_isa_init(enum amd_gfx_level gfx_level, struct r600_isa *isa);
|
||||
int r600_isa_destroy(struct r600_isa *isa);
|
||||
|
||||
extern const struct alu_op_info r600_alu_op_table[];
|
||||
|
|
|
|||
|
|
@ -214,7 +214,7 @@ static struct pipe_context *r600_create_context(struct pipe_screen *screen,
|
|||
0, PIPE_USAGE_DEFAULT, 0, false);
|
||||
|
||||
rctx->isa = calloc(1, sizeof(struct r600_isa));
|
||||
if (!rctx->isa || r600_isa_init(rctx, rctx->isa))
|
||||
if (!rctx->isa || r600_isa_init(rctx->b.gfx_level, rctx->isa))
|
||||
goto fail;
|
||||
|
||||
if (rscreen->b.debug_flags & DBG_FORCE_DMA)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue