Skip to content
Snippets Groups Projects

vkd3d-shader/hlsl: Parse sampler_state.

Merged Francisco Casas requested to merge fcasas/vkd3d:stateblock_experiments_5 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
8668 8701 }
8669 8702 vkd3d_free($1);
8670 8703 }
8704 | KW_SAMPLER_STATE '{' state_block_start state_block '}'
8705 {
8706 struct hlsl_ir_node *sampler_state;
8707 ctx->in_state_block = 0;
8708
8709 if (!ctx->in_state_block && ctx->cur_scope != ctx->globals)
8710 hlsl_error(ctx, &@1, VKD3D_SHADER_ERROR_HLSL_MISPLACED_SAMPLER_STATE,
8711 "sampler_state must be in global scope or a state block.");
8712
8713 if (!(sampler_state = hlsl_new_sampler_state(ctx, $4, &@1)))
  • Elizabeth Figura
    • I really don't like that clone_stateblock_entry() is called that and is not in fact cloning an entry, it's extracting a specific argument from one. I'm not seeing a better way to handle this though, at least not after adding this patch series.

    • Author Developer

      How about having the implementation that does both things as a static function in hlsl.c and having two simple functions, clone_stateblock_entry() and clone_stateblock_entry_single_art(), calling it?

    • I'm not sure that it'd be an improvement.

    • Please register or sign in to reply
  • Francisco Casas added 2 commits

    added 2 commits

    • 1507018d - vkd3d-shader/hlsl: Process 'texture' as a valid stateblock lhs.
    • fb55425c - vkd3d-shader/hlsl: Parse sampler_state.

    Compare with previous version

  • Elizabeth Figura approved this merge request

    approved this merge request

  • Henri Verbeet approved this merge request

    approved this merge request

  • Henri Verbeet added 72 commits

    added 72 commits

    • fb55425c...994e9942 - 69 commits from branch wine:master
    • 125bf74e - tests: Test sampler_state keyword syntax.
    • f47d523e - vkd3d-shader/hlsl: Process 'texture' as a valid stateblock lhs.
    • caa2a9d3 - vkd3d-shader/hlsl: Parse sampler_state.

    Compare with previous version

  • Please register or sign in to reply
    Loading