llvmpipe: use c11 alignas instead of PIPE_ALIGN_VAR
Reviewed-by: Jesse Natalie <jenatali@microsoft.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16908>
This commit is contained in:
parent
3c82e23f9a
commit
69d2d38f6e
|
@ -232,7 +232,7 @@ check_linear_interp_mask_a(struct lp_fragment_shader_variant *variant)
|
|||
struct lp_linear_sampler samp[LP_MAX_LINEAR_TEXTURES];
|
||||
struct lp_linear_interp interp[LP_MAX_LINEAR_INPUTS];
|
||||
uint8_t constants[LP_MAX_LINEAR_CONSTANTS][4];
|
||||
PIPE_ALIGN_VAR(16) uint8_t color0[TILE_SIZE*4];
|
||||
alignas(16) uint8_t color0[TILE_SIZE*4];
|
||||
|
||||
int nr_inputs = info->base.file_max[TGSI_FILE_INPUT]+1;
|
||||
int nr_tex = info->num_texs;
|
||||
|
|
|
@ -29,8 +29,8 @@ struct lp_linear_sampler {
|
|||
int width;
|
||||
boolean axis_aligned;
|
||||
|
||||
PIPE_ALIGN_VAR(16) uint32_t row[64];
|
||||
PIPE_ALIGN_VAR(16) uint32_t stretched_row[2][64];
|
||||
alignas(16) uint32_t row[64];
|
||||
alignas(16) uint32_t stretched_row[2][64];
|
||||
|
||||
/**
|
||||
* y coordinate of the rows stored in the stretched_row.
|
||||
|
@ -60,7 +60,7 @@ struct lp_linear_interp {
|
|||
|
||||
int width; /* rounded up to multiple of 4 */
|
||||
|
||||
PIPE_ALIGN_VAR(16) uint32_t row[64];
|
||||
alignas(16) uint32_t row[64];
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -31,6 +31,6 @@
|
|||
|
||||
/* A single dummy tile used in a couple of out-of-memory situations.
|
||||
*/
|
||||
PIPE_ALIGN_VAR(LP_MIN_VECTOR_ALIGN)
|
||||
alignas(LP_MIN_VECTOR_ALIGN)
|
||||
uint8_t lp_dummy_tile[TILE_SIZE * TILE_SIZE * 4];
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
#include "lp_limits.h"
|
||||
#include "gallivm/lp_bld_type.h"
|
||||
|
||||
extern PIPE_ALIGN_VAR(LP_MIN_VECTOR_ALIGN)
|
||||
extern alignas(LP_MIN_VECTOR_ALIGN)
|
||||
uint8_t lp_dummy_tile[TILE_SIZE * TILE_SIZE * 4];
|
||||
|
||||
#endif /* LP_MEMORY_H */
|
||||
|
|
|
@ -239,10 +239,10 @@ check_elts24(struct lp_setup_context *setup, const void *vb, int stride)
|
|||
* commands for this triangle list directly. Instead, introduce
|
||||
* some new vertices and feed to the rectangle setup code:
|
||||
*/
|
||||
PIPE_ALIGN_VAR(16) float vA[2][4];
|
||||
PIPE_ALIGN_VAR(16) float vB[2][4];
|
||||
PIPE_ALIGN_VAR(16) float vC[2][4];
|
||||
PIPE_ALIGN_VAR(16) float vD[2][4];
|
||||
alignas(16) float vA[2][4];
|
||||
alignas(16) float vB[2][4];
|
||||
alignas(16) float vC[2][4];
|
||||
alignas(16) float vD[2][4];
|
||||
|
||||
float as, bs;
|
||||
float at, bt;
|
||||
|
|
|
@ -585,7 +585,7 @@ do_triangle_ccw(struct lp_setup_context *setup,
|
|||
__m128i eo, p0, p1, p2;
|
||||
__m128i_union vshuf_mask;
|
||||
__m128i zero = vec_splats((unsigned char) 0);
|
||||
PIPE_ALIGN_VAR(16) int32_t temp_vec[4];
|
||||
alignas(16) int32_t temp_vec[4];
|
||||
|
||||
#if UTIL_ARCH_LITTLE_ENDIAN
|
||||
vshuf_mask.i[0] = 0x07060504;
|
||||
|
@ -1155,7 +1155,7 @@ static void triangle_cw(struct lp_setup_context *setup,
|
|||
const float (*v1)[4],
|
||||
const float (*v2)[4])
|
||||
{
|
||||
PIPE_ALIGN_VAR(16) struct fixed_position position;
|
||||
alignas(16) struct fixed_position position;
|
||||
struct llvmpipe_context *lp_context = (struct llvmpipe_context *)setup->pipe;
|
||||
|
||||
if (lp_context->active_statistics_queries) {
|
||||
|
@ -1181,7 +1181,7 @@ static void triangle_ccw(struct lp_setup_context *setup,
|
|||
const float (*v1)[4],
|
||||
const float (*v2)[4])
|
||||
{
|
||||
PIPE_ALIGN_VAR(16) struct fixed_position position;
|
||||
alignas(16) struct fixed_position position;
|
||||
struct llvmpipe_context *lp_context = (struct llvmpipe_context *)setup->pipe;
|
||||
|
||||
if (lp_context->active_statistics_queries) {
|
||||
|
@ -1202,7 +1202,7 @@ static void triangle_both(struct lp_setup_context *setup,
|
|||
const float (*v1)[4],
|
||||
const float (*v2)[4])
|
||||
{
|
||||
PIPE_ALIGN_VAR(16) struct fixed_position position;
|
||||
alignas(16) struct fixed_position position;
|
||||
struct llvmpipe_context *lp_context = (struct llvmpipe_context *)setup->pipe;
|
||||
|
||||
if (lp_context->active_statistics_queries) {
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
|
||||
|
||||
struct nearest_sampler {
|
||||
PIPE_ALIGN_VAR(16) uint32_t out[64];
|
||||
alignas(16) uint32_t out[64];
|
||||
|
||||
const struct lp_jit_texture *texture;
|
||||
float fsrc_x; /* src_x0 */
|
||||
|
@ -64,7 +64,7 @@ struct nearest_sampler {
|
|||
|
||||
|
||||
struct linear_interp {
|
||||
PIPE_ALIGN_VAR(16) uint32_t out[64];
|
||||
alignas(16) uint32_t out[64];
|
||||
__m128i a0;
|
||||
__m128i dadx;
|
||||
__m128i dady;
|
||||
|
@ -88,7 +88,7 @@ struct color_blend {
|
|||
* in one place.
|
||||
*/
|
||||
struct shader {
|
||||
PIPE_ALIGN_VAR(16) uint32_t out0[64];
|
||||
alignas(16) uint32_t out0[64];
|
||||
const uint32_t *src0;
|
||||
const uint32_t *src1;
|
||||
__m128i const0;
|
||||
|
|
|
@ -235,8 +235,8 @@ test_one(unsigned verbose,
|
|||
for(i = 0; i < n && success; ++i) {
|
||||
unsigned src_stride = src_type.length*src_type.width/8;
|
||||
unsigned dst_stride = dst_type.length*dst_type.width/8;
|
||||
PIPE_ALIGN_VAR(LP_MIN_VECTOR_ALIGN) uint8_t src[LP_MAX_VECTOR_LENGTH*LP_MAX_VECTOR_LENGTH];
|
||||
PIPE_ALIGN_VAR(LP_MIN_VECTOR_ALIGN) uint8_t dst[LP_MAX_VECTOR_LENGTH*LP_MAX_VECTOR_LENGTH];
|
||||
alignas(LP_MIN_VECTOR_ALIGN) uint8_t src[LP_MAX_VECTOR_LENGTH*LP_MAX_VECTOR_LENGTH];
|
||||
alignas(LP_MIN_VECTOR_ALIGN) uint8_t dst[LP_MAX_VECTOR_LENGTH*LP_MAX_VECTOR_LENGTH];
|
||||
double fref[LP_MAX_VECTOR_LENGTH*LP_MAX_VECTOR_LENGTH];
|
||||
uint8_t ref[LP_MAX_VECTOR_LENGTH*LP_MAX_VECTOR_LENGTH];
|
||||
int64_t start_counter = 0;
|
||||
|
|
|
@ -143,8 +143,8 @@ test_format_float(unsigned verbose, FILE *fp,
|
|||
struct gallivm_state *gallivm;
|
||||
LLVMValueRef fetch = NULL;
|
||||
fetch_ptr_t fetch_ptr;
|
||||
PIPE_ALIGN_VAR(16) uint8_t packed[UTIL_FORMAT_MAX_PACKED_BYTES];
|
||||
PIPE_ALIGN_VAR(16) float unpacked[4];
|
||||
alignas(16) uint8_t packed[UTIL_FORMAT_MAX_PACKED_BYTES];
|
||||
alignas(16) float unpacked[4];
|
||||
boolean first = TRUE;
|
||||
boolean success = TRUE;
|
||||
unsigned i, j, k, l;
|
||||
|
@ -244,7 +244,7 @@ test_format_unorm8(unsigned verbose, FILE *fp,
|
|||
struct gallivm_state *gallivm;
|
||||
LLVMValueRef fetch = NULL;
|
||||
fetch_ptr_t fetch_ptr;
|
||||
PIPE_ALIGN_VAR(16) uint8_t packed[UTIL_FORMAT_MAX_PACKED_BYTES];
|
||||
alignas(16) uint8_t packed[UTIL_FORMAT_MAX_PACKED_BYTES];
|
||||
uint8_t unpacked[4];
|
||||
boolean first = TRUE;
|
||||
boolean success = TRUE;
|
||||
|
|
Loading…
Reference in New Issue