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

🚧Improve OpenGL buffering #481

Closed
10 tasks done
CalvinWilkinson opened this issue Dec 26, 2022 · 7 comments · Fixed by #861
Closed
10 tasks done

🚧Improve OpenGL buffering #481

CalvinWilkinson opened this issue Dec 26, 2022 · 7 comments · Fixed by #861
Assignees
Labels
low-priority Low Priority 🏎️performance Performance improvements preview Done while in preview

Comments

@CalvinWilkinson
Copy link
Member

CalvinWilkinson commented Dec 26, 2022

Complete The Item Below

  • I have updated the title without removing the 🚧 emoji.

Description

Improve the buffer update process by using the in keyword for the data parameter in GLInvoker.BufferSubData() method. This can be done by changing the float[] data parameter to an in float[] data parameter.

Example:

public void BufferSubData(GLBufferTarget target, nint offset, nuint size, in float[] data)

Make sure after the change to remove the TODO comment block that is located in the IGLInvoker interface file.

Note

This will require a change to the IGLInvoker interface as well.

/*
* TODO: Need to eventually convert the BufferSubData<T> method `data` param from a `ref`
* param to an `in` param. Currently this cannot be done due to an issue found in NET 5 runtime.
*
* The issue was suppose to be fixed in NET 6 preview at the link below, but the issue seems to have
* moved from the test failing at the actual method call to the `Mock<T>.Verify()` call in the
* unit test `UpdateQuad_WhenInvoked_UpdatesGPUVertexBuffer`, and is should be passing.
*
* Links to GITHUB issues:
* 1. https://github.com/moq/moq4/issues/555
* 2. https://github.com/moq/moq4/issues/1136
* * This one is related to the first
*/
/// <summary>
/// [requires: v1.5] Updates a subset of a buffer object's data store.
/// </summary>
/// <param name="target">
/// Specifies the target buffer object. The symbolic constant must be ArrayBuffer,
/// AtomicCounterBuffer, CopyReadBuffer, CopyWriteBuffer, DrawIndirectBuffer, DispatchIndirectBuffer,
/// ElementArrayBuffer, PixelPackBuffer, PixelUnpackBuffer, QueryBuffer, ShaderStorageBuffer,
/// TextureBuffer, TransformFeedbackBuffer, or UniformBuffer.
/// </param>
/// <param name="offset">Specifies the offset into the buffer object's data store where data replacement will begin, measured in bytes.</param>
/// <param name="size">Specifies the size in bytes of the data store region being replaced.</param>
/// <param name="data">The new data that will be copied into the data store.</param>
void BufferSubData(GLBufferTarget target, nint offset, nuint size, float[] data);

Note

This was waiting for the code base to be updated to dotnet version 6. The reason for this was due to an issue found in versions of dotnet earlier than dotnet 6. Since the code base is using dotnet 7, this can be updated.

The issue below are related to the issue:

Acceptance Criteria

  • IGLInvoker.BufferSubData interface method parameter changed
  • GLInvoker.BufferSubData class method parameter changed
  • TODO comment block removed from IGLInvoker interface file

ToDo Items

  • Change type labels added to this issue. Refer to the Change Type Labels section below.
  • Priority label added to this issue. Refer to the Priority Type Labels section below.
  • Issue linked to the correct project (if applicable).
  • Issue linked to the correct milestone (if applicable).
  • Draft pull request created and linked to this issue (only required with code changes).

Issue Dependencies

No response

Related Work

No response

Additional Information:

Change Type Labels

Change Type Label
Bug Fixes 🐛bug
Breaking Changes 🧨breaking changes
New Feature ✨new feature
Workflow Changes workflow
Code Doc Changes 🗒️documentation/code
Product Doc Changes 📝documentation/product

Priority Type Labels

Priority Type Label
Low Priority low priority
Medium Priority medium priority
High Priority high priority

Code of Conduct

  • I agree to follow this project's Code of Conduct.
@CalvinWilkinson CalvinWilkinson added tech-debt Code refactoring or cleanup / tech debt reduction low-priority Low Priority preview Done while in preview labels Dec 26, 2022
@CalvinWilkinson CalvinWilkinson self-assigned this Dec 26, 2022
@CalvinWilkinson CalvinWilkinson moved this to ⚪Not Set in KD-Team Dec 26, 2022
@CalvinWilkinson CalvinWilkinson added 🏎️performance Performance improvements and removed tech-debt Code refactoring or cleanup / tech debt reduction labels Dec 28, 2022
@CalvinWilkinson
Copy link
Member Author

This might not need to be implemented or apply anymore.
Needs to be relooked at to see if this is even something worth doing.

@stale
Copy link

stale bot commented Apr 4, 2023

This issue has been automatically marked as stale due to the lack of activity for 60 days. The issue will be closed after 7 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Signifies that an issue is stale label Apr 4, 2023
@CalvinWilkinson CalvinWilkinson removed the stale Signifies that an issue is stale label Apr 5, 2023
@stale
Copy link

stale bot commented Jun 8, 2023

This issue has been automatically marked as stale due to the lack of activity for 60 days. The issue will be closed after 7 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Signifies that an issue is stale label Jun 8, 2023
@CalvinWilkinson CalvinWilkinson removed the stale Signifies that an issue is stale label Jun 9, 2023
@CalvinWilkinson CalvinWilkinson removed their assignment Jul 6, 2023
@stale
Copy link

stale bot commented Sep 4, 2023

This issue has been automatically marked as stale due to the lack of activity for 60 days. The issue will be closed after 7 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Signifies that an issue is stale label Sep 4, 2023
@CalvinWilkinson CalvinWilkinson removed the stale Signifies that an issue is stale label Sep 4, 2023
Copy link

stale bot commented Nov 3, 2023

This issue has been automatically marked as stale due to the lack of activity for 60 days. The issue will be closed after 7 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Signifies that an issue is stale label Nov 3, 2023
@CalvinWilkinson CalvinWilkinson removed the stale Signifies that an issue is stale label Nov 4, 2023
map-b added a commit to map-b/Velaptor that referenced this issue Dec 4, 2023
Copy link

stale bot commented Jan 3, 2024

This issue has been automatically marked as stale due to the lack of activity for 60 days. The issue will be closed after 7 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Signifies that an issue is stale label Jan 3, 2024
@CalvinWilkinson CalvinWilkinson removed the stale Signifies that an issue is stale label Jan 3, 2024
@CalvinWilkinson CalvinWilkinson moved this from ⚪Not Set to 🏗️In Development in KD-Team Jan 4, 2024
@AndreBonda
Copy link
Contributor

I take it.

AndreBonda added a commit to AndreBonda/Velaptor that referenced this issue Jan 5, 2024
CalvinWilkinson pushed a commit that referenced this issue Jan 5, 2024
* Start work for issue #481

* chore: add 'in' keyword to BufferSubData parameter
@github-project-automation github-project-automation bot moved this from 🏗️In Development to ✅Done in KD-Team Jan 5, 2024
@CalvinWilkinson CalvinWilkinson added this to the v1.0.0-preview.32 milestone Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
low-priority Low Priority 🏎️performance Performance improvements preview Done while in preview
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants