.SamplerL2BypassModeDisable = true,
.RenderCacheReadWriteMode = WriteOnlyCache,
.MemoryObjectControlState = GEN8_MOCS,
- .BaseMipLevel = 0,
+ .BaseMipLevel = 0.0,
.SurfaceQPitch = 0,
.Height = (num_elements >> 7) & 0x3fff,
.Width = num_elements & 0x7f,
.ShaderChannelSelectGreen = SCS_GREEN,
.ShaderChannelSelectBlue = SCS_BLUE,
.ShaderChannelSelectAlpha = SCS_ALPHA,
- .ResourceMinLOD = 0,
+ .ResourceMinLOD = 0.0,
/* FIXME: We assume that the image must be bound at this time. */
.SurfaceBaseAddress = { NULL, offset },
};
.SamplerDisable = false,
.TextureBorderColorMode = DX10OGL,
.LODPreClampMode = 0,
- .BaseMipLevel = 0,
+ .BaseMipLevel = 0.0,
.MipModeFilter = vk_to_gen_mipmap_mode[pCreateInfo->mipMode],
.MagModeFilter = mag_filter,
.MinModeFilter = min_filter,
.TextureLODBias = pCreateInfo->mipLodBias * 256,
.AnisotropicAlgorithm = EWAApproximation,
- .MinLOD = pCreateInfo->minLod * 256,
- .MaxLOD = pCreateInfo->maxLod * 256,
+ .MinLOD = pCreateInfo->minLod,
+ .MaxLOD = pCreateInfo->maxLod,
.ChromaKeyEnable = 0,
.ChromaKeyIndex = 0,
.ChromaKeyMode = 0,
uint32_t _3DCommandOpcode;
uint32_t _3DCommandSubOpcode;
uint32_t DwordLength;
- uint32_t AACoverageBias;
- uint32_t AACoverageSlope;
- uint32_t AACoverageEndCapBias;
- uint32_t AACoverageEndCapSlope;
+ float AACoverageBias;
+ float AACoverageSlope;
+ float AACoverageEndCapBias;
+ float AACoverageEndCapSlope;
};
static inline void
0;
dw[1] =
- __gen_field(values->AACoverageBias, 16, 23) |
- __gen_field(values->AACoverageSlope, 0, 7) |
+ __gen_field(values->AACoverageBias * (1 << 8), 16, 23) |
+ __gen_field(values->AACoverageSlope * (1 << 8), 0, 7) |
0;
dw[2] =
- __gen_field(values->AACoverageEndCapBias, 16, 23) |
- __gen_field(values->AACoverageEndCapSlope, 0, 7) |
+ __gen_field(values->AACoverageEndCapBias * (1 << 8), 16, 23) |
+ __gen_field(values->AACoverageEndCapSlope * (1 << 8), 0, 7) |
0;
}
#define Vertex1 1
#define Vertex2 2
uint32_t TriangleFanProvokingVertexSelect;
- uint32_t MinimumPointWidth;
- uint32_t MaximumPointWidth;
+ float MinimumPointWidth;
+ float MaximumPointWidth;
uint32_t ForceZeroRTAIndexEnable;
uint32_t MaximumVPIndex;
};
0;
dw[3] =
- __gen_field(values->MinimumPointWidth, 17, 27) |
- __gen_field(values->MaximumPointWidth, 6, 16) |
+ __gen_field(values->MinimumPointWidth * (1 << 3), 17, 27) |
+ __gen_field(values->MaximumPointWidth * (1 << 3), 6, 16) |
__gen_field(values->ForceZeroRTAIndexEnable, 5, 5) |
__gen_field(values->MaximumVPIndex, 0, 3) |
0;
uint32_t CurrentRepeatCounter;
uint32_t CurrentStippleIndex;
uint32_t LineStipplePattern;
- uint32_t LineStippleInverseRepeatCount;
+ float LineStippleInverseRepeatCount;
uint32_t LineStippleRepeatCount;
};
0;
dw[2] =
- __gen_field(values->LineStippleInverseRepeatCount, 15, 31) |
+ __gen_field(values->LineStippleInverseRepeatCount * (1 << 16), 15, 31) |
__gen_field(values->LineStippleRepeatCount, 0, 8) |
0;
#define NUMSAMPLES_4 2
#define NUMSAMPLES_8 3
uint32_t NumberofMultisamples;
- uint32_t Sample3XOffset;
- uint32_t Sample3YOffset;
- uint32_t Sample2XOffset;
- uint32_t Sample2YOffset;
- uint32_t Sample1XOffset;
- uint32_t Sample1YOffset;
- uint32_t Sample0XOffset;
- uint32_t Sample0YOffset;
- uint32_t Sample7XOffset;
- uint32_t Sample7YOffset;
- uint32_t Sample6XOffset;
- uint32_t Sample6YOffset;
- uint32_t Sample5XOffset;
- uint32_t Sample5YOffset;
- uint32_t Sample4XOffset;
- uint32_t Sample4YOffset;
+ float Sample3XOffset;
+ float Sample3YOffset;
+ float Sample2XOffset;
+ float Sample2YOffset;
+ float Sample1XOffset;
+ float Sample1YOffset;
+ float Sample0XOffset;
+ float Sample0YOffset;
+ float Sample7XOffset;
+ float Sample7YOffset;
+ float Sample6XOffset;
+ float Sample6YOffset;
+ float Sample5XOffset;
+ float Sample5YOffset;
+ float Sample4XOffset;
+ float Sample4YOffset;
};
static inline void
0;
dw[2] =
- __gen_field(values->Sample3XOffset, 28, 31) |
- __gen_field(values->Sample3YOffset, 24, 27) |
- __gen_field(values->Sample2XOffset, 20, 23) |
- __gen_field(values->Sample2YOffset, 16, 19) |
- __gen_field(values->Sample1XOffset, 12, 15) |
- __gen_field(values->Sample1YOffset, 8, 11) |
- __gen_field(values->Sample0XOffset, 4, 7) |
- __gen_field(values->Sample0YOffset, 0, 3) |
+ __gen_field(values->Sample3XOffset * (1 << 4), 28, 31) |
+ __gen_field(values->Sample3YOffset * (1 << 4), 24, 27) |
+ __gen_field(values->Sample2XOffset * (1 << 4), 20, 23) |
+ __gen_field(values->Sample2YOffset * (1 << 4), 16, 19) |
+ __gen_field(values->Sample1XOffset * (1 << 4), 12, 15) |
+ __gen_field(values->Sample1YOffset * (1 << 4), 8, 11) |
+ __gen_field(values->Sample0XOffset * (1 << 4), 4, 7) |
+ __gen_field(values->Sample0YOffset * (1 << 4), 0, 3) |
0;
dw[3] =
- __gen_field(values->Sample7XOffset, 28, 31) |
- __gen_field(values->Sample7YOffset, 24, 27) |
- __gen_field(values->Sample6XOffset, 20, 23) |
- __gen_field(values->Sample6YOffset, 16, 19) |
- __gen_field(values->Sample5XOffset, 12, 15) |
- __gen_field(values->Sample5YOffset, 8, 11) |
- __gen_field(values->Sample4XOffset, 4, 7) |
- __gen_field(values->Sample4YOffset, 0, 3) |
+ __gen_field(values->Sample7XOffset * (1 << 4), 28, 31) |
+ __gen_field(values->Sample7YOffset * (1 << 4), 24, 27) |
+ __gen_field(values->Sample6XOffset * (1 << 4), 20, 23) |
+ __gen_field(values->Sample6YOffset * (1 << 4), 16, 19) |
+ __gen_field(values->Sample5XOffset * (1 << 4), 12, 15) |
+ __gen_field(values->Sample5YOffset * (1 << 4), 8, 11) |
+ __gen_field(values->Sample4XOffset * (1 << 4), 4, 7) |
+ __gen_field(values->Sample4YOffset * (1 << 4), 0, 3) |
0;
}
#define NRM_NUMRASTSAMPLES_8 3
#define NRM_NUMRASTSAMPLES_16 4
uint32_t NumberofRasterizationMultisamples;
- uint32_t Sample3XOffset;
- uint32_t Sample3YOffset;
- uint32_t Sample2XOffset;
- uint32_t Sample2YOffset;
- uint32_t Sample1XOffset;
- uint32_t Sample1YOffset;
- uint32_t Sample0XOffset;
- uint32_t Sample0YOffset;
- uint32_t Sample7XOffset;
- uint32_t Sample7YOffset;
- uint32_t Sample6XOffset;
- uint32_t Sample6YOffset;
- uint32_t Sample5XOffset;
- uint32_t Sample5YOffset;
- uint32_t Sample4XOffset;
- uint32_t Sample4YOffset;
- uint32_t Sample11XOffset;
- uint32_t Sample11YOffset;
- uint32_t Sample10XOffset;
- uint32_t Sample10YOffset;
- uint32_t Sample9XOffset;
- uint32_t Sample9YOffset;
- uint32_t Sample8XOffset;
- uint32_t Sample8YOffset;
- uint32_t Sample15XOffset;
- uint32_t Sample15YOffset;
- uint32_t Sample14XOffset;
- uint32_t Sample14YOffset;
- uint32_t Sample13XOffset;
- uint32_t Sample13YOffset;
- uint32_t Sample12XOffset;
- uint32_t Sample12YOffset;
+ float Sample3XOffset;
+ float Sample3YOffset;
+ float Sample2XOffset;
+ float Sample2YOffset;
+ float Sample1XOffset;
+ float Sample1YOffset;
+ float Sample0XOffset;
+ float Sample0YOffset;
+ float Sample7XOffset;
+ float Sample7YOffset;
+ float Sample6XOffset;
+ float Sample6YOffset;
+ float Sample5XOffset;
+ float Sample5YOffset;
+ float Sample4XOffset;
+ float Sample4YOffset;
+ float Sample11XOffset;
+ float Sample11YOffset;
+ float Sample10XOffset;
+ float Sample10YOffset;
+ float Sample9XOffset;
+ float Sample9YOffset;
+ float Sample8XOffset;
+ float Sample8YOffset;
+ float Sample15XOffset;
+ float Sample15YOffset;
+ float Sample14XOffset;
+ float Sample14YOffset;
+ float Sample13XOffset;
+ float Sample13YOffset;
+ float Sample12XOffset;
+ float Sample12YOffset;
};
static inline void
0;
dw[2] =
- __gen_field(values->Sample3XOffset, 28, 31) |
- __gen_field(values->Sample3YOffset, 24, 27) |
- __gen_field(values->Sample2XOffset, 20, 23) |
- __gen_field(values->Sample2YOffset, 16, 19) |
- __gen_field(values->Sample1XOffset, 12, 15) |
- __gen_field(values->Sample1YOffset, 8, 11) |
- __gen_field(values->Sample0XOffset, 4, 7) |
- __gen_field(values->Sample0YOffset, 0, 3) |
+ __gen_field(values->Sample3XOffset * (1 << 4), 28, 31) |
+ __gen_field(values->Sample3YOffset * (1 << 4), 24, 27) |
+ __gen_field(values->Sample2XOffset * (1 << 4), 20, 23) |
+ __gen_field(values->Sample2YOffset * (1 << 4), 16, 19) |
+ __gen_field(values->Sample1XOffset * (1 << 4), 12, 15) |
+ __gen_field(values->Sample1YOffset * (1 << 4), 8, 11) |
+ __gen_field(values->Sample0XOffset * (1 << 4), 4, 7) |
+ __gen_field(values->Sample0YOffset * (1 << 4), 0, 3) |
0;
dw[3] =
- __gen_field(values->Sample7XOffset, 28, 31) |
- __gen_field(values->Sample7YOffset, 24, 27) |
- __gen_field(values->Sample6XOffset, 20, 23) |
- __gen_field(values->Sample6YOffset, 16, 19) |
- __gen_field(values->Sample5XOffset, 12, 15) |
- __gen_field(values->Sample5YOffset, 8, 11) |
- __gen_field(values->Sample4XOffset, 4, 7) |
- __gen_field(values->Sample4YOffset, 0, 3) |
+ __gen_field(values->Sample7XOffset * (1 << 4), 28, 31) |
+ __gen_field(values->Sample7YOffset * (1 << 4), 24, 27) |
+ __gen_field(values->Sample6XOffset * (1 << 4), 20, 23) |
+ __gen_field(values->Sample6YOffset * (1 << 4), 16, 19) |
+ __gen_field(values->Sample5XOffset * (1 << 4), 12, 15) |
+ __gen_field(values->Sample5YOffset * (1 << 4), 8, 11) |
+ __gen_field(values->Sample4XOffset * (1 << 4), 4, 7) |
+ __gen_field(values->Sample4YOffset * (1 << 4), 0, 3) |
0;
dw[4] =
- __gen_field(values->Sample11XOffset, 28, 31) |
- __gen_field(values->Sample11YOffset, 24, 27) |
- __gen_field(values->Sample10XOffset, 20, 23) |
- __gen_field(values->Sample10YOffset, 16, 19) |
- __gen_field(values->Sample9XOffset, 12, 15) |
- __gen_field(values->Sample9YOffset, 8, 11) |
- __gen_field(values->Sample8XOffset, 4, 7) |
- __gen_field(values->Sample8YOffset, 0, 3) |
+ __gen_field(values->Sample11XOffset * (1 << 4), 28, 31) |
+ __gen_field(values->Sample11YOffset * (1 << 4), 24, 27) |
+ __gen_field(values->Sample10XOffset * (1 << 4), 20, 23) |
+ __gen_field(values->Sample10YOffset * (1 << 4), 16, 19) |
+ __gen_field(values->Sample9XOffset * (1 << 4), 12, 15) |
+ __gen_field(values->Sample9YOffset * (1 << 4), 8, 11) |
+ __gen_field(values->Sample8XOffset * (1 << 4), 4, 7) |
+ __gen_field(values->Sample8YOffset * (1 << 4), 0, 3) |
0;
dw[5] =
- __gen_field(values->Sample15XOffset, 28, 31) |
- __gen_field(values->Sample15YOffset, 24, 27) |
- __gen_field(values->Sample14XOffset, 20, 23) |
- __gen_field(values->Sample14YOffset, 16, 19) |
- __gen_field(values->Sample13XOffset, 12, 15) |
- __gen_field(values->Sample13YOffset, 8, 11) |
- __gen_field(values->Sample12XOffset, 4, 7) |
- __gen_field(values->Sample12YOffset, 0, 3) |
+ __gen_field(values->Sample15XOffset * (1 << 4), 28, 31) |
+ __gen_field(values->Sample15YOffset * (1 << 4), 24, 27) |
+ __gen_field(values->Sample14XOffset * (1 << 4), 20, 23) |
+ __gen_field(values->Sample14YOffset * (1 << 4), 16, 19) |
+ __gen_field(values->Sample13XOffset * (1 << 4), 12, 15) |
+ __gen_field(values->Sample13YOffset * (1 << 4), 8, 11) |
+ __gen_field(values->Sample12XOffset * (1 << 4), 4, 7) |
+ __gen_field(values->Sample12YOffset * (1 << 4), 0, 3) |
0;
}
#define CULLMODE_FRONT 2
#define CULLMODE_BACK 3
uint32_t CullMode;
- uint32_t LineWidth;
+ float LineWidth;
uint32_t LineEndCapAntialiasingRegionWidth;
uint32_t LineStippleEnable;
uint32_t ScissorRectangleEnable;
uint32_t AALineDistanceMode;
uint32_t VertexSubPixelPrecisionSelect;
uint32_t UsePointWidthState;
- uint32_t PointWidth;
+ float PointWidth;
uint32_t GlobalDepthOffsetConstant;
uint32_t GlobalDepthOffsetScale;
uint32_t GlobalDepthOffsetClamp;
dw[2] =
__gen_field(values->AntiAliasingEnable, 31, 31) |
__gen_field(values->CullMode, 29, 30) |
- __gen_field(values->LineWidth, 18, 27) |
+ __gen_field(values->LineWidth * (1 << 7), 18, 27) |
__gen_field(values->LineEndCapAntialiasingRegionWidth, 16, 17) |
__gen_field(values->LineStippleEnable, 14, 14) |
__gen_field(values->ScissorRectangleEnable, 11, 11) |
__gen_field(values->AALineDistanceMode, 14, 14) |
__gen_field(values->VertexSubPixelPrecisionSelect, 12, 12) |
__gen_field(values->UsePointWidthState, 11, 11) |
- __gen_field(values->PointWidth, 0, 10) |
+ __gen_field(values->PointWidth * (1 << 3), 0, 10) |
0;
dw[4] =
uint32_t ShaderChannelSelectG;
uint32_t ShaderChannelSelectB;
uint32_t ShaderChannelSelectA;
- uint32_t ResourceMinLOD;
+ float ResourceMinLOD;
};
static inline void
__gen_field(values->ShaderChannelSelectG, 22, 24) |
__gen_field(values->ShaderChannelSelectB, 19, 21) |
__gen_field(values->ShaderChannelSelectA, 16, 18) |
- __gen_field(values->ResourceMinLOD, 0, 11) |
+ __gen_field(values->ResourceMinLOD * (1 << 8), 0, 11) |
0;
}
uint32_t TextureBorderColorMode;
#define OGL 1
uint32_t LODPreClampEnable;
- uint32_t BaseMipLevel;
+ float BaseMipLevel;
#define MIPFILTER_NONE 0
#define MIPFILTER_NEAREST 1
#define MIPFILTER_LINEAR 3
#define LEGACY 0
#define EWAApproximation 1
uint32_t AnisotropicAlgorithm;
- uint32_t MinLOD;
- uint32_t MaxLOD;
+ float MinLOD;
+ float MaxLOD;
#define PREFILTEROPALWAYS 0
#define PREFILTEROPNEVER 1
#define PREFILTEROPLESS 2
__gen_field(values->SamplerDisable, 31, 31) |
__gen_field(values->TextureBorderColorMode, 29, 29) |
__gen_field(values->LODPreClampEnable, 28, 28) |
- __gen_field(values->BaseMipLevel, 22, 26) |
+ __gen_field(values->BaseMipLevel * (1 << 1), 22, 26) |
__gen_field(values->MipModeFilter, 20, 21) |
__gen_field(values->MagModeFilter, 17, 19) |
__gen_field(values->MinModeFilter, 14, 16) |
0;
dw[1] =
- __gen_field(values->MinLOD, 20, 31) |
- __gen_field(values->MaxLOD, 8, 19) |
+ __gen_field(values->MinLOD * (1 << 8), 20, 31) |
+ __gen_field(values->MaxLOD * (1 << 8), 8, 19) |
__gen_field(values->ShadowFunction, 1, 3) |
__gen_field(values->CubeSurfaceControlMode, 0, 0) |
0;
uint32_t _3DCommandOpcode;
uint32_t _3DCommandSubOpcode;
uint32_t DwordLength;
- uint32_t AACoverageBias;
- uint32_t AACoverageSlope;
- uint32_t AACoverageEndCapBias;
- uint32_t AACoverageEndCapSlope;
+ float AACoverageBias;
+ float AACoverageSlope;
+ float AACoverageEndCapBias;
+ float AACoverageEndCapSlope;
};
static inline void
0;
dw[1] =
- __gen_field(values->AACoverageBias, 16, 23) |
- __gen_field(values->AACoverageSlope, 0, 7) |
+ __gen_field(values->AACoverageBias * (1 << 8), 16, 23) |
+ __gen_field(values->AACoverageSlope * (1 << 8), 0, 7) |
0;
dw[2] =
- __gen_field(values->AACoverageEndCapBias, 16, 23) |
- __gen_field(values->AACoverageEndCapSlope, 0, 7) |
+ __gen_field(values->AACoverageEndCapBias * (1 << 8), 16, 23) |
+ __gen_field(values->AACoverageEndCapSlope * (1 << 8), 0, 7) |
0;
}
#define Vertex1 1
#define Vertex2 2
uint32_t TriangleFanProvokingVertexSelect;
- uint32_t MinimumPointWidth;
- uint32_t MaximumPointWidth;
+ float MinimumPointWidth;
+ float MaximumPointWidth;
uint32_t ForceZeroRTAIndexEnable;
uint32_t MaximumVPIndex;
};
0;
dw[3] =
- __gen_field(values->MinimumPointWidth, 17, 27) |
- __gen_field(values->MaximumPointWidth, 6, 16) |
+ __gen_field(values->MinimumPointWidth * (1 << 3), 17, 27) |
+ __gen_field(values->MaximumPointWidth * (1 << 3), 6, 16) |
__gen_field(values->ForceZeroRTAIndexEnable, 5, 5) |
__gen_field(values->MaximumVPIndex, 0, 3) |
0;
uint32_t CurrentRepeatCounter;
uint32_t CurrentStippleIndex;
uint32_t LineStipplePattern;
- uint32_t LineStippleInverseRepeatCount;
+ float LineStippleInverseRepeatCount;
uint32_t LineStippleRepeatCount;
};
0;
dw[2] =
- __gen_field(values->LineStippleInverseRepeatCount, 15, 31) |
+ __gen_field(values->LineStippleInverseRepeatCount * (1 << 16), 15, 31) |
__gen_field(values->LineStippleRepeatCount, 0, 8) |
0;
#define NUMSAMPLES_4 2
#define NUMSAMPLES_8 3
uint32_t NumberofMultisamples;
- uint32_t Sample3XOffset;
- uint32_t Sample3YOffset;
- uint32_t Sample2XOffset;
- uint32_t Sample2YOffset;
- uint32_t Sample1XOffset;
- uint32_t Sample1YOffset;
- uint32_t Sample0XOffset;
- uint32_t Sample0YOffset;
- uint32_t Sample7XOffset;
- uint32_t Sample7YOffset;
- uint32_t Sample6XOffset;
- uint32_t Sample6YOffset;
- uint32_t Sample5XOffset;
- uint32_t Sample5YOffset;
- uint32_t Sample4XOffset;
- uint32_t Sample4YOffset;
+ float Sample3XOffset;
+ float Sample3YOffset;
+ float Sample2XOffset;
+ float Sample2YOffset;
+ float Sample1XOffset;
+ float Sample1YOffset;
+ float Sample0XOffset;
+ float Sample0YOffset;
+ float Sample7XOffset;
+ float Sample7YOffset;
+ float Sample6XOffset;
+ float Sample6YOffset;
+ float Sample5XOffset;
+ float Sample5YOffset;
+ float Sample4XOffset;
+ float Sample4YOffset;
};
static inline void
0;
dw[2] =
- __gen_field(values->Sample3XOffset, 28, 31) |
- __gen_field(values->Sample3YOffset, 24, 27) |
- __gen_field(values->Sample2XOffset, 20, 23) |
- __gen_field(values->Sample2YOffset, 16, 19) |
- __gen_field(values->Sample1XOffset, 12, 15) |
- __gen_field(values->Sample1YOffset, 8, 11) |
- __gen_field(values->Sample0XOffset, 4, 7) |
- __gen_field(values->Sample0YOffset, 0, 3) |
+ __gen_field(values->Sample3XOffset * (1 << 4), 28, 31) |
+ __gen_field(values->Sample3YOffset * (1 << 4), 24, 27) |
+ __gen_field(values->Sample2XOffset * (1 << 4), 20, 23) |
+ __gen_field(values->Sample2YOffset * (1 << 4), 16, 19) |
+ __gen_field(values->Sample1XOffset * (1 << 4), 12, 15) |
+ __gen_field(values->Sample1YOffset * (1 << 4), 8, 11) |
+ __gen_field(values->Sample0XOffset * (1 << 4), 4, 7) |
+ __gen_field(values->Sample0YOffset * (1 << 4), 0, 3) |
0;
dw[3] =
- __gen_field(values->Sample7XOffset, 28, 31) |
- __gen_field(values->Sample7YOffset, 24, 27) |
- __gen_field(values->Sample6XOffset, 20, 23) |
- __gen_field(values->Sample6YOffset, 16, 19) |
- __gen_field(values->Sample5XOffset, 12, 15) |
- __gen_field(values->Sample5YOffset, 8, 11) |
- __gen_field(values->Sample4XOffset, 4, 7) |
- __gen_field(values->Sample4YOffset, 0, 3) |
+ __gen_field(values->Sample7XOffset * (1 << 4), 28, 31) |
+ __gen_field(values->Sample7YOffset * (1 << 4), 24, 27) |
+ __gen_field(values->Sample6XOffset * (1 << 4), 20, 23) |
+ __gen_field(values->Sample6YOffset * (1 << 4), 16, 19) |
+ __gen_field(values->Sample5XOffset * (1 << 4), 12, 15) |
+ __gen_field(values->Sample5YOffset * (1 << 4), 8, 11) |
+ __gen_field(values->Sample4XOffset * (1 << 4), 4, 7) |
+ __gen_field(values->Sample4YOffset * (1 << 4), 0, 3) |
0;
}
#define CULLMODE_FRONT 2
#define CULLMODE_BACK 3
uint32_t CullMode;
- uint32_t LineWidth;
+ float LineWidth;
uint32_t LineEndCapAntialiasingRegionWidth;
uint32_t ScissorRectangleEnable;
uint32_t MultisampleRasterizationMode;
uint32_t AALineDistanceMode;
uint32_t VertexSubPixelPrecisionSelect;
uint32_t UsePointWidthState;
- uint32_t PointWidth;
+ float PointWidth;
uint32_t GlobalDepthOffsetConstant;
uint32_t GlobalDepthOffsetScale;
uint32_t GlobalDepthOffsetClamp;
dw[2] =
__gen_field(values->AntiAliasingEnable, 31, 31) |
__gen_field(values->CullMode, 29, 30) |
- __gen_field(values->LineWidth, 18, 27) |
+ __gen_field(values->LineWidth * (1 << 7), 18, 27) |
__gen_field(values->LineEndCapAntialiasingRegionWidth, 16, 17) |
__gen_field(values->ScissorRectangleEnable, 11, 11) |
__gen_field(values->MultisampleRasterizationMode, 8, 9) |
__gen_field(values->AALineDistanceMode, 14, 14) |
__gen_field(values->VertexSubPixelPrecisionSelect, 12, 12) |
__gen_field(values->UsePointWidthState, 11, 11) |
- __gen_field(values->PointWidth, 0, 10) |
+ __gen_field(values->PointWidth * (1 << 3), 0, 10) |
0;
dw[4] =
uint32_t TextureBorderColorMode;
#define OGL 1
uint32_t LODPreClampEnable;
- uint32_t BaseMipLevel;
+ float BaseMipLevel;
#define MIPFILTER_NONE 0
#define MIPFILTER_NEAREST 1
#define MIPFILTER_LINEAR 3
#define LEGACY 0
#define EWAApproximation 1
uint32_t AnisotropicAlgorithm;
- uint32_t MinLOD;
- uint32_t MaxLOD;
+ float MinLOD;
+ float MaxLOD;
#define PREFILTEROPALWAYS 0
#define PREFILTEROPNEVER 1
#define PREFILTEROPLESS 2
__gen_field(values->SamplerDisable, 31, 31) |
__gen_field(values->TextureBorderColorMode, 29, 29) |
__gen_field(values->LODPreClampEnable, 28, 28) |
- __gen_field(values->BaseMipLevel, 22, 26) |
+ __gen_field(values->BaseMipLevel * (1 << 1), 22, 26) |
__gen_field(values->MipModeFilter, 20, 21) |
__gen_field(values->MagModeFilter, 17, 19) |
__gen_field(values->MinModeFilter, 14, 16) |
0;
dw[1] =
- __gen_field(values->MinLOD, 20, 31) |
- __gen_field(values->MaxLOD, 8, 19) |
+ __gen_field(values->MinLOD * (1 << 8), 20, 31) |
+ __gen_field(values->MaxLOD * (1 << 8), 8, 19) |
__gen_field(values->ShadowFunction, 1, 3) |
__gen_field(values->CubeSurfaceControlMode, 0, 0) |
0;
uint32_t _3DCommandOpcode;
uint32_t _3DCommandSubOpcode;
uint32_t DwordLength;
- uint32_t AAPointCoverageBias;
- uint32_t AACoverageBias;
- uint32_t AAPointCoverageSlope;
- uint32_t AACoverageSlope;
- uint32_t AAPointCoverageEndCapBias;
- uint32_t AACoverageEndCapBias;
- uint32_t AAPointCoverageEndCapSlope;
- uint32_t AACoverageEndCapSlope;
+ float AAPointCoverageBias;
+ float AACoverageBias;
+ float AAPointCoverageSlope;
+ float AACoverageSlope;
+ float AAPointCoverageEndCapBias;
+ float AACoverageEndCapBias;
+ float AAPointCoverageEndCapSlope;
+ float AACoverageEndCapSlope;
};
static inline void
0;
dw[1] =
- __gen_field(values->AAPointCoverageBias, 24, 31) |
- __gen_field(values->AACoverageBias, 16, 23) |
- __gen_field(values->AAPointCoverageSlope, 8, 15) |
- __gen_field(values->AACoverageSlope, 0, 7) |
+ __gen_field(values->AAPointCoverageBias * (1 << 8), 24, 31) |
+ __gen_field(values->AACoverageBias * (1 << 8), 16, 23) |
+ __gen_field(values->AAPointCoverageSlope * (1 << 8), 8, 15) |
+ __gen_field(values->AACoverageSlope * (1 << 8), 0, 7) |
0;
dw[2] =
- __gen_field(values->AAPointCoverageEndCapBias, 24, 31) |
- __gen_field(values->AACoverageEndCapBias, 16, 23) |
- __gen_field(values->AAPointCoverageEndCapSlope, 8, 15) |
- __gen_field(values->AACoverageEndCapSlope, 0, 7) |
+ __gen_field(values->AAPointCoverageEndCapBias * (1 << 8), 24, 31) |
+ __gen_field(values->AACoverageEndCapBias * (1 << 8), 16, 23) |
+ __gen_field(values->AAPointCoverageEndCapSlope * (1 << 8), 8, 15) |
+ __gen_field(values->AACoverageEndCapSlope * (1 << 8), 0, 7) |
0;
}
uint32_t TriangleStripListProvokingVertexSelect;
uint32_t LineStripListProvokingVertexSelect;
uint32_t TriangleFanProvokingVertexSelect;
- uint32_t MinimumPointWidth;
- uint32_t MaximumPointWidth;
+ float MinimumPointWidth;
+ float MaximumPointWidth;
uint32_t ForceZeroRTAIndexEnable;
uint32_t MaximumVPIndex;
};
0;
dw[3] =
- __gen_field(values->MinimumPointWidth, 17, 27) |
- __gen_field(values->MaximumPointWidth, 6, 16) |
+ __gen_field(values->MinimumPointWidth * (1 << 3), 17, 27) |
+ __gen_field(values->MaximumPointWidth * (1 << 3), 6, 16) |
__gen_field(values->ForceZeroRTAIndexEnable, 5, 5) |
__gen_field(values->MaximumVPIndex, 0, 3) |
0;
uint32_t CurrentRepeatCounter;
uint32_t CurrentStippleIndex;
uint32_t LineStipplePattern;
- uint32_t LineStippleInverseRepeatCount;
+ float LineStippleInverseRepeatCount;
uint32_t LineStippleRepeatCount;
};
0;
dw[2] =
- __gen_field(values->LineStippleInverseRepeatCount, 15, 31) |
+ __gen_field(values->LineStippleInverseRepeatCount * (1 << 16), 15, 31) |
__gen_field(values->LineStippleRepeatCount, 0, 8) |
0;
uint32_t _3DCommandOpcode;
uint32_t _3DCommandSubOpcode;
uint32_t DwordLength;
- uint32_t _8xSample7XOffset;
- uint32_t _8xSample7YOffset;
- uint32_t _8xSample6XOffset;
- uint32_t _8xSample6YOffset;
- uint32_t _8xSample5XOffset;
- uint32_t _8xSample5YOffset;
- uint32_t _8xSample4XOffset;
- uint32_t _8xSample4YOffset;
- uint32_t _8xSample3XOffset;
- uint32_t _8xSample3YOffset;
- uint32_t _8xSample2XOffset;
- uint32_t _8xSample2YOffset;
- uint32_t _8xSample1XOffset;
- uint32_t _8xSample1YOffset;
- uint32_t _8xSample0XOffset;
- uint32_t _8xSample0YOffset;
- uint32_t _4xSample3XOffset;
- uint32_t _4xSample3YOffset;
- uint32_t _4xSample2XOffset;
- uint32_t _4xSample2YOffset;
- uint32_t _4xSample1XOffset;
- uint32_t _4xSample1YOffset;
- uint32_t _4xSample0XOffset;
- uint32_t _4xSample0YOffset;
- uint32_t _1xSample0XOffset;
- uint32_t _1xSample0YOffset;
- uint32_t _2xSample1XOffset;
- uint32_t _2xSample1YOffset;
- uint32_t _2xSample0XOffset;
- uint32_t _2xSample0YOffset;
+ float _8xSample7XOffset;
+ float _8xSample7YOffset;
+ float _8xSample6XOffset;
+ float _8xSample6YOffset;
+ float _8xSample5XOffset;
+ float _8xSample5YOffset;
+ float _8xSample4XOffset;
+ float _8xSample4YOffset;
+ float _8xSample3XOffset;
+ float _8xSample3YOffset;
+ float _8xSample2XOffset;
+ float _8xSample2YOffset;
+ float _8xSample1XOffset;
+ float _8xSample1YOffset;
+ float _8xSample0XOffset;
+ float _8xSample0YOffset;
+ float _4xSample3XOffset;
+ float _4xSample3YOffset;
+ float _4xSample2XOffset;
+ float _4xSample2YOffset;
+ float _4xSample1XOffset;
+ float _4xSample1YOffset;
+ float _4xSample0XOffset;
+ float _4xSample0YOffset;
+ float _1xSample0XOffset;
+ float _1xSample0YOffset;
+ float _2xSample1XOffset;
+ float _2xSample1YOffset;
+ float _2xSample0XOffset;
+ float _2xSample0YOffset;
};
static inline void
0;
dw[5] =
- __gen_field(values->_8xSample7XOffset, 28, 31) |
- __gen_field(values->_8xSample7YOffset, 24, 27) |
- __gen_field(values->_8xSample6XOffset, 20, 23) |
- __gen_field(values->_8xSample6YOffset, 16, 19) |
- __gen_field(values->_8xSample5XOffset, 12, 15) |
- __gen_field(values->_8xSample5YOffset, 8, 11) |
- __gen_field(values->_8xSample4XOffset, 4, 7) |
- __gen_field(values->_8xSample4YOffset, 0, 3) |
+ __gen_field(values->_8xSample7XOffset * (1 << 4), 28, 31) |
+ __gen_field(values->_8xSample7YOffset * (1 << 4), 24, 27) |
+ __gen_field(values->_8xSample6XOffset * (1 << 4), 20, 23) |
+ __gen_field(values->_8xSample6YOffset * (1 << 4), 16, 19) |
+ __gen_field(values->_8xSample5XOffset * (1 << 4), 12, 15) |
+ __gen_field(values->_8xSample5YOffset * (1 << 4), 8, 11) |
+ __gen_field(values->_8xSample4XOffset * (1 << 4), 4, 7) |
+ __gen_field(values->_8xSample4YOffset * (1 << 4), 0, 3) |
0;
dw[6] =
- __gen_field(values->_8xSample3XOffset, 28, 31) |
- __gen_field(values->_8xSample3YOffset, 24, 27) |
- __gen_field(values->_8xSample2XOffset, 20, 23) |
- __gen_field(values->_8xSample2YOffset, 16, 19) |
- __gen_field(values->_8xSample1XOffset, 12, 15) |
- __gen_field(values->_8xSample1YOffset, 8, 11) |
- __gen_field(values->_8xSample0XOffset, 4, 7) |
- __gen_field(values->_8xSample0YOffset, 0, 3) |
+ __gen_field(values->_8xSample3XOffset * (1 << 4), 28, 31) |
+ __gen_field(values->_8xSample3YOffset * (1 << 4), 24, 27) |
+ __gen_field(values->_8xSample2XOffset * (1 << 4), 20, 23) |
+ __gen_field(values->_8xSample2YOffset * (1 << 4), 16, 19) |
+ __gen_field(values->_8xSample1XOffset * (1 << 4), 12, 15) |
+ __gen_field(values->_8xSample1YOffset * (1 << 4), 8, 11) |
+ __gen_field(values->_8xSample0XOffset * (1 << 4), 4, 7) |
+ __gen_field(values->_8xSample0YOffset * (1 << 4), 0, 3) |
0;
dw[7] =
- __gen_field(values->_4xSample3XOffset, 28, 31) |
- __gen_field(values->_4xSample3YOffset, 24, 27) |
- __gen_field(values->_4xSample2XOffset, 20, 23) |
- __gen_field(values->_4xSample2YOffset, 16, 19) |
- __gen_field(values->_4xSample1XOffset, 12, 15) |
- __gen_field(values->_4xSample1YOffset, 8, 11) |
- __gen_field(values->_4xSample0XOffset, 4, 7) |
- __gen_field(values->_4xSample0YOffset, 0, 3) |
+ __gen_field(values->_4xSample3XOffset * (1 << 4), 28, 31) |
+ __gen_field(values->_4xSample3YOffset * (1 << 4), 24, 27) |
+ __gen_field(values->_4xSample2XOffset * (1 << 4), 20, 23) |
+ __gen_field(values->_4xSample2YOffset * (1 << 4), 16, 19) |
+ __gen_field(values->_4xSample1XOffset * (1 << 4), 12, 15) |
+ __gen_field(values->_4xSample1YOffset * (1 << 4), 8, 11) |
+ __gen_field(values->_4xSample0XOffset * (1 << 4), 4, 7) |
+ __gen_field(values->_4xSample0YOffset * (1 << 4), 0, 3) |
0;
dw[8] =
- __gen_field(values->_1xSample0XOffset, 20, 23) |
- __gen_field(values->_1xSample0YOffset, 16, 19) |
- __gen_field(values->_2xSample1XOffset, 12, 15) |
- __gen_field(values->_2xSample1YOffset, 8, 11) |
- __gen_field(values->_2xSample0XOffset, 4, 7) |
- __gen_field(values->_2xSample0YOffset, 0, 3) |
+ __gen_field(values->_1xSample0XOffset * (1 << 4), 20, 23) |
+ __gen_field(values->_1xSample0YOffset * (1 << 4), 16, 19) |
+ __gen_field(values->_2xSample1XOffset * (1 << 4), 12, 15) |
+ __gen_field(values->_2xSample1YOffset * (1 << 4), 8, 11) |
+ __gen_field(values->_2xSample0XOffset * (1 << 4), 4, 7) |
+ __gen_field(values->_2xSample0YOffset * (1 << 4), 0, 3) |
0;
}
uint32_t LegacyGlobalDepthBiasEnable;
uint32_t StatisticsEnable;
uint32_t ViewportTransformEnable;
- uint32_t LineWidth;
+ float LineWidth;
#define _05pixels 0
#define _10pixels 1
#define _20pixels 2
#define Vertex 0
#define State 1
uint32_t PointWidthSource;
- uint32_t PointWidth;
+ float PointWidth;
};
static inline void
0;
dw[2] =
- __gen_field(values->LineWidth, 18, 27) |
+ __gen_field(values->LineWidth * (1 << 7), 18, 27) |
__gen_field(values->LineEndCapAntialiasingRegionWidth, 16, 17) |
0;
__gen_field(values->SmoothPointEnable, 13, 13) |
__gen_field(values->VertexSubPixelPrecisionSelect, 12, 12) |
__gen_field(values->PointWidthSource, 11, 11) |
- __gen_field(values->PointWidth, 0, 10) |
+ __gen_field(values->PointWidth * (1 << 3), 0, 10) |
0;
}
uint32_t CubeFaceEnablePositiveX;
uint32_t CubeFaceEnableNegativeX;
struct GEN8_MEMORY_OBJECT_CONTROL_STATE MemoryObjectControlState;
- uint32_t BaseMipLevel;
+ float BaseMipLevel;
uint32_t SurfaceQPitch;
uint32_t Height;
uint32_t Width;
uint32_t ShaderChannelSelectGreen;
uint32_t ShaderChannelSelectBlue;
uint32_t ShaderChannelSelectAlpha;
- uint32_t ResourceMinLOD;
+ float ResourceMinLOD;
__gen_address_type SurfaceBaseAddress;
uint32_t XOffsetforVPlane;
uint32_t YOffsetforVPlane;
GEN8_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_MemoryObjectControlState, &values->MemoryObjectControlState);
dw[1] =
__gen_field(dw_MemoryObjectControlState, 24, 30) |
- __gen_field(values->BaseMipLevel, 19, 23) |
+ __gen_field(values->BaseMipLevel * (1 << 1), 19, 23) |
__gen_field(values->SurfaceQPitch, 0, 14) |
0;
__gen_field(values->ShaderChannelSelectGreen, 22, 24) |
__gen_field(values->ShaderChannelSelectBlue, 19, 21) |
__gen_field(values->ShaderChannelSelectAlpha, 16, 18) |
- __gen_field(values->ResourceMinLOD, 0, 11) |
+ __gen_field(values->ResourceMinLOD * (1 << 8), 0, 11) |
0;
uint32_t dw8 =
#define CLAMP_NONE 0
#define CLAMP_OGL 2
uint32_t LODPreClampMode;
- uint32_t BaseMipLevel;
+ float BaseMipLevel;
#define MIPFILTER_NONE 0
#define MIPFILTER_NEAREST 1
#define MIPFILTER_LINEAR 3
#define LEGACY 0
#define EWAApproximation 1
uint32_t AnisotropicAlgorithm;
- uint32_t MinLOD;
- uint32_t MaxLOD;
+ float MinLOD;
+ float MaxLOD;
uint32_t ChromaKeyEnable;
uint32_t ChromaKeyIndex;
#define KEYFILTER_KILL_ON_ANY_MATCH 0
__gen_field(values->SamplerDisable, 31, 31) |
__gen_field(values->TextureBorderColorMode, 29, 29) |
__gen_field(values->LODPreClampMode, 27, 28) |
- __gen_field(values->BaseMipLevel, 22, 26) |
+ __gen_field(values->BaseMipLevel * (1 << 1), 22, 26) |
__gen_field(values->MipModeFilter, 20, 21) |
__gen_field(values->MagModeFilter, 17, 19) |
__gen_field(values->MinModeFilter, 14, 16) |
0;
dw[1] =
- __gen_field(values->MinLOD, 20, 31) |
- __gen_field(values->MaxLOD, 8, 19) |
+ __gen_field(values->MinLOD * (1 << 8), 20, 31) |
+ __gen_field(values->MaxLOD * (1 << 8), 8, 19) |
__gen_field(values->ChromaKeyEnable, 7, 7) |
__gen_field(values->ChromaKeyIndex, 5, 6) |
__gen_field(values->ChromaKeyMode, 4, 4) |
.SamplerL2BypassModeDisable = true,
.RenderCacheReadWriteMode = WriteOnlyCache,
.MemoryObjectControlState = GEN8_MOCS,
- .BaseMipLevel = 0,
+ .BaseMipLevel = 0.0,
.SurfaceQPitch = 0,
.Height = image->extent.height - 1,
.Width = image->extent.width - 1,
.ShaderChannelSelectGreen = vk_to_gen_swizzle[pCreateInfo->channels.g],
.ShaderChannelSelectBlue = vk_to_gen_swizzle[pCreateInfo->channels.b],
.ShaderChannelSelectAlpha = vk_to_gen_swizzle[pCreateInfo->channels.a],
- .ResourceMinLOD = 0,
+ .ResourceMinLOD = 0.0,
.SurfaceBaseAddress = { NULL, view->offset },
};
.SamplerL2BypassModeDisable = true,
.RenderCacheReadWriteMode = WriteOnlyCache,
.MemoryObjectControlState = GEN8_MOCS,
- .BaseMipLevel = 0,
+ .BaseMipLevel = 0.0,
.SurfaceQPitch = 0,
.Height = image->extent.height - 1,
.Width = image->extent.width - 1,
.ShaderChannelSelectGreen = SCS_GREEN,
.ShaderChannelSelectBlue = SCS_BLUE,
.ShaderChannelSelectAlpha = SCS_ALPHA,
- .ResourceMinLOD = 0,
+ .ResourceMinLOD = 0.0,
.SurfaceBaseAddress = { NULL, view->offset },
};