mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
tests/shader_runner: Use resource->width instead of resource->size for buffer width.
This commit is contained in:
parent
76ae871f5b
commit
fa570ee1f3
Notes:
Henri Verbeet
2024-07-11 00:41:24 +02:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/924
@ -622,7 +622,6 @@ void init_resource(struct resource *resource, const struct resource_params *para
|
||||
resource->dimension = params->dimension;
|
||||
resource->slot = params->slot;
|
||||
resource->format = params->format;
|
||||
resource->size = params->data_size;
|
||||
resource->texel_size = params->texel_size;
|
||||
resource->width = params->width;
|
||||
resource->height = params->height;
|
||||
@ -934,6 +933,7 @@ static void parse_test_directive(struct shader_runner *runner, const char *line)
|
||||
params.slot = 0;
|
||||
params.type = RESOURCE_TYPE_VERTEX_BUFFER;
|
||||
params.dimension = RESOURCE_DIMENSION_BUFFER;
|
||||
params.width = sizeof(quad);
|
||||
params.data = malloc(sizeof(quad));
|
||||
memcpy(params.data, quad, sizeof(quad));
|
||||
params.data_size = sizeof(quad);
|
||||
@ -1671,6 +1671,9 @@ void run_shader_tests(struct shader_runner *runner, const struct shader_runner_c
|
||||
break;
|
||||
|
||||
case STATE_RESOURCE:
|
||||
if (current_resource.type == RESOURCE_TYPE_VERTEX_BUFFER)
|
||||
current_resource.width = current_resource.data_size;
|
||||
|
||||
/* Not every backend supports every resource type
|
||||
* (specifically, D3D9 doesn't support UAVs and
|
||||
* textures with data type other than float). */
|
||||
|
@ -111,7 +111,6 @@ struct resource
|
||||
enum resource_dimension dimension;
|
||||
|
||||
DXGI_FORMAT format;
|
||||
unsigned int size;
|
||||
unsigned int texel_size;
|
||||
unsigned int width, height;
|
||||
unsigned int sample_count;
|
||||
|
@ -701,7 +701,7 @@ static bool d3d12_runner_draw(struct shader_runner *r,
|
||||
case RESOURCE_TYPE_VERTEX_BUFFER:
|
||||
vbv.BufferLocation = ID3D12Resource_GetGPUVirtualAddress(resource->resource);
|
||||
vbv.StrideInBytes = get_vb_stride(&runner->r, resource->r.slot);
|
||||
vbv.SizeInBytes = resource->r.size;
|
||||
vbv.SizeInBytes = resource->r.width;
|
||||
|
||||
ID3D12GraphicsCommandList_IASetVertexBuffers(command_list, resource->r.slot, 1, &vbv);
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user