1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-05 01:24:14 +01:00

[dxbc] Write point size in vertex shaders

Silences some validation errors when point rendering is enabled.
This commit is contained in:
Philip Rebohle 2022-09-16 17:10:01 +02:00
parent d93568f1a9
commit 5b6b9923ab
2 changed files with 20 additions and 2 deletions

View File

@ -6634,6 +6634,19 @@ namespace dxvk {
}
void DxbcCompiler::emitPointSizeStore() {
if (!m_pointSizeOut) {
m_pointSizeOut = emitNewBuiltinVariable(DxbcRegisterInfo {
{ DxbcScalarType::Float32, 1, 0 },
spv::StorageClassOutput },
spv::BuiltInPointSize,
"point_size");
}
m_module.opStore(m_pointSizeOut, m_module.constf32(1.0f));
}
void DxbcCompiler::emitInit() {
// Set up common capabilities for all shaders
m_module.enableCapability(spv::CapabilityShader);
@ -6873,6 +6886,7 @@ namespace dxvk {
this->emitOutputSetup();
this->emitClipCullStore(DxbcSystemValue::ClipDistance, m_clipDistances);
this->emitClipCullStore(DxbcSystemValue::CullDistance, m_cullDistances);
this->emitPointSizeStore();
this->emitFunctionEnd();
}

View File

@ -484,7 +484,9 @@ namespace dxvk {
uint32_t m_primitiveIdIn = 0;
uint32_t m_primitiveIdOut = 0;
uint32_t m_pointSizeOut = 0;
//////////////////////////////////////////////////
// Immediate constant buffer. If defined, this is
// an array of four-component uint32 vectors.
@ -1077,7 +1079,9 @@ namespace dxvk {
void emitClipCullLoad(
DxbcSystemValue sv,
uint32_t srcArray);
void emitPointSizeStore();
//////////////////////////////////////
// Common function definition methods
void emitInit();