summaryrefslogtreecommitdiff
path: root/lib/mesa/src/gallium
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2019-03-19 10:59:05 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2019-03-19 10:59:05 +0000
commit036675986b3a8c69c5f16cef61eeb357f0e9034c (patch)
treea05ed7bf3cb60adf336881b35c60557ed58e4f2e /lib/mesa/src/gallium
parentc6c89f3d145af6172506336c12c4fed4d05956b6 (diff)
Merge Mesa 18.3.5
Diffstat (limited to 'lib/mesa/src/gallium')
-rw-r--r--lib/mesa/src/gallium/auxiliary/tgsi/tgsi_scan.h4
-rw-r--r--lib/mesa/src/gallium/drivers/radeonsi/si_pipe.c11
-rw-r--r--lib/mesa/src/gallium/drivers/swr/swr_screen.cpp4
-rw-r--r--lib/mesa/src/gallium/state_trackers/nine/nine_pipe.h4
-rw-r--r--lib/mesa/src/gallium/state_trackers/nine/swapchain9.c9
5 files changed, 20 insertions, 12 deletions
diff --git a/lib/mesa/src/gallium/auxiliary/tgsi/tgsi_scan.h b/lib/mesa/src/gallium/auxiliary/tgsi/tgsi_scan.h
index 1887ff342..e251e1dc0 100644
--- a/lib/mesa/src/gallium/auxiliary/tgsi/tgsi_scan.h
+++ b/lib/mesa/src/gallium/auxiliary/tgsi/tgsi_scan.h
@@ -213,7 +213,9 @@ tgsi_is_bindless_image_file(unsigned file)
{
return file != TGSI_FILE_IMAGE &&
file != TGSI_FILE_MEMORY &&
- file != TGSI_FILE_BUFFER;
+ file != TGSI_FILE_BUFFER &&
+ file != TGSI_FILE_CONSTBUF &&
+ file != TGSI_FILE_HW_ATOMIC;
}
#ifdef __cplusplus
diff --git a/lib/mesa/src/gallium/drivers/radeonsi/si_pipe.c b/lib/mesa/src/gallium/drivers/radeonsi/si_pipe.c
index 490a37148..e37a85e87 100644
--- a/lib/mesa/src/gallium/drivers/radeonsi/si_pipe.c
+++ b/lib/mesa/src/gallium/drivers/radeonsi/si_pipe.c
@@ -508,14 +508,6 @@ static struct pipe_context *si_create_context(struct pipe_screen *screen,
if (sscreen->debug_flags & DBG(FORCE_DMA))
sctx->b.resource_copy_region = sctx->dma_copy;
- bool dst_stream_policy = SI_COMPUTE_DST_CACHE_POLICY != L2_LRU;
- sctx->cs_clear_buffer = si_create_dma_compute_shader(&sctx->b,
- SI_COMPUTE_CLEAR_DW_PER_THREAD,
- dst_stream_policy, false);
- sctx->cs_copy_buffer = si_create_dma_compute_shader(&sctx->b,
- SI_COMPUTE_COPY_DW_PER_THREAD,
- dst_stream_policy, true);
-
sctx->blitter = util_blitter_create(&sctx->b);
if (sctx->blitter == NULL)
goto fail;
@@ -873,7 +865,8 @@ struct pipe_screen *radeonsi_screen_create(struct radeon_winsys *ws,
sscreen->debug_flags |= DBG(FS_CORRECT_DERIVS_AFTER_KILL);
if (driQueryOptionb(config->options, "radeonsi_enable_sisched"))
sscreen->debug_flags |= DBG(SI_SCHED);
-
+ if (driQueryOptionb(config->options, "radeonsi_enable_nir"))
+ sscreen->debug_flags |= DBG(NIR);
if (sscreen->debug_flags & DBG(INFO))
ac_print_gpu_info(&sscreen->info);
diff --git a/lib/mesa/src/gallium/drivers/swr/swr_screen.cpp b/lib/mesa/src/gallium/drivers/swr/swr_screen.cpp
index de9008ddf..c29a90bad 100644
--- a/lib/mesa/src/gallium/drivers/swr/swr_screen.cpp
+++ b/lib/mesa/src/gallium/drivers/swr/swr_screen.cpp
@@ -844,7 +844,9 @@ swr_texture_layout(struct swr_screen *screen,
size_t total_size = (uint64_t)res->swr.depth * res->swr.qpitch *
res->swr.pitch * res->swr.numSamples;
- if (total_size > SWR_MAX_TEXTURE_SIZE)
+
+ // Let non-sampled textures (e.g. buffer objects) bypass the size limit
+ if (swr_resource_is_texture(&res->base) && total_size > SWR_MAX_TEXTURE_SIZE)
return false;
if (allocate) {
diff --git a/lib/mesa/src/gallium/state_trackers/nine/nine_pipe.h b/lib/mesa/src/gallium/state_trackers/nine/nine_pipe.h
index 7b68c09c4..0595da553 100644
--- a/lib/mesa/src/gallium/state_trackers/nine/nine_pipe.h
+++ b/lib/mesa/src/gallium/state_trackers/nine/nine_pipe.h
@@ -377,6 +377,10 @@ d3dmultisample_type_check(struct pipe_screen *screen,
if (levels)
*levels = 1;
+ /* Ignores multisamplequality */
+ if (*multisample == D3DMULTISAMPLE_NONE)
+ return D3D_OK;
+
if (*multisample == D3DMULTISAMPLE_NONMASKABLE) {
if (depth_stencil_format(format))
bind = d3d9_get_pipe_depth_format_bindings(format);
diff --git a/lib/mesa/src/gallium/state_trackers/nine/swapchain9.c b/lib/mesa/src/gallium/state_trackers/nine/swapchain9.c
index 0958a9070..296a9c05b 100644
--- a/lib/mesa/src/gallium/state_trackers/nine/swapchain9.c
+++ b/lib/mesa/src/gallium/state_trackers/nine/swapchain9.c
@@ -696,9 +696,16 @@ present( struct NineSwapChain9 *This,
if (This->params.SwapEffect == D3DSWAPEFFECT_DISCARD)
handle_draw_cursor_and_hud(This, resource);
- ID3DPresent_GetWindowInfo(This->present, hDestWindowOverride, &target_width, &target_height, &target_depth);
+ hr = ID3DPresent_GetWindowInfo(This->present, hDestWindowOverride, &target_width, &target_height, &target_depth);
(void)target_depth;
+ /* Can happen with old Wine (presentation can still succeed),
+ * or at window destruction. */
+ if (FAILED(hr) || target_width == 0 || target_height == 0) {
+ target_width = resource->width0;
+ target_height = resource->height0;
+ }
+
pipe = NineDevice9_GetPipe(This->base.device);
if (This->present_buffers[0]) {