1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-11-30 13:24:10 +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
DxbcRegisterValue sampleCount = emitQueryTextureSamples(ins.src[0]);
if (ins.controls.resinfoType != DxbcResinfoType::Uint) {
sampleCount.type.ctype = DxbcScalarType::Float32;
sampleCount.type.ccount = 1;
if (ins.controls.returnType != DxbcInstructionReturnType::Uint) {
sampleCount.type = { DxbcScalarType::Float32, 1 };
sampleCount.id = m_module.opConvertUtoF(
getVectorTypeId(sampleCount.type),
sampleCount.id);

View File

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

View File

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