Skip to content
Snippets Groups Projects

include: Fill in missing types/interfaces in vkd3d_d3d12.idl

Merged Martin Storsjö requested to merge mstorsjo/vkd3d:d3d12-fillin 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
  • Jacek Caban approved this merge request

    approved this merge request

  • Thanks for this. A couple of comments from an initial cursory look:

    +typedef enum D3D12_PIPELINE_STATE_SUBOBJECT_TYPE
    +{
    +    D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_ROOT_SIGNATURE,
    +    D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_VS,
    +    D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_PS,
    +    D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_DS,
    +    D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_HS,
    +    D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_GS,
    +    D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_CS,
    +    D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_STREAM_OUTPUT,
    +    D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_BLEND,
    +    D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_SAMPLE_MASK,
    +    D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_RASTERIZER,
    +    D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_DEPTH_STENCIL,
    +    D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_INPUT_LAYOUT,
    +    D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_IB_STRIP_CUT_VALUE,
    +    D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_PRIMITIVE_TOPOLOGY,
    +    D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_RENDER_TARGET_FORMATS,
    +    D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_DEPTH_STENCIL_FORMAT,
    +    D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_SAMPLE_DESC,
    +    D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_NODE_MASK,
    +    D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_CACHED_PSO,
    +    D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_FLAGS,
    +    D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_DEPTH_STENCIL1,
    +    D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_VIEW_INSTANCING,
    +    D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_AS = 24,
    +    D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_MS = 25,
    +    D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_MAX_VALID,
    +} D3D12_PIPELINE_STATE_SUBOBJECT_TYPE;

    In general we'd like these enum elements to have explicit values, in hexadecimal. That's mostly in order to make it easier to look them up when they show up in traces. There are also a couple of places in this series that either remove existing explicit values or change them to decimal.

    +typedef enum D3D12_WAVE_MMA_TIER {
    +    D3D12_WAVE_MMA_TIER_NOT_SUPPORTED = 0,
    +    D3D12_WAVE_MMA_TIER_1_0 = 10,
    +} D3D12_WAVE_MMA_TIER;
     ...
    +typedef enum D3D12_TRI_STATE {
    +    D3D12_TRI_STATE_UNKNOWN = -1,
    +    D3D12_TRI_STATE_FALSE = 0,
    +    D3D12_TRI_STATE_TRUE = 1,
    +} D3D12_TRI_STATE;

    Brace placement.

    Patch 3/3 is fairly large. Could you split that per interface? (In principle I'd prefer splitting the other two patches as well, but they're small enough that at least personally I'm not too bothered about it.) I'd also point out that most of these structures/enums/interfaces aren't so much missing as simply introduced by newer SDK/d3d12 versions. You could conceivably split things by the SDK version that first introduced them, although that's probably more work, and I'd expect the resulting patches to still be fairly large.

  • Author Contributor

    Sure, I can fill in explicit values in hexadecimal here and elsewhere. What about ones that are defined with bitshifts, e.g. D3D12_GRAPHICS_STATE_IA_INDEX_BUFFER = (1 << 1),, is that ok or do you want that as hex as well? (That'd be more tricky to try to get right without typoing things.)

    For the couple where I changed existing values from hexadecimal to decimal, I did that with the intent to make some values more obvious, like FOO_1_0 = 10 and FOO_1_1 = 11 instead of 0xa and 0xb, but I guess that's kinda obvious anyway. I can revert those to keeping hexadecimal and adding the new values in that form as well.

    For patch 3/3 - I can try to split it by structs needed by incrementing versions of ID3D12Device<N> at least - I guess that should make things more palatable.

  • Sure, I can fill in explicit values in hexadecimal here and elsewhere. What about ones that are defined with bitshifts, e.g. D3D12_GRAPHICS_STATE_IA_INDEX_BUFFER = (1 << 1),, is that ok or do you want that as hex as well? (That'd be more tricky to try to get right without typoing things.)

    I'd prefer those as hexadecimal as well, yeah.

    For the couple where I changed existing values from hexadecimal to decimal, I did that with the intent to make some values more obvious, like FOO_1_0 = 10 and FOO_1_1 = 11 instead of 0xa and 0xb, but I guess that's kinda obvious anyway. I can revert those to keeping hexadecimal and adding the new values in that form as well.

    For patch 3/3 - I can try to split it by structs needed by incrementing versions of ID3D12Device<N> at least - I guess that should make things more palatable.

    For what it's worth, what I had in mind was something along the lines of commit e9b13936 or commit 799434fc. I.e., adding interfaces together with the structures and enumerations they depend on. And in principle that would be one interface per commit, but e.g. ID3D12PipelineLibrary and ID3D12PipelineLibrary1 are trivial enough that it would be fine to group them together. That does probably leave a few enumerations and structures that aren't directly puled in by an interface. E.g. the D3D12_FEATURE_DATA_* structures belong to the corresponding D3D12_FEATURE_* enumeration values. At first sight those are probably small enough to go in together in a single commit, but you could also split them per D3D12_FEATURE_DATA_* structure.

  • Martin Storsjö added 2 commits

    added 2 commits

    • f3a4c521 - include: Add some more struct/enum definitions to vkd3d_d3d12.idl.
    • b30194ac - include: Fill in missing enum values in vkd3d_d3d12.idl.

    Compare with previous version

  • Author Contributor

    I fixed the second commit, filling enum values, to make it consistent with the existing enums. A few of them were lacking explicit values, and for them I didn't want to rewrite the whole set of existing values, so there I just matched the style of the existing value of the enum.

    I omitted the third commit of this MR for now - I'll look into splitting it in the same way, but that'll take a little bit longer. (I'll either append it back to this MR, or make a new later MR, depending how the first two commits here fare.)

  • Martin Storsjö added 6 commits

    added 6 commits

    • b30194ac...f525e9e9 - 4 commits from branch wine:master
    • 7594099b - include: Add some more struct/enum definitions to vkd3d_d3d12.idl.
    • de7da099 - include: Fill in missing enum values in vkd3d_d3d12.idl.

    Compare with previous version

  • Looks good, thanks again.

  • Henri Verbeet approved this merge request

    approved this merge request

  • Martin Storsjö mentioned in merge request !332 (merged)

    mentioned in merge request !332 (merged)

  • Alexandre Julliard added 16 commits

    added 16 commits

    • de7da099...1b45052c - 14 commits from branch wine:master
    • 8e6b08d6 - include: Add some more struct/enum definitions to vkd3d_d3d12.idl.
    • 2fb0c2d1 - include: Fill in missing enum values in vkd3d_d3d12.idl.

    Compare with previous version

  • Alexandre Julliard approved this merge request

    approved this merge request

Please register or sign in to reply
Loading