Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • wine/vkd3d
  • stefan/vkd3d
  • cmccarthy/vkd3d
  • giomasce/vkd3d
  • fcasas/vkd3d
  • jactry/vkd3d
  • ReDress/vkd3d
  • mstorsjo/vkd3d
  • huw/vkd3d
  • julliard/vkd3d
  • bshanks/vkd3d
  • zfigura/vkd3d
  • hverbeet/vkd3d
  • DarkShadow44/vkd3d
  • nsivov/vkd3d
  • dhary686/vkd3d
  • Mystral/vkd3d
  • maljaf/vkd3d
  • smcv/vkd3d
  • flibitijibibo/vkd3d
  • q4a/vkd3d
  • jsikorski/vkd3d
  • alesliehughes/vkd3d-alesliehughes
  • vitorhnn/vkd3d
  • agusev/vkd3d
  • etang-cw/vkd3d
  • petrathekat/vkd3d
  • simon.mr995/vkd3d
  • sgwaki/vkd3d
  • jacek/vkd3d
  • fweimer/vkd3d
  • Clara/vkd3d
  • disini/vkd3d
  • antenabr2/vkd3d
  • gilvbp/vkd3d
  • yshui/vkd3d
  • shaunren/vkd3d
  • jennetsaryyewa96/vkd3d
  • Jamesattay/vkd3d
  • zacemmneeto77/vkd3d
  • GermanAizek/vkd3d
  • opespinach/vkd3d
  • ruslanboyka201/vkd3d
  • navi/vkd3d
  • Feifan/vkd3d
  • yashmhmdly172/vkd3d
  • Sec32fun32/vkd3d
  • ritalat/vkd3d
  • ivyl/vkd3d
  • baikaishiuc/vkd3d
  • austin987/vkd3d
  • TornadoCookie/vkd3d
52 results
Show changes
Commits on Source (60)
Showing
with 6947 additions and 3783 deletions
......@@ -44,6 +44,7 @@ vkd3d_cross_tests = \
vkd3d_shader_tests = \
tests/abs.shader_test \
tests/all.shader_test \
tests/any.shader_test \
tests/arithmetic-float.shader_test \
tests/arithmetic-float-uniform.shader_test \
tests/arithmetic-int.shader_test \
......@@ -65,6 +66,7 @@ vkd3d_shader_tests = \
tests/distance.shader_test \
tests/entry-point-semantics.shader_test \
tests/exp.shader_test \
tests/expr-indexing.shader_test \
tests/floor.shader_test \
tests/frac.shader_test \
tests/function-return.shader_test \
......@@ -94,6 +96,7 @@ vkd3d_shader_tests = \
tests/hlsl-initializer-struct.shader_test \
tests/hlsl-intrinsic-override.shader_test \
tests/hlsl-invalid.shader_test \
tests/hlsl-is-front-face.shader_test \
tests/hlsl-ldexp.shader_test \
tests/hlsl-length.shader_test \
tests/hlsl-lerp.shader_test \
......@@ -122,6 +125,7 @@ vkd3d_shader_tests = \
tests/hlsl-vector-indexing.shader_test \
tests/hlsl-vector-indexing-uniform.shader_test \
tests/lit.shader_test \
tests/log.shader_test \
tests/logic-operations.shader_test \
tests/majority-syntax.shader_test \
tests/math.shader_test \
......@@ -130,6 +134,7 @@ vkd3d_shader_tests = \
tests/minimum-precision.shader_test \
tests/multiple-rt.shader_test \
tests/nointerpolation.shader_test \
tests/object-field-offsets.shader_test \
tests/object-references.shader_test \
tests/pow.shader_test \
tests/preproc-if.shader_test \
......@@ -146,6 +151,7 @@ vkd3d_shader_tests = \
tests/sampler-offset.shader_test \
tests/saturate.shader_test \
tests/shader-interstage-interface.shader_test \
tests/side-effects.shader_test \
tests/sqrt.shader_test \
tests/step.shader_test \
tests/swizzle-constant-prop.shader_test \
......@@ -250,12 +256,10 @@ libvkd3d_shader_la_SOURCES = \
libs/vkd3d-shader/hlsl.h \
libs/vkd3d-shader/hlsl_codegen.c \
libs/vkd3d-shader/hlsl_constant_ops.c \
libs/vkd3d-shader/hlsl_sm1.c \
libs/vkd3d-shader/hlsl_sm4.c \
libs/vkd3d-shader/ir.c \
libs/vkd3d-shader/preproc.h \
libs/vkd3d-shader/sm4.h \
libs/vkd3d-shader/spirv.c \
libs/vkd3d-shader/tpf.c \
libs/vkd3d-shader/trace.c \
libs/vkd3d-shader/vkd3d_shader.map \
libs/vkd3d-shader/vkd3d_shader_main.c \
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -24,7 +24,9 @@
#include "rbtree.h"
#include "vkd3d_d3dcommon.h"
#include "vkd3d_d3dx9shader.h"
#include "sm4.h"
enum vkd3d_sm4_register_type;
enum vkd3d_sm4_swizzle_type;
/* The general IR structure is inspired by Mesa GLSL hir, even though the code
* ends up being quite different in practice. Anyway, here comes the relevant
......@@ -254,6 +256,7 @@ enum hlsl_ir_node_type
HLSL_IR_CONSTANT,
HLSL_IR_EXPR,
HLSL_IR_IF,
HLSL_IR_INDEX,
HLSL_IR_LOAD,
HLSL_IR_LOOP,
HLSL_IR_JUMP,
......@@ -450,8 +453,8 @@ struct hlsl_ir_if
{
struct hlsl_ir_node node;
struct hlsl_src condition;
struct hlsl_block then_instrs;
struct hlsl_block else_instrs;
struct hlsl_block then_block;
struct hlsl_block else_block;
};
struct hlsl_ir_loop
......@@ -544,6 +547,12 @@ struct hlsl_ir_swizzle
DWORD swizzle;
};
struct hlsl_ir_index
{
struct hlsl_ir_node node;
struct hlsl_src val, idx;
};
/* Reference to a variable, or a part of it (e.g. a vector within a matrix within a struct). */
struct hlsl_deref
{
......@@ -787,7 +796,7 @@ struct hlsl_resource_load_params
{
struct hlsl_type *format;
enum hlsl_resource_load_type type;
struct hlsl_deref resource, sampler;
struct hlsl_ir_node *resource, *sampler;
struct hlsl_ir_node *coords, *lod, *texel_offset;
};
......@@ -857,6 +866,12 @@ static inline struct hlsl_ir_swizzle *hlsl_ir_swizzle(const struct hlsl_ir_node
return CONTAINING_RECORD(node, struct hlsl_ir_swizzle, node);
}
static inline struct hlsl_ir_index *hlsl_ir_index(const struct hlsl_ir_node *node)
{
assert(node->type == HLSL_IR_INDEX);
return CONTAINING_RECORD(node, struct hlsl_ir_index, node);
}
static inline void hlsl_block_init(struct hlsl_block *block)
{
list_init(&block->instrs);
......@@ -1001,6 +1016,7 @@ struct hlsl_ir_load *hlsl_add_conditional(struct hlsl_ctx *ctx, struct list *ins
void hlsl_add_function(struct hlsl_ctx *ctx, char *name, struct hlsl_ir_function_decl *decl);
bool hlsl_add_var(struct hlsl_ctx *ctx, struct hlsl_ir_var *decl, bool local_var);
void hlsl_block_cleanup(struct hlsl_block *block);
bool hlsl_clone_block(struct hlsl_ctx *ctx, struct hlsl_block *dst_block, const struct hlsl_block *src_block);
void hlsl_dump_function(struct hlsl_ctx *ctx, const struct hlsl_ir_function_decl *func);
......@@ -1008,6 +1024,7 @@ void hlsl_dump_function(struct hlsl_ctx *ctx, const struct hlsl_ir_function_decl
int hlsl_emit_bytecode(struct hlsl_ctx *ctx, struct hlsl_ir_function_decl *entry_func,
enum vkd3d_shader_target_type target_type, struct vkd3d_shader_code *out);
bool hlsl_init_deref_from_index_chain(struct hlsl_ctx *ctx, struct hlsl_deref *deref, struct hlsl_ir_node *chain);
bool hlsl_copy_deref(struct hlsl_ctx *ctx, struct hlsl_deref *deref, const struct hlsl_deref *other);
void hlsl_cleanup_deref(struct hlsl_deref *deref);
......@@ -1034,36 +1051,37 @@ const char *hlsl_jump_type_to_string(enum hlsl_ir_jump_type type);
struct hlsl_type *hlsl_new_array_type(struct hlsl_ctx *ctx, struct hlsl_type *basic_type, unsigned int array_size);
struct hlsl_ir_node *hlsl_new_binary_expr(struct hlsl_ctx *ctx, enum hlsl_ir_expr_op op, struct hlsl_ir_node *arg1,
struct hlsl_ir_node *arg2);
struct hlsl_ir_constant *hlsl_new_bool_constant(struct hlsl_ctx *ctx, bool b, const struct vkd3d_shader_location *loc);
struct hlsl_ir_node *hlsl_new_bool_constant(struct hlsl_ctx *ctx, bool b, const struct vkd3d_shader_location *loc);
struct hlsl_buffer *hlsl_new_buffer(struct hlsl_ctx *ctx, enum hlsl_buffer_type type, const char *name,
const struct hlsl_reg_reservation *reservation, struct vkd3d_shader_location loc);
const struct hlsl_reg_reservation *reservation, const struct vkd3d_shader_location *loc);
struct hlsl_ir_node *hlsl_new_call(struct hlsl_ctx *ctx, struct hlsl_ir_function_decl *decl,
const struct vkd3d_shader_location *loc);
struct hlsl_ir_expr *hlsl_new_cast(struct hlsl_ctx *ctx, struct hlsl_ir_node *node, struct hlsl_type *type,
struct hlsl_ir_node *hlsl_new_cast(struct hlsl_ctx *ctx, struct hlsl_ir_node *node, struct hlsl_type *type,
const struct vkd3d_shader_location *loc);
struct hlsl_ir_constant *hlsl_new_constant(struct hlsl_ctx *ctx, struct hlsl_type *type,
const struct vkd3d_shader_location *loc);
struct hlsl_ir_expr *hlsl_new_copy(struct hlsl_ctx *ctx, struct hlsl_ir_node *node);
struct hlsl_ir_node *hlsl_new_copy(struct hlsl_ctx *ctx, struct hlsl_ir_node *node);
struct hlsl_ir_node *hlsl_new_expr(struct hlsl_ctx *ctx, enum hlsl_ir_expr_op op,
struct hlsl_ir_node *operands[HLSL_MAX_OPERANDS],
struct hlsl_type *data_type, const struct vkd3d_shader_location *loc);
struct hlsl_ir_constant *hlsl_new_float_constant(struct hlsl_ctx *ctx,
struct hlsl_ir_node *hlsl_new_float_constant(struct hlsl_ctx *ctx,
float f, const struct vkd3d_shader_location *loc);
struct hlsl_ir_function_decl *hlsl_new_func_decl(struct hlsl_ctx *ctx,
struct hlsl_type *return_type, const struct hlsl_func_parameters *parameters,
const struct hlsl_semantic *semantic, const struct vkd3d_shader_location *loc);
struct hlsl_ir_if *hlsl_new_if(struct hlsl_ctx *ctx, struct hlsl_ir_node *condition, struct vkd3d_shader_location loc);
struct hlsl_ir_constant *hlsl_new_int_constant(struct hlsl_ctx *ctx, int n,
const struct vkd3d_shader_location *loc);
struct hlsl_ir_jump *hlsl_new_jump(struct hlsl_ctx *ctx, enum hlsl_ir_jump_type type, struct vkd3d_shader_location loc);
struct hlsl_ir_node *hlsl_new_if(struct hlsl_ctx *ctx, struct hlsl_ir_node *condition,
struct hlsl_block *then_block, struct hlsl_block *else_block, const struct vkd3d_shader_location *loc);
struct hlsl_ir_node *hlsl_new_int_constant(struct hlsl_ctx *ctx, int32_t n, const struct vkd3d_shader_location *loc);
struct hlsl_ir_node *hlsl_new_jump(struct hlsl_ctx *ctx,
enum hlsl_ir_jump_type type, const struct vkd3d_shader_location *loc);
void hlsl_init_simple_deref_from_var(struct hlsl_deref *deref, struct hlsl_ir_var *var);
struct hlsl_ir_load *hlsl_new_var_load(struct hlsl_ctx *ctx, struct hlsl_ir_var *var,
struct vkd3d_shader_location loc);
const struct vkd3d_shader_location *loc);
struct hlsl_ir_load *hlsl_new_load_index(struct hlsl_ctx *ctx, const struct hlsl_deref *deref,
struct hlsl_ir_node *idx, const struct vkd3d_shader_location *loc);
struct hlsl_ir_load *hlsl_new_load_component(struct hlsl_ctx *ctx, struct hlsl_block *block,
struct hlsl_ir_node *hlsl_new_load_component(struct hlsl_ctx *ctx, struct hlsl_block *block,
const struct hlsl_deref *deref, unsigned int comp, const struct vkd3d_shader_location *loc);
struct hlsl_ir_store *hlsl_new_simple_store(struct hlsl_ctx *ctx, struct hlsl_ir_var *lhs, struct hlsl_ir_node *rhs);
......@@ -1072,7 +1090,11 @@ struct hlsl_ir_store *hlsl_new_store_index(struct hlsl_ctx *ctx, const struct hl
struct hlsl_ir_store *hlsl_new_store_component(struct hlsl_ctx *ctx, struct hlsl_block *block,
const struct hlsl_deref *lhs, unsigned int comp, struct hlsl_ir_node *rhs);
struct hlsl_ir_loop *hlsl_new_loop(struct hlsl_ctx *ctx, struct vkd3d_shader_location loc);
bool hlsl_index_is_noncontiguous(struct hlsl_ir_index *index);
struct hlsl_ir_node *hlsl_new_index(struct hlsl_ctx *ctx, struct hlsl_ir_node *val,
struct hlsl_ir_node *idx, const struct vkd3d_shader_location *loc);
struct hlsl_ir_loop *hlsl_new_loop(struct hlsl_ctx *ctx, const struct vkd3d_shader_location *loc);
struct hlsl_ir_resource_load *hlsl_new_resource_load(struct hlsl_ctx *ctx,
const struct hlsl_resource_load_params *params, const struct vkd3d_shader_location *loc);
struct hlsl_ir_resource_store *hlsl_new_resource_store(struct hlsl_ctx *ctx, const struct hlsl_deref *resource,
......@@ -1089,9 +1111,9 @@ struct hlsl_type *hlsl_new_uav_type(struct hlsl_ctx *ctx, enum hlsl_sampler_dim
struct hlsl_ir_constant *hlsl_new_uint_constant(struct hlsl_ctx *ctx, unsigned int n,
const struct vkd3d_shader_location *loc);
struct hlsl_ir_node *hlsl_new_unary_expr(struct hlsl_ctx *ctx, enum hlsl_ir_expr_op op, struct hlsl_ir_node *arg,
struct vkd3d_shader_location loc);
const struct vkd3d_shader_location *loc);
struct hlsl_ir_var *hlsl_new_var(struct hlsl_ctx *ctx, const char *name, struct hlsl_type *type,
const struct vkd3d_shader_location loc, const struct hlsl_semantic *semantic, unsigned int modifiers,
const struct vkd3d_shader_location *loc, const struct hlsl_semantic *semantic, unsigned int modifiers,
const struct hlsl_reg_reservation *reg_reservation);
void hlsl_error(struct hlsl_ctx *ctx, const struct vkd3d_shader_location *loc,
......@@ -1146,7 +1168,7 @@ int hlsl_sm1_write(struct hlsl_ctx *ctx, struct hlsl_ir_function_decl *entry_fun
bool hlsl_sm4_usage_from_semantic(struct hlsl_ctx *ctx,
const struct hlsl_semantic *semantic, bool output, D3D_NAME *usage);
bool hlsl_sm4_register_from_semantic(struct hlsl_ctx *ctx, const struct hlsl_semantic *semantic,
bool output, enum vkd3d_sm4_register_type *type, enum vkd3d_sm4_swizzle_type *swizzle_type, bool *has_idx);
bool output, unsigned int *type, enum vkd3d_sm4_swizzle_type *swizzle_type, bool *has_idx);
int hlsl_sm4_write(struct hlsl_ctx *ctx, struct hlsl_ir_function_decl *entry_func, struct vkd3d_shader_code *out);
int hlsl_lexer_compile(struct hlsl_ctx *ctx, const struct vkd3d_shader_code *hlsl);
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -6039,6 +6039,7 @@ static void spirv_compiler_emit_dcl_resource(struct spirv_compiler *compiler,
const struct vkd3d_shader_instruction *instruction)
{
const struct vkd3d_shader_semantic *semantic = &instruction->declaration.semantic;
enum vkd3d_shader_resource_type resource_type = semantic->resource_type;
uint32_t flags = instruction->flags;
/* We don't distinguish between APPEND and COUNTER UAVs. */
......@@ -6046,8 +6047,13 @@ static void spirv_compiler_emit_dcl_resource(struct spirv_compiler *compiler,
if (flags)
FIXME("Unhandled UAV flags %#x.\n", flags);
if (resource_type == VKD3D_SHADER_RESOURCE_TEXTURE_2DMS && semantic->sample_count == 1)
resource_type = VKD3D_SHADER_RESOURCE_TEXTURE_2D;
else if (resource_type == VKD3D_SHADER_RESOURCE_TEXTURE_2DMSARRAY && semantic->sample_count == 1)
resource_type = VKD3D_SHADER_RESOURCE_TEXTURE_2DARRAY;
spirv_compiler_emit_resource_declaration(compiler, &semantic->resource,
semantic->resource_type, semantic->resource_data_type[0], 0, false);
resource_type, semantic->resource_data_type[0], 0, false);
}
static void spirv_compiler_emit_dcl_resource_raw(struct spirv_compiler *compiler,
......@@ -8046,7 +8052,7 @@ static void spirv_compiler_emit_ld(struct spirv_compiler *compiler,
image_operands[image_operand_count++] = spirv_compiler_emit_texel_offset(compiler,
instruction, image.resource_type_info);
}
if (multisample)
if (multisample && image.resource_type_info->ms)
{
operands_mask |= SpvImageOperandsSampleMask;
image_operands[image_operand_count++] = spirv_compiler_emit_load_src(compiler,
......
......@@ -1132,6 +1132,8 @@ int vkd3d_shader_sm4_parser_create(const struct vkd3d_shader_compile_info *compi
void free_shader_desc(struct vkd3d_shader_desc *desc);
int shader_extract_from_dxbc(const struct vkd3d_shader_code *dxbc,
struct vkd3d_shader_message_context *message_context, const char *source_name, struct vkd3d_shader_desc *desc);
int shader_parse_input_signature(const struct vkd3d_shader_code *dxbc,
struct vkd3d_shader_message_context *message_context, struct vkd3d_shader_signature *signature);
......
......@@ -3963,10 +3963,12 @@ static void STDMETHODCALLTYPE d3d12_command_list_RSSetViewports(ID3D12GraphicsCo
vk_viewports[i].minDepth = viewports[i].MinDepth;
vk_viewports[i].maxDepth = viewports[i].MaxDepth;
if (!vk_viewports[i].width || !vk_viewports[i].height)
if (vk_viewports[i].width <= 0.0f)
{
FIXME_ONCE("Invalid viewport %u, ignoring RSSetViewports().\n", i);
return;
/* Vulkan does not support width <= 0 */
FIXME_ONCE("Setting invalid viewport %u to zero height.\n", i);
vk_viewports[i].width = 1.0f;
vk_viewports[i].height = 0.0f;
}
}
......@@ -4481,11 +4483,20 @@ static void d3d12_command_list_set_root_cbv(struct d3d12_command_list *list,
root_parameter = root_signature_get_root_descriptor(root_signature, index);
assert(root_parameter->parameter_type == D3D12_ROOT_PARAMETER_TYPE_CBV);
resource = vkd3d_gpu_va_allocator_dereference(&list->device->gpu_va_allocator, gpu_address);
buffer_info.buffer = resource->u.vk_buffer;
buffer_info.offset = gpu_address - resource->gpu_address;
buffer_info.range = resource->desc.Width - buffer_info.offset;
buffer_info.range = min(buffer_info.range, vk_info->device_limits.maxUniformBufferRange);
if (gpu_address)
{
resource = vkd3d_gpu_va_allocator_dereference(&list->device->gpu_va_allocator, gpu_address);
buffer_info.buffer = resource->u.vk_buffer;
buffer_info.offset = gpu_address - resource->gpu_address;
buffer_info.range = resource->desc.Width - buffer_info.offset;
buffer_info.range = min(buffer_info.range, vk_info->device_limits.maxUniformBufferRange);
}
else
{
buffer_info.buffer = list->device->null_resources.vk_buffer;
buffer_info.offset = 0;
buffer_info.range = VK_WHOLE_SIZE;
}
if (vk_info->KHR_push_descriptor)
{
......@@ -4547,13 +4558,13 @@ static void d3d12_command_list_set_root_descriptor(struct d3d12_command_list *li
assert(root_parameter->parameter_type != D3D12_ROOT_PARAMETER_TYPE_CBV);
/* FIXME: Re-use buffer views. */
if (!vkd3d_create_raw_buffer_view(list->device, gpu_address, &vk_buffer_view))
if (!vkd3d_create_raw_buffer_view(list->device, gpu_address, root_parameter->parameter_type, &vk_buffer_view))
{
ERR("Failed to create buffer view.\n");
return;
}
if (!(d3d12_command_allocator_add_buffer_view(list->allocator, vk_buffer_view)))
if (vk_buffer_view && !(d3d12_command_allocator_add_buffer_view(list->allocator, vk_buffer_view)))
{
ERR("Failed to add buffer view.\n");
VK_CALL(vkDestroyBufferView(vk_device, vk_buffer_view, NULL));
......@@ -4644,6 +4655,11 @@ static void STDMETHODCALLTYPE d3d12_command_list_IASetIndexBuffer(ID3D12Graphics
WARN("Ignoring NULL index buffer view.\n");
return;
}
if (!view->BufferLocation)
{
WARN("Ignoring index buffer location 0.\n");
return;
}
vk_procs = &list->device->vk_procs;
......
......@@ -2985,6 +2985,11 @@ void d3d12_desc_create_srv(struct d3d12_desc *descriptor,
switch (desc->ViewDimension)
{
case D3D12_SRV_DIMENSION_TEXTURE1D:
vkd3d_desc.view_type = VK_IMAGE_VIEW_TYPE_1D;
vkd3d_desc.miplevel_idx = desc->u.Texture1D.MostDetailedMip;
vkd3d_desc.miplevel_count = desc->u.Texture1D.MipLevels;
break;
case D3D12_SRV_DIMENSION_TEXTURE2D:
vkd3d_desc.view_type = VK_IMAGE_VIEW_TYPE_2D;
vkd3d_desc.miplevel_idx = desc->u.Texture2D.MostDetailedMip;
......@@ -3210,6 +3215,9 @@ static void vkd3d_create_texture_uav(struct d3d12_desc *descriptor,
{
switch (desc->ViewDimension)
{
case D3D12_UAV_DIMENSION_TEXTURE1D:
vkd3d_desc.miplevel_idx = desc->u.Texture1D.MipSlice;
break;
case D3D12_UAV_DIMENSION_TEXTURE2D:
vkd3d_desc.miplevel_idx = desc->u.Texture2D.MipSlice;
if (desc->u.Texture2D.PlaneSlice)
......@@ -3274,12 +3282,26 @@ void d3d12_desc_create_uav(struct d3d12_desc *descriptor, struct d3d12_device *d
}
bool vkd3d_create_raw_buffer_view(struct d3d12_device *device,
D3D12_GPU_VIRTUAL_ADDRESS gpu_address, VkBufferView *vk_buffer_view)
D3D12_GPU_VIRTUAL_ADDRESS gpu_address, D3D12_ROOT_PARAMETER_TYPE parameter_type, VkBufferView *vk_buffer_view)
{
const struct vkd3d_format *format;
struct d3d12_resource *resource;
format = vkd3d_get_format(device, DXGI_FORMAT_R32_UINT, false);
if (!gpu_address)
{
if (device->vk_info.EXT_robustness2)
{
*vk_buffer_view = VK_NULL_HANDLE;
return true;
}
WARN("Creating null buffer view.\n");
return vkd3d_create_vk_buffer_view(device, parameter_type == D3D12_ROOT_PARAMETER_TYPE_UAV
? device->null_resources.vk_storage_buffer : device->null_resources.vk_buffer,
format, 0, VK_WHOLE_SIZE, vk_buffer_view);
}
resource = vkd3d_gpu_va_allocator_dereference(&device->gpu_va_allocator, gpu_address);
assert(d3d12_resource_is_buffer(resource));
return vkd3d_create_vk_buffer_view(device, resource->u.vk_buffer, format,
......
......@@ -762,7 +762,7 @@ void d3d12_desc_create_sampler(struct d3d12_desc *sampler, struct d3d12_device *
void d3d12_desc_write_atomic(struct d3d12_desc *dst, const struct d3d12_desc *src, struct d3d12_device *device);
bool vkd3d_create_raw_buffer_view(struct d3d12_device *device,
D3D12_GPU_VIRTUAL_ADDRESS gpu_address, VkBufferView *vk_buffer_view);
D3D12_GPU_VIRTUAL_ADDRESS gpu_address, D3D12_ROOT_PARAMETER_TYPE parameter_type, VkBufferView *vk_buffer_view);
HRESULT vkd3d_create_static_sampler(struct d3d12_device *device,
const D3D12_STATIC_SAMPLER_DESC *desc, VkSampler *vk_sampler);
......
This diff is collapsed.
% Uppercase register set names
[pixel shader]
cbuffer Constants : register(B1)
{
};
Texture2D tex : register(T1);
float4 foo : register(C0);
float4 main() : sv_target
{
return foo;
}
[test]
uniform 0 float4 1.0 2.0 3.0 4.0
draw quad
probe all rgba (1.0, 2.0, 3.0, 4.0)
[pixel shader]
// Test empty constant buffer.
cbuffer Constants : register(b1)
......@@ -16,7 +34,6 @@ uniform 0 float4 1.0 2.0 3.0 4.0
draw quad
probe all rgba (1.0, 2.0, 3.0, 4.0)
% SM1 buffer offset allocation follows different rules than SM4.
% Those would have to be tested separately.
[require]
......@@ -139,7 +156,7 @@ float4 main() : sv_target
cbuffer buffer
{
float4 a : packoffset(c1);
float4 b : packoffset(c2);
float4 b : packoffset(C2);
}
float4 main() : sv_target
......@@ -611,7 +628,7 @@ float4 main() : sv_target
cbuffer buffer
{
float4 foo : packoffset(c0);
Texture2D tex : register(t1);
Texture2D tex : register(T1);
}
float4 main() : sv_target
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.