mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader: Fix compiler warning.
vkd3d-shader/tpf.c:3810:39: warning: passing argument 2 of ‘sm4_register_from_node’ from incompatible pointer type [-Wincompatible-pointer-types] vkd3d-shader/tpf.c:4750:59: warning: passing argument 3 of ‘sm4_register_from_deref’ from incompatible pointer type [-Wincompatible-pointer-types] Change to use uint32_t as requested.
This commit is contained in:
parent
c92772657f
commit
71715cc434
Notes:
Alexandre Julliard
2023-10-05 22:36:04 +02:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Francisco Casas (@fcasas) Approved-by: Zebediah Figura (@zfigura) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/385
@ -13,7 +13,7 @@ mkdir build
|
|||||||
cd build
|
cd build
|
||||||
mkdir vulkan-headers
|
mkdir vulkan-headers
|
||||||
cp -r /usr/include/vulkan /usr/include/vk_video /usr/include/spirv vulkan-headers
|
cp -r /usr/include/vulkan /usr/include/vk_video /usr/include/spirv vulkan-headers
|
||||||
../configure --enable-demos --disable-doxygen-doc --without-ncurses --host=$HOST SONAME_LIBVULKAN="vulkan-1.dll" CPPFLAGS="-I$PWD/vulkan-headers" CFLAGS="-g -O2 -Wno-format -Wno-array-bounds -Wno-incompatible-pointer-types -Werror" LDFLAGS="-static-libgcc" && \
|
../configure --enable-demos --disable-doxygen-doc --without-ncurses --host=$HOST SONAME_LIBVULKAN="vulkan-1.dll" CPPFLAGS="-I$PWD/vulkan-headers" CFLAGS="-g -O2 -Wno-format -Wno-array-bounds -Werror" LDFLAGS="-static-libgcc" && \
|
||||||
make -j$(nproc) && \
|
make -j$(nproc) && \
|
||||||
make -j$(nproc) install DESTDIR="$PWD/destdir" || \
|
make -j$(nproc) install DESTDIR="$PWD/destdir" || \
|
||||||
touch ../pipeline_failed
|
touch ../pipeline_failed
|
||||||
|
@ -3645,7 +3645,7 @@ struct sm4_instruction
|
|||||||
};
|
};
|
||||||
|
|
||||||
static void sm4_register_from_deref(struct hlsl_ctx *ctx, struct vkd3d_shader_register *reg,
|
static void sm4_register_from_deref(struct hlsl_ctx *ctx, struct vkd3d_shader_register *reg,
|
||||||
unsigned int *writemask, const struct hlsl_deref *deref)
|
uint32_t *writemask, const struct hlsl_deref *deref)
|
||||||
{
|
{
|
||||||
const struct hlsl_type *data_type = hlsl_deref_get_type(ctx, deref);
|
const struct hlsl_type *data_type = hlsl_deref_get_type(ctx, deref);
|
||||||
const struct hlsl_ir_var *var = deref->var;
|
const struct hlsl_ir_var *var = deref->var;
|
||||||
@ -3774,7 +3774,8 @@ static void sm4_register_from_deref(struct hlsl_ctx *ctx, struct vkd3d_shader_re
|
|||||||
static void sm4_src_from_deref(const struct tpf_writer *tpf, struct vkd3d_shader_src_param *src,
|
static void sm4_src_from_deref(const struct tpf_writer *tpf, struct vkd3d_shader_src_param *src,
|
||||||
const struct hlsl_deref *deref, unsigned int map_writemask)
|
const struct hlsl_deref *deref, unsigned int map_writemask)
|
||||||
{
|
{
|
||||||
unsigned int writemask, hlsl_swizzle;
|
unsigned int hlsl_swizzle;
|
||||||
|
uint32_t writemask;
|
||||||
|
|
||||||
sm4_register_from_deref(tpf->ctx, &src->reg, &writemask, deref);
|
sm4_register_from_deref(tpf->ctx, &src->reg, &writemask, deref);
|
||||||
if (vkd3d_sm4_get_default_swizzle_type(&tpf->lookup, src->reg.type) == VKD3D_SM4_SWIZZLE_VEC4)
|
if (vkd3d_sm4_get_default_swizzle_type(&tpf->lookup, src->reg.type) == VKD3D_SM4_SWIZZLE_VEC4)
|
||||||
@ -3784,7 +3785,7 @@ static void sm4_src_from_deref(const struct tpf_writer *tpf, struct vkd3d_shader
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sm4_register_from_node(struct vkd3d_shader_register *reg, unsigned int *writemask,
|
static void sm4_register_from_node(struct vkd3d_shader_register *reg, uint32_t *writemask,
|
||||||
const struct hlsl_ir_node *instr)
|
const struct hlsl_ir_node *instr)
|
||||||
{
|
{
|
||||||
assert(instr->reg.allocated);
|
assert(instr->reg.allocated);
|
||||||
@ -3826,9 +3827,10 @@ static void sm4_src_from_constant_value(struct vkd3d_shader_src_param *src,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void sm4_src_from_node(const struct tpf_writer *tpf, struct vkd3d_shader_src_param *src,
|
static void sm4_src_from_node(const struct tpf_writer *tpf, struct vkd3d_shader_src_param *src,
|
||||||
const struct hlsl_ir_node *instr, unsigned int map_writemask)
|
const struct hlsl_ir_node *instr, uint32_t map_writemask)
|
||||||
{
|
{
|
||||||
unsigned int writemask, hlsl_swizzle;
|
unsigned int hlsl_swizzle;
|
||||||
|
uint32_t writemask;
|
||||||
|
|
||||||
if (instr->type == HLSL_IR_CONSTANT)
|
if (instr->type == HLSL_IR_CONSTANT)
|
||||||
{
|
{
|
||||||
@ -5470,7 +5472,7 @@ static void write_sm4_store(const struct tpf_writer *tpf, const struct hlsl_ir_s
|
|||||||
{
|
{
|
||||||
const struct hlsl_ir_node *rhs = store->rhs.node;
|
const struct hlsl_ir_node *rhs = store->rhs.node;
|
||||||
struct sm4_instruction instr;
|
struct sm4_instruction instr;
|
||||||
unsigned int writemask;
|
uint32_t writemask;
|
||||||
|
|
||||||
memset(&instr, 0, sizeof(instr));
|
memset(&instr, 0, sizeof(instr));
|
||||||
instr.opcode = VKD3D_SM4_OP_MOV;
|
instr.opcode = VKD3D_SM4_OP_MOV;
|
||||||
@ -5487,8 +5489,9 @@ static void write_sm4_store(const struct tpf_writer *tpf, const struct hlsl_ir_s
|
|||||||
|
|
||||||
static void write_sm4_swizzle(const struct tpf_writer *tpf, const struct hlsl_ir_swizzle *swizzle)
|
static void write_sm4_swizzle(const struct tpf_writer *tpf, const struct hlsl_ir_swizzle *swizzle)
|
||||||
{
|
{
|
||||||
unsigned int writemask, hlsl_swizzle;
|
unsigned int hlsl_swizzle;
|
||||||
struct sm4_instruction instr;
|
struct sm4_instruction instr;
|
||||||
|
uint32_t writemask;
|
||||||
|
|
||||||
memset(&instr, 0, sizeof(instr));
|
memset(&instr, 0, sizeof(instr));
|
||||||
instr.opcode = VKD3D_SM4_OP_MOV;
|
instr.opcode = VKD3D_SM4_OP_MOV;
|
||||||
|
@ -758,7 +758,7 @@ void vsir_register_init(struct vkd3d_shader_register *reg, enum vkd3d_shader_reg
|
|||||||
struct vkd3d_shader_dst_param
|
struct vkd3d_shader_dst_param
|
||||||
{
|
{
|
||||||
struct vkd3d_shader_register reg;
|
struct vkd3d_shader_register reg;
|
||||||
DWORD write_mask;
|
uint32_t write_mask;
|
||||||
DWORD modifiers;
|
DWORD modifiers;
|
||||||
DWORD shift;
|
DWORD shift;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user