Skip to content
Snippets Groups Projects

vkd3d-shader/dxil: SRV/UAV support part 2.

Merged Conor McCarthy requested to merge cmccarthy/vkd3d:srv_uav_2 into master
2 unresolved threads

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
3745 return;
3746 }
3747 else if (write_mask & (write_mask + 1))
3748 {
3749 FIXME("Unhandled write mask %#x.\n", write_mask);
3750 vkd3d_shader_parser_error(&sm6->p, VKD3D_SHADER_ERROR_DXIL_INVALID_OPERAND,
3751 "Write mask %#x for a raw/structured buffer load operation is unhandled.", write_mask);
3752 }
3753 component_count = vsir_write_mask_component_count(write_mask);
3754 }
3755
3756 instruction_init_with_resource(ins, raw ? VKD3DSIH_LD_RAW : VKD3DSIH_LD_STRUCTURED, resource, sm6);
3757 operand_count = 2 + !raw;
3758 src_params = instruction_src_params_alloc(ins, operand_count, sm6);
3759 src_params_init_from_operands(src_params, &operands[1], operand_count - 1);
3760 src_param_init_vector_from_reg(&src_params[operand_count - 1], &resource->u.handle.reg);
  • Comment on lines +3759 to +3760

    Shouldn't we check for allocation success here?

  • Author Developer

    Fixed. There are quite a few of these elsewhere which should be fixed at some point.

  • I didn't notice them, but yes, if there are I'm pretty sure we want those fixed.

    BTW, I find it a bit confusing that there are two instruction_src_param_alloc(), one in ir.c and the other in dxil.c. They're both static so they do not conflict, but it would be nice if, say, they got a different prefix.

  • Please register or sign in to reply
  • Conor McCarthy added 1 commit

    added 1 commit

    • b5d34bdd - vkd3d-shader/dxil: Implement DX intrinsic RawBufferLoad.

    Compare with previous version

  • Giovanni Mascellani approved this merge request

    approved this merge request

  • Henri Verbeet approved this merge request

    approved this merge request

  • Alexandre Julliard approved this merge request

    approved this merge request

  • Giovanni Mascellani
    Giovanni Mascellani @giomasce started a thread on commit e08c0cfc
  • 3884 3945 [DX_LEGACY_F32TOF16 ] = {"i", "f", sm6_parser_emit_dx_unary},
    3885 3946 [DX_LOAD_INPUT ] = {"o", "ii8i", sm6_parser_emit_dx_load_input},
    3886 3947 [DX_LOG ] = {"g", "R", sm6_parser_emit_dx_unary},
    3948 [DX_RAW_BUFFER_LOAD ] = {"o", "Hii8i", sm6_parser_emit_dx_raw_buffer_load},
    • I just realized that the last parameter is never read. Is that intended? What is supposed to be there? Maybe you could add a comment in the code to explain this? Apparently something similar happens for DX_LOAD_INPUT too and maybe other DX opcodes.

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