summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi/si_descriptors.c
diff options
context:
space:
mode:
authorMarek Olšák <marek.olsak@amd.com>2016-10-02 15:40:10 +0200
committerMarek Olšák <marek.olsak@amd.com>2016-10-04 16:11:57 +0200
commitb523a9ddc5447ce03c686154ebbc5b1229e5d0a4 (patch)
treeb122ab45d4f55f4057a30e3b8626ca24c7f182c3 /src/gallium/drivers/radeonsi/si_descriptors.c
parent82e51e818849f8f8600456fa476654630792bcf9 (diff)
downloadexternal_mesa3d-b523a9ddc5447ce03c686154ebbc5b1229e5d0a4.zip
external_mesa3d-b523a9ddc5447ce03c686154ebbc5b1229e5d0a4.tar.gz
external_mesa3d-b523a9ddc5447ce03c686154ebbc5b1229e5d0a4.tar.bz2
radeonsi: drop support for NULL sampler views
not used anymore. It was used when the polygon stipple texture was constant. Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_descriptors.c')
-rw-r--r--src/gallium/drivers/radeonsi/si_descriptors.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gallium/drivers/radeonsi/si_descriptors.c b/src/gallium/drivers/radeonsi/si_descriptors.c
index 21dad3c..3066323 100644
--- a/src/gallium/drivers/radeonsi/si_descriptors.c
+++ b/src/gallium/drivers/radeonsi/si_descriptors.c
@@ -410,10 +410,11 @@ static void si_set_sampler_view(struct si_context *sctx,
struct r600_texture *rtex = (struct r600_texture *)view->texture;
uint32_t *desc = descs->list + slot * 16;
+ assert(rtex); /* views with texture == NULL aren't supported */
pipe_sampler_view_reference(&views->views[slot], view);
memcpy(desc, rview->state, 8*4);
- if (view->texture && view->texture->target != PIPE_BUFFER) {
+ if (rtex->resource.b.b.target != PIPE_BUFFER) {
bool is_separate_stencil =
rtex->db_compatible &&
rview->is_stencil_sampler;
@@ -427,7 +428,7 @@ static void si_set_sampler_view(struct si_context *sctx,
desc);
}
- if (view->texture && view->texture->target != PIPE_BUFFER &&
+ if (rtex->resource.b.b.target != PIPE_BUFFER &&
rtex->fmask.size) {
memcpy(desc + 8,
rview->fmask_state, 8*4);