diff options
author | Roland Scheidegger <[email protected]> | 2017-11-09 19:53:49 +0100 |
---|---|---|
committer | Roland Scheidegger <[email protected]> | 2017-11-15 03:13:46 +0100 |
commit | 65123ee62cd66cdffe2c4193a3e28e811d73ff65 (patch) | |
tree | 32e7fc06fb952ddf45da870e4c884d04b188a3b2 /src/gallium/drivers/r600/evergreen_state.c | |
parent | 570d5b79929554a45d8aebd294bbd67969396ba5 (diff) |
r600: set the number type correctly for float rts in cb setup
Float rts were always set as unorm instead of float.
Not sure of the consequences, but at least it looks like the blend clamp
would have been enabled, which is against the rules (only eg really bothered
to even attempt to specify this correctly, r600 always used clamp anyway).
Albeit r600 (not r700) setup still looks bugged to me due to never setting
BLEND_FLOAT32 which must be set according to docs...
Not sure if the hw really cares, no piglit change (on eg/juniper).
Reviewed-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600/evergreen_state.c')
-rw-r--r-- | src/gallium/drivers/r600/evergreen_state.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gallium/drivers/r600/evergreen_state.c b/src/gallium/drivers/r600/evergreen_state.c index 7c2dfa092d3..2cd162629d2 100644 --- a/src/gallium/drivers/r600/evergreen_state.c +++ b/src/gallium/drivers/r600/evergreen_state.c @@ -1050,7 +1050,7 @@ static void evergreen_set_color_surface_buffer(struct r600_context *rctx, } } ntype = V_028C70_NUMBER_UNORM; - if (desc->colorspace == UTIL_FORMAT_COLORSPACE_SRGB) + if (desc->colorspace == UTIL_FORMAT_COLORSPACE_SRGB) ntype = V_028C70_NUMBER_SRGB; else if (desc->channel[i].type == UTIL_FORMAT_TYPE_SIGNED) { if (desc->channel[i].normalized) @@ -1062,7 +1062,10 @@ static void evergreen_set_color_surface_buffer(struct r600_context *rctx, ntype = V_028C70_NUMBER_UNORM; else if (desc->channel[i].pure_integer) ntype = V_028C70_NUMBER_UINT; + } else if (desc->channel[i].type == UTIL_FORMAT_TYPE_FLOAT) { + ntype = V_028C70_NUMBER_FLOAT; } + pitch = (pitch / 8) - 1; color->pitch = S_028C64_PITCH_TILE_MAX(pitch); @@ -1188,6 +1191,8 @@ static void evergreen_set_color_surface_common(struct r600_context *rctx, ntype = V_028C70_NUMBER_UNORM; else if (desc->channel[i].pure_integer) ntype = V_028C70_NUMBER_UINT; + } else if (desc->channel[i].type == UTIL_FORMAT_TYPE_FLOAT) { + ntype = V_028C70_NUMBER_FLOAT; } if (R600_BIG_ENDIAN) |