diff options
author | Alejandro PiƱeiro <[email protected]> | 2015-12-19 12:45:43 +0100 |
---|---|---|
committer | Eduardo Lima Mitev <[email protected]> | 2016-03-03 15:14:06 +0100 |
commit | e98a3c799f5db65966f87c5d59552ae22a001084 (patch) | |
tree | 5bf81edfea3eb6e5a8cbe6aec0066192dc69e675 /src/mesa/main/texcompress_rgtc.h | |
parent | 580816b74723af481dd85c845caca8aa41274ed5 (diff) |
mesa/formatquery: handle unmodified buffer for SAMPLES on the 64-bit query
From arb_internalformat_query2 spec:
" If <internalformat> is not color-renderable, depth-renderable, or
stencil-renderable (as defined in section 4.4.4), or if <target>
does not support multiple samples (ie other than
TEXTURE_2D_MULTISAMPLE, TEXTURE_2D_MULTISAMPLE_ARRAY, or
RENDERBUFFER), <params> is not modified."
So there are cases where the buffer should not be modified. As the
64-bit query is a wrapper over the 32-bit query, we can't just copy
the values to the equivalent 32-bit buffer, as that would fail if the
original params contained values greater that INT_MAX. So we need to
copy-back only the values that got modified by the 32-bit query. We do
that by filling the temporal buffer by negatives, as the 32-bit query
should not return negative values ever.
Reviewed-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/mesa/main/texcompress_rgtc.h')
0 files changed, 0 insertions, 0 deletions