projects
/
mesa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
freedreno/a4xx: remove fd4_shader_stateobj
[mesa.git]
/
src
/
gallium
/
drivers
/
llvmpipe
/
lp_test.h
diff --git
a/src/gallium/drivers/llvmpipe/lp_test.h
b/src/gallium/drivers/llvmpipe/lp_test.h
index 69aaae26e0a72d91dec47902c00caab34ee0478e..3d00b01253cae6d948d4b659b88acd21895bcd2d 100644
(file)
--- a/
src/gallium/drivers/llvmpipe/lp_test.h
+++ b/
src/gallium/drivers/llvmpipe/lp_test.h
@@
-41,19
+41,17
@@
#include <stdio.h>
#include <float.h>
#include <stdio.h>
#include <float.h>
-#include <llvm-c/Core.h>
-#include <llvm-c/Analysis.h>
-#include <llvm-c/ExecutionEngine.h>
-#include <llvm-c/Target.h>
-#include <llvm-c/BitWriter.h>
-#include <llvm-c/Transforms/Scalar.h>
+#include "gallivm/lp_bld.h"
#include "pipe/p_state.h"
#include "util/u_format.h"
#include "util/u_math.h"
#include "pipe/p_state.h"
#include "util/u_format.h"
#include "util/u_math.h"
-#include "util/u_d
ebug_d
ump.h"
+#include "util/u_dump.h"
-#include "lp_bld_type.h"
+#include "gallivm/lp_bld_type.h"
+
+
+#define LP_TEST_NUM_SAMPLES 32
void
void
@@
-61,24
+59,37
@@
write_tsv_header(FILE *fp);
boolean
boolean
-test_some(unsigned verbose, FILE *fp, unsigned long n);
+test_some(unsigned verbose, FILE *fp,
+ unsigned long n);
+boolean
+test_single(unsigned verbose, FILE *fp);
boolean
test_all(unsigned verbose, FILE *fp);
boolean
test_all(unsigned verbose, FILE *fp);
-static INLINE uint64_t
+#if defined(PIPE_CC_MSVC)
+
+#include <intrin.h>
+#define rdtsc() __rdtsc()
+
+#elif defined(PIPE_CC_GCC) && (defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64))
+
+static inline uint64_t
rdtsc(void)
{
rdtsc(void)
{
-#if defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64)
uint32_t hi, lo;
__asm__ __volatile__ ("rdtsc" : "=a"(lo), "=d"(hi));
return ((uint64_t)lo) | (((uint64_t)hi) << 32);
uint32_t hi, lo;
__asm__ __volatile__ ("rdtsc" : "=a"(lo), "=d"(hi));
return ((uint64_t)lo) | (((uint64_t)hi) << 32);
+}
+
#else
#else
- return 0;
+
+#define rdtsc() 0
+
#endif
#endif
-}
+
float
float
@@
-86,43
+97,43
@@
random_float(void);
void
void
-dump_type(FILE *fp,
union
lp_type type);
+dump_type(FILE *fp,
struct
lp_type type);
double
double
-read_elem(
union
lp_type type, const void *src, unsigned index);
+read_elem(
struct
lp_type type, const void *src, unsigned index);
void
void
-write_elem(
union
lp_type type, void *dst, unsigned index, double src);
+write_elem(
struct
lp_type type, void *dst, unsigned index, double src);
void
void
-random_elem(
union
lp_type type, void *dst, unsigned index);
+random_elem(
struct
lp_type type, void *dst, unsigned index);
void
void
-read_vec(
union
lp_type type, const void *src, double *dst);
+read_vec(
struct
lp_type type, const void *src, double *dst);
void
void
-write_vec(
union
lp_type type, void *dst, const double *src);
+write_vec(
struct
lp_type type, void *dst, const double *src);
void
void
-random_vec(
union
lp_type type, void *dst);
+random_vec(
struct
lp_type type, void *dst);
boolean
boolean
-compare_vec_with_eps(
union
lp_type type, const void *res, const void *ref, double eps);
+compare_vec_with_eps(
struct
lp_type type, const void *res, const void *ref, double eps);
boolean
boolean
-compare_vec(
union
lp_type type, const void *res, const void *ref);
+compare_vec(
struct
lp_type type, const void *res, const void *ref);
void
void
-dump_vec(FILE *fp,
union
lp_type type, const void *src);
+dump_vec(FILE *fp,
struct
lp_type type, const void *src);
#endif /* !LP_TEST_H */
#endif /* !LP_TEST_H */