nouveau/codegen: drop gallium headers from the interface.
I know pipe defines are still used internally, but I'd want better testing, before starting to remove that. Acked-by: Karol Herbst <kherbst@redhat.com> Reviewed-by: Emma Anholt <emma@anholt.net> Reviewed-by: Yusuf Khan<yusisamerican@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16763>
This commit is contained in:
parent
ee93b32fdd
commit
e90fe826a2
|
@ -79,5 +79,5 @@ libnouveau_codegen = static_library(
|
|||
|
||||
idep_nouveau_codegen = declare_dependency(
|
||||
sources : [ 'nv50_ir_driver.h' ],
|
||||
include_directories : [inc_gallium_aux, include_directories('.')],
|
||||
include_directories : include_directories('.'),
|
||||
)
|
||||
|
|
|
@ -23,13 +23,10 @@
|
|||
#ifndef __NV50_IR_DRIVER_H__
|
||||
#define __NV50_IR_DRIVER_H__
|
||||
|
||||
#include "pipe/p_shader_tokens.h"
|
||||
|
||||
#include "util/macros.h"
|
||||
#include "util/blob.h"
|
||||
#include "tgsi/tgsi_util.h"
|
||||
#include "tgsi/tgsi_parse.h"
|
||||
#include "tgsi/tgsi_scan.h"
|
||||
|
||||
#define NV50_CODEGEN_MAX_VARYINGS 80
|
||||
struct nir_shader_compiler_options;
|
||||
|
||||
/*
|
||||
|
@ -153,9 +150,9 @@ struct nv50_ir_prog_info_out
|
|||
void *fixupData;
|
||||
} bin;
|
||||
|
||||
struct nv50_ir_varying sv[PIPE_MAX_SHADER_INPUTS];
|
||||
struct nv50_ir_varying in[PIPE_MAX_SHADER_INPUTS];
|
||||
struct nv50_ir_varying out[PIPE_MAX_SHADER_OUTPUTS];
|
||||
struct nv50_ir_varying sv[NV50_CODEGEN_MAX_VARYINGS];
|
||||
struct nv50_ir_varying in[NV50_CODEGEN_MAX_VARYINGS];
|
||||
struct nv50_ir_varying out[NV50_CODEGEN_MAX_VARYINGS];
|
||||
uint8_t numInputs;
|
||||
uint8_t numOutputs;
|
||||
uint8_t numPatchConstants; /* also included in numInputs/numOutputs */
|
||||
|
|
|
@ -1035,7 +1035,7 @@ bool Converter::assignSlots() {
|
|||
int slot = var->data.location;
|
||||
uint16_t slots = calcSlots(type, prog->getType(), nir->info, true, var);
|
||||
uint32_t vary = var->data.driver_location;
|
||||
assert(vary + slots <= PIPE_MAX_SHADER_INPUTS);
|
||||
assert(vary + slots <= NV50_CODEGEN_MAX_VARYINGS);
|
||||
|
||||
switch(prog->getType()) {
|
||||
case Program::TYPE_FRAGMENT:
|
||||
|
@ -1091,7 +1091,7 @@ bool Converter::assignSlots() {
|
|||
uint16_t slots = calcSlots(type, prog->getType(), nir->info, false, var);
|
||||
uint32_t vary = var->data.driver_location;
|
||||
|
||||
assert(vary < PIPE_MAX_SHADER_OUTPUTS);
|
||||
assert(vary < NV50_CODEGEN_MAX_VARYINGS);
|
||||
|
||||
switch(prog->getType()) {
|
||||
case Program::TYPE_FRAGMENT:
|
||||
|
@ -1226,8 +1226,8 @@ Converter::getSlotAddress(nir_intrinsic_instr *insn, uint8_t idx, uint8_t slot)
|
|||
}
|
||||
|
||||
assert(slot < 4);
|
||||
assert(!input || idx < PIPE_MAX_SHADER_INPUTS);
|
||||
assert(input || idx < PIPE_MAX_SHADER_OUTPUTS);
|
||||
assert(!input || idx < NV50_CODEGEN_MAX_VARYINGS);
|
||||
assert(input || idx < NV50_CODEGEN_MAX_VARYINGS);
|
||||
|
||||
const nv50_ir_varying *vary = input ? info_out->in : info_out->out;
|
||||
return vary[idx].slot[slot] * 4;
|
||||
|
|
Loading…
Reference in New Issue