shader: Better interpolation and disabled attributes support
This commit is contained in:
parent
675a82416d
commit
dbd882ddeb
9 changed files with 101 additions and 25 deletions
|
@ -221,10 +221,10 @@ void GraphicsPipeline::MakePipeline(const Device& device, const FixedPipelineSta
|
|||
}
|
||||
}
|
||||
static_vector<VkVertexInputAttributeDescription, 32> vertex_attributes;
|
||||
const auto& input_attributes = stage_infos[0].loads_generics;
|
||||
const auto& input_attributes = stage_infos[0].input_generics;
|
||||
for (size_t index = 0; index < state.attributes.size(); ++index) {
|
||||
const auto& attribute = state.attributes[index];
|
||||
if (!attribute.enabled || !input_attributes[index]) {
|
||||
if (!attribute.enabled || !input_attributes[index].used) {
|
||||
continue;
|
||||
}
|
||||
vertex_attributes.push_back({
|
||||
|
|
|
@ -755,6 +755,9 @@ ComputePipeline PipelineCache::CreateComputePipeline(ShaderPools& pools,
|
|||
}
|
||||
|
||||
static Shader::AttributeType CastAttributeType(const FixedPipelineState::VertexAttribute& attr) {
|
||||
if (attr.enabled == 0) {
|
||||
return Shader::AttributeType::Disabled;
|
||||
}
|
||||
switch (attr.Type()) {
|
||||
case Maxwell::VertexAttribute::Type::SignedNorm:
|
||||
case Maxwell::VertexAttribute::Type::UnsignedNorm:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue