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

VideoSoftware: remove const memory usage of DebugUtil #135

Merged
merged 1 commit into from Apr 12, 2014

Conversation

degasus
Copy link
Member

@degasus degasus commented Mar 5, 2014

No description provided.

@degasus
Copy link
Member Author

degasus commented Mar 5, 2014

So we only alloc this ~50MB when the video software backend is used.

@Tilka
Copy link
Member

Tilka commented Mar 5, 2014

lgtm

@@ -245,7 +253,7 @@ void OnObjectEnd()
swstats.thisFrame.numDrawnObjects, ObjectBufferName[i], i - BufferBase[i]);

(void)TextureToPng((u8*)ObjectBuffer[i], EFB_WIDTH * 4, filename, EFB_WIDTH, EFB_HEIGHT, true);
memset(ObjectBuffer[i], 0, sizeof(ObjectBuffer[i]));
memset(ObjectBuffer[i], 0, EFB_WIDTH*EFB_HEIGHT*sizeof(u32));

This comment was marked as off-topic.

This comment was marked as off-topic.

@BhaaLseN
Copy link
Member

BhaaLseN commented Mar 5, 2014

I kinda have a de-ja-vu now...didn't we have something like this already once?


void Init()
{
for (int i = 0; i < NumObjectBuffers; i++)
{
memset(ObjectBuffer[i], 0, sizeof(ObjectBuffer[i]));
ObjectBuffer[i] = new u32[EFB_WIDTH*EFB_HEIGHT]();

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

@delroth
Copy link
Member

delroth commented Mar 26, 2014

@dolphin-emu-bot rebuild

(Just to have an up-to-date status on PRs that are mergeable - sorry for the spam)

@Sonicadvance1
Copy link
Contributor

LGTM

{
for (int i = 0; i < NumObjectBuffers; i++)
{
delete [] ObjectBuffer[i];

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

@neobrain
Copy link
Member

LGTM once the spacing issues are resolved.

I don't think we should block this because of the make_unique discussion from above, particularly since there has been no consensus on whether we want to make that a coding style rule or not.

@shuffle2
Copy link
Contributor

@neobrain Yea the make_unique stuff shouldn't matter for this. As said, that can be converted all at once if/when we ever decide that.

@degasus
Copy link
Member Author

degasus commented Apr 12, 2014

spaces are fixed

neobrain added a commit that referenced this pull request Apr 12, 2014
VideoSoftware: Remove const memory usage of DebugUtil
@neobrain neobrain merged commit a516267 into dolphin-emu:master Apr 12, 2014
@degasus degasus deleted the videosw_debugutil branch April 12, 2014 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
8 participants