mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-08 23:40:12 +01:00
mesa: Set correct values for range/precision of shader integer types
This commit is contained in:
parent
dde3270c19
commit
04dca296e0
1 changed files with 11 additions and 2 deletions
|
|
@ -534,8 +534,17 @@ init_program_limits(GLenum type, struct gl_program_constants *prog)
|
|||
prog->MediumFloat.RangeMax = 127;
|
||||
prog->MediumFloat.Precision = 23;
|
||||
prog->LowFloat = prog->HighFloat = prog->MediumFloat;
|
||||
/* assume ints are stored as floats for now */
|
||||
prog->LowInt = prog->MediumInt = prog->HighInt = prog->MediumFloat;
|
||||
|
||||
/* Assume ints are stored as floats for now, since this is the least-common
|
||||
* denominator. The OpenGL ES spec implies (page 132) that the precision
|
||||
* of integer types should be 0. Practically speaking, IEEE
|
||||
* single-precision floating point values can only store integers in the
|
||||
* range [-0x01000000, 0x01000000] without loss of precision.
|
||||
*/
|
||||
prog->MediumInt.RangeMin = 24;
|
||||
prog->MediumInt.RangeMax = 24;
|
||||
prog->MediumInt.Precision = 0;
|
||||
prog->LowInt = prog->HighInt = prog->MediumInt;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue