Skip to content
Snippets Groups Projects

vkd3d-shader: Implement GetDimensions().

Merged Nikolay Sivov requested to merge nsivov/vkd3d:getdimensions2 into master

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Francisco Casas
    Francisco Casas @fcasas started a thread on commit c46e87f9
  • 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.

    • Author Developer

      Yes, I thought fatal error is fine for now. Later on it makes sense to add them all of course.

    • Please register or sign in to reply
  • Francisco Casas
    Francisco Casas @fcasas started a thread on an outdated change in commit c46e87f9
  • 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))
  • Nikolay Sivov added 1 commit

    added 1 commit

    • f440e7b0 - vkd3d-shader: Implement GetDimensions().

    Compare with previous version

    • 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?

    • Author Developer

      It worked on Windows for me, so maybe it should be accepted. I'm going to remove 1D test for now.

    • Please register or sign in to reply
  • Nikolay Sivov added 1 commit

    added 1 commit

    • 45d9b3c9 - vkd3d-shader: Implement GetDimensions().

    Compare with previous version

  • Francisco Casas approved this merge request

    approved this merge request

  • Elizabeth Figura approved this merge request

    approved this merge request

  • Giovanni Mascellani
  • Giovanni Mascellani
  • Giovanni Mascellani
  • Giovanni Mascellani
  • 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 for resinfo and another one for sampleinfo), but it seems this tradition was lost.

  • Nikolay Sivov added 6 commits

    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.

    Compare with previous version

  • Nikolay Sivov added 9 commits

    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.

    Compare with previous version

  • Nikolay Sivov added 16 commits

    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.

    Compare with previous version

  • Nikolay Sivov added 4 commits

    added 4 commits

    • 24f4bacd - tests: Add some tests for GetDimensions().
    • 737437ba - vkd3d-shader/hlsl: Parse GetDimensions() method.
    • 30c5f3e2 - vkd3d-shader/tpf: Add support for writing 'sampleinfo' instruction.
    • 0359fdff - vkd3d-shader/tpf: Add support for writing 'resinfo' instruction.

    Compare with previous version

  • Nikolay Sivov added 55 commits

    added 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.

    Compare with previous version

  • Nikolay Sivov added 82 commits

    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.

    Compare with previous version

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading