diff options
author | Johannes Obermayr <[email protected]> | 2013-01-12 12:55:08 +0100 |
---|---|---|
committer | Christoph Bumiller <[email protected]> | 2013-01-12 17:14:04 +0100 |
commit | 6bca283ad5ebdd85e268c6757842b3c808c6b73d (patch) | |
tree | 0f85bb1f819390108eb846063b0bf5058f5cd8cc /src/gallium/drivers/nvc0 | |
parent | 09a00a141f8cf1cac1a8907df4f9c1cb1edd939c (diff) |
nv50/nvc0: Build codegen in nv50.
This is required to make libnv50 independent of libnvc0.
Diffstat (limited to 'src/gallium/drivers/nvc0')
-rw-r--r-- | src/gallium/drivers/nvc0/Makefile.sources | 6 | ||||
-rw-r--r-- | src/gallium/drivers/nvc0/codegen/nv50_ir_lowering_nvc0.cpp | 2 | ||||
-rw-r--r-- | src/gallium/drivers/nvc0/nvc0_miptree.c | 26 |
3 files changed, 3 insertions, 31 deletions
diff --git a/src/gallium/drivers/nvc0/Makefile.sources b/src/gallium/drivers/nvc0/Makefile.sources index 82504bf9849..d0e213b40af 100644 --- a/src/gallium/drivers/nvc0/Makefile.sources +++ b/src/gallium/drivers/nvc0/Makefile.sources @@ -14,9 +14,3 @@ C_SOURCES := \ nvc0_program.c \ nvc0_shader_state.c \ nvc0_query.c - -CPP_SOURCES := \ - codegen/nv50_ir_emit_gk110.cpp \ - codegen/nv50_ir_emit_nvc0.cpp \ - codegen/nv50_ir_lowering_nvc0.cpp \ - codegen/nv50_ir_target_nvc0.cpp diff --git a/src/gallium/drivers/nvc0/codegen/nv50_ir_lowering_nvc0.cpp b/src/gallium/drivers/nvc0/codegen/nv50_ir_lowering_nvc0.cpp index 749ace5d81c..c5a7772ed9f 100644 --- a/src/gallium/drivers/nvc0/codegen/nv50_ir_lowering_nvc0.cpp +++ b/src/gallium/drivers/nvc0/codegen/nv50_ir_lowering_nvc0.cpp @@ -1096,7 +1096,7 @@ NVC0LoweringPass::visit(Instruction *i) break; default: break; - } + } return true; } diff --git a/src/gallium/drivers/nvc0/nvc0_miptree.c b/src/gallium/drivers/nvc0/nvc0_miptree.c index b63f196eecd..dd415d0ef6c 100644 --- a/src/gallium/drivers/nvc0/nvc0_miptree.c +++ b/src/gallium/drivers/nvc0/nvc0_miptree.c @@ -28,32 +28,10 @@ #include "nvc0_context.h" #include "nvc0_resource.h" -uint32_t +static uint32_t nvc0_tex_choose_tile_dims(unsigned nx, unsigned ny, unsigned nz) { - uint32_t tile_mode = 0x000; - - if (ny > 64) tile_mode = 0x040; /* height 128 tiles */ - else - if (ny > 32) tile_mode = 0x030; /* height 64 tiles */ - else - if (ny > 16) tile_mode = 0x020; /* height 32 tiles */ - else - if (ny > 8) tile_mode = 0x010; /* height 16 tiles */ - - if (nz == 1) - return tile_mode; - else - if (tile_mode > 0x020) - tile_mode = 0x020; - - if (nz > 16 && tile_mode < 0x020) - return tile_mode | 0x500; /* depth 32 tiles */ - if (nz > 8) return tile_mode | 0x400; /* depth 16 tiles */ - if (nz > 4) return tile_mode | 0x300; /* depth 8 tiles */ - if (nz > 2) return tile_mode | 0x200; /* depth 4 tiles */ - - return tile_mode | 0x100; + return nv50_tex_choose_tile_dims_helper(nx, ny, nz); } static uint32_t |