Commit 2173447c authored by Alyssa Rosenzweig's avatar Alyssa Rosenzweig 💜

Merge branch 'wip/build-with-panloader' into 'disasm-midgard'

Build system fixes

See merge request !3
parents 9d7fc96f 7d2ceb76
# TODO (for all of these): Is this the style we want?
[meson.build]
[{meson.build,meson_options.txt}]
indent_style = space
indent_size = 4
......
......@@ -1205,7 +1205,7 @@ void DumpClause(uint32_t *words, unsigned *size)
}
}
void DisassembleBifrost(uint8_t* instBlob, uint32_t size)
void DisassembleBifrost(uint8_t* instBlob, size_t size)
{
uint32_t *words = (uint32_t *) instBlob;
uint32_t *wordsEnd = words + (size / 4);
......
srcs = [
bin_srcs = [
'Main.cpp',
]
lib_srcs = [
'BifrostDisasm.cpp',
't6xx/disassemble.c',
't6xx/hfloat.c',
]
executable(
'disasm',
srcs,
include_directories: inc,
install: true,
)
if buildkind_opt.contains('bin')
executable(
'disasm',
bin_srcs + lib_srcs,
include_directories: inc,
install: true,
)
endif
if buildkind_opt.contains('lib')
spd_lib = static_library(
'spd-disasm',
lib_srcs,
include_directories: inc,
install: true,
)
pkg = import('pkgconfig')
pkg.generate(
description: 'Disassembly libraries and utilities for Midgard and Bifrost',
libraries: spd_lib,
name: 'ShaderProgramDisassembler',
subdirs: 'panfrost',
# TODO: url
version: '0.0',
)
endif
......@@ -895,7 +895,7 @@ static void print_texture_word(uint32_t* word, unsigned tabs)
printf("// (!) unknown7 = %d\n", texture->unknown7);
}
void DisassembleMidgard(uint8_t* code, uint32_t size)
void DisassembleMidgard(uint8_t* code, size_t size)
{
uint32_t* words = (uint32_t *) code;
unsigned num_words = size / 4;
......
#pragma once
#include <stdint.h>
void DisassembleBifrost(uint8_t* instBlob, uint32_t size);
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
void DisassembleMidgard(uint8_t* instBlob, uint32_t size);
void DisassembleBifrost(uint8_t* instBlob, size_t size);
void DisassembleMidgard(uint8_t* instBlob, size_t size);
#ifdef __cplusplus
};
......
......@@ -16,5 +16,7 @@ endif
inc = include_directories('include')
buildkind_opt = get_option('buildkind')
subdir('Source')
subdir('include')
option(
'buildkind',
type : 'array',
choices: ['lib', 'bin'],
value : ['lib', 'bin'],
description : 'Whether to build disassemblers as libraries or binaries'
)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment