vkd3d-shader/tpf: Create a stub STAT section.
What needs to be reviewed here is additional offset field is considered clean enough. Looking through fields we'll need to set, so far I don't immediately see a case where single instruction needs to touch more than one category. Should a need for that emerge, we could have another per-instruction function.
Merge request reports
Activity
6149 6150 put_u32(&buffer, stat->instr_count); 6151 put_u32(&buffer, 0); /* Temp count */ 6152 put_u32(&buffer, 0); /* Def count */ 6153 put_u32(&buffer, 0); /* DCL count */ 6154 put_u32(&buffer, 0); /* Float instruction count */ 6155 put_u32(&buffer, 0); /* Int instruction count */ 6156 put_u32(&buffer, 0); /* Uint instruction count */ 6157 put_u32(&buffer, 0); /* Static flow control count */ 6158 put_u32(&buffer, 0); /* Dynamic flow control count */ 6159 put_u32(&buffer, 0); /* Macro instruction count */ 6160 put_u32(&buffer, 0); /* Temp array count */ 6161 put_u32(&buffer, 0); /* Array instr count */ 6162 put_u32(&buffer, 0); /* Cut instr count */ 6163 put_u32(&buffer, 0); /* Emit instr count */ 6164 put_u32(&buffer, 0); /* Texture instructions */ - Resolved by Nikolay Sivov
- Resolved by Nikolay Sivov
Having just a switch is the most flexible, and does not touch too much of existing code. Flow control counters correspond to branching (dynamic counter) and the rest that are "static", I know discard is, and probably continue/break are as well. So this could be counted directly as well, by opening if/loop/...
@hverbeet @giomasce do you have an opinion on how to structure this? Two choices to far are to add some extra data to opcode table, or a helper to touch counters directly.
added 1 commit
- 7fd9197d - vkd3d-shader/tpf: Create a stub STAT section.
@hverbeet @giomasce do you have an opinion on how to structure this? Two choices to far are to add some extra data to opcode table, or a helper to touch counters directly.
I think either of those can work. Note that you don't necessarily need to store the information in opcode_table[] either; other options would be to add a separate table to struct vkd3d_sm4_lookup_tables, or to add the field to struct vkd3d_sm4_opcode_info but using a separate table to initialise that field.
added 1 commit
- 4efb6395 - vkd3d-shader/tpf: Create a stub STAT section.
added 44 commits
-
4efb6395...ab525f31 - 43 commits from branch
wine:master
- 4402d07c - vkd3d-shader/tpf: Create a stub STAT section.
-
4efb6395...ab525f31 - 43 commits from branch
added 4 commits
-
4402d07c...5df81049 - 3 commits from branch
wine:master
- ec644b39 - vkd3d-shader/tpf: Create a stub STAT section.
-
4402d07c...5df81049 - 3 commits from branch