diff options
author | Tim Rowley <[email protected]> | 2016-04-27 17:16:26 -0600 |
---|---|---|
committer | Tim Rowley <[email protected]> | 2016-05-05 14:49:18 -0500 |
commit | 5332c9d931c0d2d60c4ed0478c126fc73de1b8db (patch) | |
tree | ca2d795e8356edb8dac72bc176aa9133aec304fd /src/gallium/drivers | |
parent | 6e8922705435a1649e51ea404b89aaeba37d555a (diff) |
swr: [rasterizer jitter] Add asserts for supported formats in fetch shader
Reviewed-by: Bruce Cherniak <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp b/src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp index ba1096dc214..42b1c3ec5cd 100644 --- a/src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp +++ b/src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp @@ -252,6 +252,7 @@ void FetchJit::JitLoadVertices(const FETCH_COMPILE_STATE &fetchState, Value* fet Value* elements[4] = {0}; const INPUT_ELEMENT_DESC& ied = fetchState.layout[nelt]; const SWR_FORMAT_INFO &info = GetFormatInfo((SWR_FORMAT)ied.Format); + SWR_ASSERT((info.bpp != 0), "Unsupported format in JitLoadVertices."); uint32_t numComponents = info.numComps; uint32_t bpc = info.bpp / info.numComps; ///@todo Code below assumes all components are same size. Need to fix. @@ -658,6 +659,7 @@ void FetchJit::JitGatherVertices(const FETCH_COMPILE_STATE &fetchState, Value* f { const INPUT_ELEMENT_DESC& ied = fetchState.layout[nInputElt]; const SWR_FORMAT_INFO &info = GetFormatInfo((SWR_FORMAT)ied.Format); + SWR_ASSERT((info.bpp != 0), "Unsupported format in JitGatherVertices."); uint32_t bpc = info.bpp / info.numComps; ///@todo Code below assumes all components are same size. Need to fix. Value *stream = LOAD(streams, {ied.StreamIndex, SWR_VERTEX_BUFFER_STATE_pData}); |