Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

D3D11 backend: fix rounding in texture encoder. #280

Merged
merged 1 commit into from Apr 16, 2014

Conversation

magumagu
Copy link
Contributor

We need to explicitly round when converting colors from float to uint
because multiplying a normalized float by 255 might not result in a whole
number. (The exact result here may vary depending on your
drivers/hardware.)

Ideally, we shouldn't be using floating point here, but fixing that is a
much more complicated patch.

Fixes gxtest TEV tests using Intel HD 4000.

We need to explicitly round when converting colors from float to uint
because multiplying a normalized float by 255 might not result in a whole
number.  (The exact result here may vary depending on your
drivers/hardware.)

Ideally, we shouldn't be using floating point here, but fixing that is a
much more complicated patch.

Fixes gxtest TEV tests using Intel HD 4000.
@neobrain
Copy link
Member

LGTM.

Parlane added a commit that referenced this pull request Apr 16, 2014
D3D11 backend: fix rounding in texture encoder.
@Parlane Parlane merged commit 1ab8ced into dolphin-emu:master Apr 16, 2014
@magumagu magumagu deleted the d3d-texture-encoder-rounding branch April 18, 2014 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants