Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Text cleanups #250

Merged
merged 13 commits into from
Apr 6, 2024
Merged

Text cleanups #250

merged 13 commits into from
Apr 6, 2024

Conversation

ubitux
Copy link
Contributor

@ubitux ubitux commented Apr 6, 2024

No description provided.

ubitux added 13 commits April 5, 2024 15:33
Motivations for doing this move:
- it makes the node code only responsible for the pipeline and GPU data
  update code
- the logic of the text unit cannot be reused with a different geometry
  logic so it makes sense to have these computations together
- the CPU data allocation logic related to characters can be shared with
  the existing one currently used for effects
- having the geometry information available there will allow more
  advanced logic with regards to how we work with transforms in the
  future
This function also refreshes the effects data buffers, this is not
limited to the geometry data.
This structure now also contains the geometry.
This is similar to what's being done in fill_default_data_buffers():
ptrs.* contains locations in the same buffer, so this prevents random
accesses.
@ubitux ubitux requested a review from mbouron April 6, 2024 00:30
@mbouron
Copy link
Contributor

mbouron commented Apr 6, 2024

text: split loop to make memory access contiguous

This is similar to what's being done in fill_default_data_buffers():
ptrs.* contains locations in the same buffer, so this prevents random
accesses.

Did you measure any gain in practice ?

@ubitux
Copy link
Contributor Author

ubitux commented Apr 6, 2024

Did you measure any gain in practice ?

No, nothing noticeable with my hardware, I'd probably have to use a large amount of data to spot this. It just makes the buffer reading completely linear since it has the following layout: [transform0][transform1][transform2]...[transformN][color0][color1][color2]...[colorN].... It's not too much change to split the loop so I'd rather do the sane thing here.

Edit: it would be a different story if we used a buffer of structs which would interlace the data

@ubitux ubitux merged commit 32ca6e3 into NopeForge:main Apr 6, 2024
15 checks passed
@ubitux ubitux deleted the text-cleanups branch April 6, 2024 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants