vkd3d-shader: Implement GetDimensions().
Merge request reports
Activity
- Resolved by Giovanni Mascellani
4191 4361 { "GatherGreen", add_gather_method_call }, 4192 4362 { "GatherRed", add_gather_method_call }, 4193 4363 4364 { "GetDimensions", add_getdimensions_method_call }, 4365 - Comment on lines +4364 to +4365
It may be worth noting that UAV types also support this method, but currently we are excluding them with the
"Type '%s' does not have methods."
error. They also have different overloads (without the input mip level argument).That probably shouldn't be part of this MR (and we don't know if we may ever need it), but it is something to keep in mind.
4169 load_params.resource = object; 4170 load_params.level = args[ARG_MIP_LEVEL]; 4171 load_params.format = hlsl_get_vector_type(ctx, uint_resinfo ? HLSL_TYPE_UINT : HLSL_TYPE_FLOAT, 4); 4172 4173 if (!(res_info = hlsl_new_resource_load(ctx, &load_params, loc))) 4174 return false; 4175 list_add_tail(instrs, &res_info->entry); 4176 4177 if (!add_assignment_from_component(ctx, instrs, args[ARG_WIDTH], res_info, 0, loc)) 4178 return false; 4179 4180 if (!add_assignment_from_component(ctx, instrs, args[ARG_HEIGHT], res_info, 1, loc)) 4181 return false; 4182 4183 if (!add_assignment_from_component(ctx, instrs, args[ARG_ELEMENT_COUNT], res_info, 4184 object_type->sampler_dim == HLSL_SAMPLER_DIM_3D ? 1 : 2, loc)) changed this line in version 2 of the diff
This test is failing for me when run with wined3d (and native d3dcompiler), using the d3d11 backend, and I suspect it's because we are declaring a 1D texture in the shader but supplying a 2D texture.
Also, the test calls for shader model 5.0, but I believe that GetDimensions() is supported in 4.0?
- Resolved by Nikolay Sivov
- Resolved by Nikolay Sivov
- Resolved by Nikolay Sivov
- Resolved by Giovanni Mascellani
- Resolved by Giovanni Mascellani
- Resolved by Nikolay Sivov
The code is generally fine, but there are a few things to fix. Also, please add the tests in a dedicated commit and then the implementation in another one.
Once upon a time we also used to add features in more atomic commits (i.e., one commit to add the frontend for
GetDimensions()
, another to add the backend forresinfo
and another one forsampleinfo
), but it seems this tradition was lost.
added 6 commits
-
45d9b3c9...82ddc6b4 - 2 commits from branch
wine:master
- 171f149f - tests: Add some tests for GetDimensions().
- 707d6416 - vkd3d-shader/hlsl: Parse GetDimensions() method.
- cb048b22 - vkd3d-shader/tpf: Add support for writing 'sampleinfo' instruction.
- 35176d7b - vkd3d-shader/tpf: Add support for writing 'resinfo' instruction.
Toggle commit list-
45d9b3c9...82ddc6b4 - 2 commits from branch
added 9 commits
-
35176d7b...ebf75735 - 5 commits from branch
wine:master
- fc0effa6 - tests: Add some tests for GetDimensions().
- 9228a508 - vkd3d-shader/hlsl: Parse GetDimensions() method.
- baa998de - vkd3d-shader/tpf: Add support for writing 'sampleinfo' instruction.
- b4cdbc1a - vkd3d-shader/tpf: Add support for writing 'resinfo' instruction.
Toggle commit list-
35176d7b...ebf75735 - 5 commits from branch
added 16 commits
-
b4cdbc1a...df0a031a - 12 commits from branch
wine:master
- a1e229c8 - tests: Add some tests for GetDimensions().
- d3033251 - vkd3d-shader/hlsl: Parse GetDimensions() method.
- 4d953a00 - vkd3d-shader/tpf: Add support for writing 'sampleinfo' instruction.
- 1fd5c0e1 - vkd3d-shader/tpf: Add support for writing 'resinfo' instruction.
Toggle commit list-
b4cdbc1a...df0a031a - 12 commits from branch
added 4 commits
Toggle commit listadded 55 commits
-
0359fdff...d5a0b3af - 51 commits from branch
wine:master
- 569cd36b - tests: Add some tests for GetDimensions().
- aa09a181 - vkd3d-shader/hlsl: Parse GetDimensions() method.
- 2a461105 - vkd3d-shader/tpf: Add support for writing 'sampleinfo' instruction.
- 5e98bc50 - vkd3d-shader/tpf: Add support for writing 'resinfo' instruction.
Toggle commit list-
0359fdff...d5a0b3af - 51 commits from branch
added 82 commits
-
5e98bc50...42d46d25 - 78 commits from branch
wine:master
- 994d4dc5 - tests: Add some tests for GetDimensions().
- 6a8fe19a - vkd3d-shader/hlsl: Parse GetDimensions() method.
- 1d2478f6 - vkd3d-shader/tpf: Add support for writing 'sampleinfo' instruction.
- ee5aeb97 - vkd3d-shader/tpf: Add support for writing 'resinfo' instruction.
Toggle commit list-
5e98bc50...42d46d25 - 78 commits from branch