Skip to content
This repository has been archived by the owner on Aug 1, 2019. It is now read-only.

Update glTFViewer for render passes and depth stencil state #39

Merged
merged 1 commit into from
Jun 9, 2017
Merged

Update glTFViewer for render passes and depth stencil state #39

merged 1 commit into from
Jun 9, 2017

Conversation

kainino0x
Copy link
Contributor

@kainino0x kainino0x commented Jun 8, 2017

#7, #29

@kainino0x kainino0x requested a review from Kangz June 8, 2017 23:24
.SetRenderPass(renderpass)
// attachment 0 -> back buffer
// (implicit) // TODO([email protected]): use the texture provided by WSI
.SetDimensions(640, 480)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's weird to me that screen dimensions are now part of the material info. But I think it's correct?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

part of the material info? But I think it makes sense because you need DS buffers etc. Of the same size.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MaterialInfo is a struct I have in the glTFViewer. If we wanted to be able to resize the viewport, the materials would all have to be recompiled, basically, but that seems right. glTF 2.0 probably solves this, anyway (just one pipeline by default).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure I understand: the pipeline depends on the subpass, but it is the framebuffer that has the dimension, and in all APIs, the viewport is a dynamic state.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, not the actual "viewport", I mean (essentially) the backbuffer size. Whatever size you want to render at.

But I think I misunderstood myself and this doesn't have to be the case. I'll figure it out.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I figured out why I was being silly. This is fixed now.

@kainino0x kainino0x changed the title Update glTFViewer for render passes Update glTFViewer for render passes and depth stencil state Jun 8, 2017
Copy link
Contributor

@Kangz Kangz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

.SetRenderPass(renderpass)
// attachment 0 -> back buffer
// (implicit) // TODO([email protected]): use the texture provided by WSI
.SetDimensions(640, 480)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

part of the material info? But I think it makes sense because you need DS buffers etc. Of the same size.

@@ -496,6 +520,7 @@ namespace {
material.uniformBuffer.SetSubData(0,
sizeof(u_transform_block) / sizeof(uint32_t),
reinterpret_cast<const uint32_t*>(&transforms));
cmd.BeginRenderPass(material.renderpass, material.framebuffer);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is missing an EndRenderpass, can you add validation for currentRenderpass == nullptr at the end of a CommandBuffeBuilder::ValidateGetResult(); (and ideally a test for it somewhere in the validation tests.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops. sure.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@kainino0x kainino0x merged commit 39c1bce into googlearchive:master Jun 9, 2017
@kainino0x kainino0x deleted the renderpass-gltfviewer branch June 9, 2017 02:04
@Kangz Kangz mentioned this pull request Jul 13, 2017
10 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants