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

Default line width causes drawState error #64

Closed
ioquatix opened this issue Jan 31, 2017 · 5 comments
Closed

Default line width causes drawState error #64

ioquatix opened this issue Jan 31, 2017 · 5 comments

Comments

@ioquatix
Copy link
Contributor

PipelineRasterizationStateCreateInfo( PipelineRasterizationStateCreateFlags flags_ = PipelineRasterizationStateCreateFlags(), Bool32 depthClampEnable_ = 0, Bool32 rasterizerDiscardEnable_ = 0, PolygonMode polygonMode_ = PolygonMode::eFill, CullModeFlags cullMode_ = CullModeFlags(), FrontFace frontFace_ = FrontFace::eCounterClockwise, Bool32 depthBiasEnable_ = 0, float depthBiasConstantFactor_ = 0, float depthBiasClamp_ = 0, float depthBiasSlopeFactor_ = 0, float lineWidth_ = 0 )

causes

[T+0.098 main ERROR] DS Attempt to set lineWidth to 0.000000 but physical device limits line width to between [0.500000, 10.000000]!

Is there a reasonable default (e.g. 1?)

@asuessenbach
Copy link
Contributor

Unfortunately, vk.xml does not specify any defaults.
And I don't see, how one could derive some default that's more meaningful than just zero. I would have expected that value to be supported on every platform, at least as a value with some special meaning.

@ioquatix
Copy link
Contributor Author

Yeah, that makes sense. Unfortunately, as a default, it's not valid at least on this hardware.

@mtavenrath
Copy link
Contributor

During the last Khronos Vulkan DevU event the idea came up to something like a 'vk_defaults.xml' file where one could define multiple useful default parameters for CreateInfo structs. This file could be used to create a factory library which would allow you to write something like:

foo::createComponentMapping(foo::ComponentMapping::RGBA)
or
foo::createComponentMapping(foo::ComponentMapping::BGRA

The idea is to have reasonable defaults for all objects where applicable with the option for developers to define their own default values.

One question which comes up if Vulkan-Hpp should use this file too for the default values. Since this will affect source code compatibility unfortunately I'd have to say no.

@ioquatix
Copy link
Contributor Author

ioquatix commented Feb 1, 2017

@mtavenrath That's an awesome idea.

If you are worried about source code compatibility, I guess I could relate. But:

1/ Bump major version?
2/ It hasn't been a problem in the past? (major changes to header breaking existing code)
3/ Make it optional?

@mtavenrath
Copy link
Contributor

Default values should be implemented outside of Vulkan-Hpp in a factory-like utility library. Closing.

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

No branches or pull requests

3 participants