1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-03-01 10:54:14 +01:00

[dxbc] Fix sampleinfo_uint instruction

This commit is contained in:
Philip Rebohle 2018-04-09 22:52:59 +02:00
parent d68d62f837
commit 5cb65a6c19
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
3 changed files with 19 additions and 17 deletions

View File

@ -2709,9 +2709,8 @@ namespace dxvk {
// TODO Check if resource is bound // TODO Check if resource is bound
DxbcRegisterValue sampleCount = emitQueryTextureSamples(ins.src[0]); DxbcRegisterValue sampleCount = emitQueryTextureSamples(ins.src[0]);
if (ins.controls.resinfoType != DxbcResinfoType::Uint) { if (ins.controls.returnType != DxbcInstructionReturnType::Uint) {
sampleCount.type.ctype = DxbcScalarType::Float32; sampleCount.type = { DxbcScalarType::Float32, 1 };
sampleCount.type.ccount = 1;
sampleCount.id = m_module.opConvertUtoF( sampleCount.id = m_module.opConvertUtoF(
getVectorTypeId(sampleCount.type), getVectorTypeId(sampleCount.type),
sampleCount.id); sampleCount.id);

View File

@ -108,6 +108,8 @@ namespace dxvk {
// Opcode controls. It will depend on the // Opcode controls. It will depend on the
// opcode itself which ones are valid. // opcode itself which ones are valid.
// TODO refactor this nonsense // TODO refactor this nonsense
m_instruction.controls.returnType =
static_cast<DxbcInstructionReturnType>(bit::extract(token, 11, 11));
m_instruction.controls.globalFlags = m_instruction.controls.globalFlags =
static_cast<DxbcGlobalFlag>(bit::extract(token, 11, 14)); static_cast<DxbcGlobalFlag>(bit::extract(token, 11, 14));
m_instruction.controls.zeroTest = m_instruction.controls.zeroTest =

View File

@ -240,6 +240,7 @@ namespace dxvk {
* only one of the members will be valid. * only one of the members will be valid.
*/ */
struct DxbcShaderOpcodeControls { struct DxbcShaderOpcodeControls {
DxbcInstructionReturnType returnType;
DxbcGlobalFlags globalFlags; DxbcGlobalFlags globalFlags;
DxbcZeroTest zeroTest; DxbcZeroTest zeroTest;
DxbcSyncFlags syncFlags; DxbcSyncFlags syncFlags;