Compare commits
28 Commits
mesa-17.1.
...
mesa-17.1.
Author | SHA1 | Date | |
---|---|---|---|
|
f60875e211 | ||
|
5ab872d64a | ||
|
9bc4ee1c8e | ||
|
b708c2961e | ||
|
538975fdf8 | ||
|
3734a7de6c | ||
|
423dab9d32 | ||
|
18fd7249c5 | ||
|
f66de22af4 | ||
|
8bd7d8c042 | ||
|
ffb46c8826 | ||
|
c8226d3782 | ||
|
6f062ba893 | ||
|
891dafc8e7 | ||
|
2a7279fa8f | ||
|
ae960d7dee | ||
|
3a193c009b | ||
|
4889bb6af3 | ||
|
845c238ce2 | ||
|
67acca073a | ||
|
7b10ed6a12 | ||
|
5a8d7ef65a | ||
|
98564569d0 | ||
|
6348a02e27 | ||
|
c24bdf046e | ||
|
15b5e5996a | ||
|
8cfaa8ad66 | ||
|
4908b1e909 |
10
configure.ac
10
configure.ac
@@ -97,7 +97,7 @@ XSHMFENCE_REQUIRED=1.1
|
||||
XVMC_REQUIRED=1.0.6
|
||||
PYTHON_MAKO_REQUIRED=0.8.0
|
||||
LIBSENSORS_REQUIRED=4.0.0
|
||||
ZLIB_REQUIRED=1.2.8
|
||||
ZLIB_REQUIRED=1.2.3
|
||||
|
||||
dnl LLVM versions
|
||||
LLVM_REQUIRED_GALLIUM=3.3.0
|
||||
@@ -2476,10 +2476,10 @@ if test -n "$with_gallium_drivers"; then
|
||||
xswr)
|
||||
llvm_require_version $LLVM_REQUIRED_SWR "swr"
|
||||
|
||||
swr_require_cxx_feature_flags "C++14" "__cplusplus >= 201402L" \
|
||||
"-std=c++14" \
|
||||
SWR_CXX14_CXXFLAGS
|
||||
AC_SUBST([SWR_CXX14_CXXFLAGS])
|
||||
swr_require_cxx_feature_flags "C++11" "__cplusplus >= 201103L" \
|
||||
",-std=c++11" \
|
||||
SWR_CXX11_CXXFLAGS
|
||||
AC_SUBST([SWR_CXX11_CXXFLAGS])
|
||||
|
||||
swr_require_cxx_feature_flags "AVX" "defined(__AVX__)" \
|
||||
",-mavx,-march=core-avx" \
|
||||
|
@@ -31,7 +31,8 @@ because compatibility contexts are not supported.
|
||||
|
||||
<h2>SHA256 checksums</h2>
|
||||
<pre>
|
||||
TBD
|
||||
0d2020c2115db0d13a5be0075abf0da143290f69f5817a2f277861e89166a3e1 mesa-17.1.2.tar.gz
|
||||
0937804f43746339b1f9540d8f9c8b4a1bb3d3eec0e4020eac283b8799798239 mesa-17.1.2.tar.xz
|
||||
</pre>
|
||||
|
||||
|
||||
|
155
docs/relnotes/17.1.3.html
Normal file
155
docs/relnotes/17.1.3.html
Normal file
@@ -0,0 +1,155 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<title>Mesa Release Notes</title>
|
||||
<link rel="stylesheet" type="text/css" href="../mesa.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="header">
|
||||
<h1>The Mesa 3D Graphics Library</h1>
|
||||
</div>
|
||||
|
||||
<iframe src="../contents.html"></iframe>
|
||||
<div class="content">
|
||||
|
||||
<h1>Mesa 17.1.3 Release Notes / June 19, 2017</h1>
|
||||
|
||||
<p>
|
||||
Mesa 17.1.3 is a bug fix release which fixes bugs found since the 17.1.2 release.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 17.1.3 implements the OpenGL 4.5 API, but the version reported by
|
||||
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
|
||||
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
|
||||
Some drivers don't support all the features required in OpenGL 4.5. OpenGL
|
||||
4.5 is <strong>only</strong> available if requested at context creation
|
||||
because compatibility contexts are not supported.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>SHA256 checksums</h2>
|
||||
<pre>
|
||||
TBD
|
||||
</pre>
|
||||
|
||||
|
||||
<h2>New features</h2>
|
||||
<p>None</p>
|
||||
|
||||
|
||||
<h2>Bug fixes</h2>
|
||||
|
||||
<ul>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=100988">Bug 100988</a> - glXGetCurrentDisplay() no longer works for FakeGLX contexts?</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Changes</h2>
|
||||
|
||||
<p>Bas Nieuwenhuizen (3):</p>
|
||||
<ul>
|
||||
<li>radv: Set both compute and graphics SGPRS on descriptor set flush.</li>
|
||||
<li>radv: Dirty all descriptors sets when changing the pipeline.</li>
|
||||
<li>radv: Remove SI num RB override for occlusion queries.</li>
|
||||
</ul>
|
||||
|
||||
<p>Brian Paul (1):</p>
|
||||
<ul>
|
||||
<li>xlib: fix glXGetCurrentDisplay() failure</li>
|
||||
</ul>
|
||||
|
||||
<p>Chad Versace (1):</p>
|
||||
<ul>
|
||||
<li>i965/dri: Fix bad GL error in intel_create_winsys_renderbuffer()</li>
|
||||
</ul>
|
||||
|
||||
<p>Chuck Atkins (1):</p>
|
||||
<ul>
|
||||
<li>configure.ac: Reduce zlib requirement from 1.2.8 to 1.2.3.</li>
|
||||
</ul>
|
||||
|
||||
<p>Dave Airlie (3):</p>
|
||||
<ul>
|
||||
<li>radv: expose integrated device type for APUs.</li>
|
||||
<li>radv: set fmask state to all 0s when no fmask. (v2)</li>
|
||||
<li>glsl/lower_distance: only set max_array_access for 1D clip dist arrays</li>
|
||||
</ul>
|
||||
|
||||
<p>Emil Velikov (1):</p>
|
||||
<ul>
|
||||
<li>Update version to 17.1.3</li>
|
||||
</ul>
|
||||
|
||||
<p>Grazvydas Ignotas (1):</p>
|
||||
<ul>
|
||||
<li>radv: fix trace dumping for !use_ib_bos</li>
|
||||
</ul>
|
||||
|
||||
<p>Jason Ekstrand (4):</p>
|
||||
<ul>
|
||||
<li>i965/blorp: Take a layer range in intel_hiz_exec</li>
|
||||
<li>i965: Move the pre-depth-clear flush/stalls to intel_hiz_exec</li>
|
||||
<li>i965: Perform HiZ flush/stall prior to HiZ resolves</li>
|
||||
<li>i965: Mark depth surfaces as needing a HiZ resolve after blitting</li>
|
||||
</ul>
|
||||
|
||||
<p>José Fonseca (1):</p>
|
||||
<ul>
|
||||
<li>automake: Link all libGL.so variants with -Bsymbolic.</li>
|
||||
</ul>
|
||||
|
||||
<p>Juan A. Suarez Romero (1):</p>
|
||||
<ul>
|
||||
<li>docs: add sha256 checksums for 17.1.2</li>
|
||||
</ul>
|
||||
|
||||
<p>Lucas Stach (1):</p>
|
||||
<ul>
|
||||
<li>etnaviv: always do cpu_fini in transfer_unmap</li>
|
||||
</ul>
|
||||
|
||||
<p>Lyude (1):</p>
|
||||
<ul>
|
||||
<li>nvc0: disable BGRA8 images on Fermi</li>
|
||||
</ul>
|
||||
|
||||
<p>Marek Olšák (3):</p>
|
||||
<ul>
|
||||
<li>st/mesa: don't load cached TGSI shaders on demand</li>
|
||||
<li>radeonsi: fix a GPU hang with tessellation on 2-CU configs</li>
|
||||
<li>radeonsi: disable the patch ID workaround on SI when the patch ID isn't used (v2)</li>
|
||||
</ul>
|
||||
|
||||
<p>Nicolai Hähnle (1):</p>
|
||||
<ul>
|
||||
<li>radv: fewer than 8 RBs are possible</li>
|
||||
</ul>
|
||||
|
||||
<p>Nicolas Dechesne (1):</p>
|
||||
<ul>
|
||||
<li>util/rand_xor: add missing include statements</li>
|
||||
</ul>
|
||||
|
||||
<p>Tapani Pälli (1):</p>
|
||||
<ul>
|
||||
<li>egl: fix _eglQuerySurface in EGL_BUFFER_AGE_EXT case</li>
|
||||
</ul>
|
||||
|
||||
<p>Thomas Hellstrom (1):</p>
|
||||
<ul>
|
||||
<li>dri3/GLX: Fix drawable invalidation v2</li>
|
||||
</ul>
|
||||
|
||||
<p>Tim Rowley (1):</p>
|
||||
<ul>
|
||||
<li>swr: relax c++ requirement from c++14 to c++11</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@@ -1268,38 +1268,39 @@ emit_stage_descriptor_set_userdata(struct radv_cmd_buffer *cmd_buffer,
|
||||
|
||||
static void
|
||||
radv_emit_descriptor_set_userdata(struct radv_cmd_buffer *cmd_buffer,
|
||||
struct radv_pipeline *pipeline,
|
||||
VkShaderStageFlags stages,
|
||||
struct radv_descriptor_set *set,
|
||||
unsigned idx)
|
||||
{
|
||||
if (stages & VK_SHADER_STAGE_FRAGMENT_BIT)
|
||||
emit_stage_descriptor_set_userdata(cmd_buffer, pipeline,
|
||||
idx, set->va,
|
||||
MESA_SHADER_FRAGMENT);
|
||||
if (cmd_buffer->state.pipeline) {
|
||||
if (stages & VK_SHADER_STAGE_FRAGMENT_BIT)
|
||||
emit_stage_descriptor_set_userdata(cmd_buffer, cmd_buffer->state.pipeline,
|
||||
idx, set->va,
|
||||
MESA_SHADER_FRAGMENT);
|
||||
|
||||
if (stages & VK_SHADER_STAGE_VERTEX_BIT)
|
||||
emit_stage_descriptor_set_userdata(cmd_buffer, pipeline,
|
||||
idx, set->va,
|
||||
MESA_SHADER_VERTEX);
|
||||
if (stages & VK_SHADER_STAGE_VERTEX_BIT)
|
||||
emit_stage_descriptor_set_userdata(cmd_buffer, cmd_buffer->state.pipeline,
|
||||
idx, set->va,
|
||||
MESA_SHADER_VERTEX);
|
||||
|
||||
if ((stages & VK_SHADER_STAGE_GEOMETRY_BIT) && radv_pipeline_has_gs(pipeline))
|
||||
emit_stage_descriptor_set_userdata(cmd_buffer, pipeline,
|
||||
idx, set->va,
|
||||
MESA_SHADER_GEOMETRY);
|
||||
if ((stages & VK_SHADER_STAGE_GEOMETRY_BIT) && radv_pipeline_has_gs(cmd_buffer->state.pipeline))
|
||||
emit_stage_descriptor_set_userdata(cmd_buffer, cmd_buffer->state.pipeline,
|
||||
idx, set->va,
|
||||
MESA_SHADER_GEOMETRY);
|
||||
|
||||
if ((stages & VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT) && radv_pipeline_has_tess(pipeline))
|
||||
emit_stage_descriptor_set_userdata(cmd_buffer, pipeline,
|
||||
idx, set->va,
|
||||
MESA_SHADER_TESS_CTRL);
|
||||
if ((stages & VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT) && radv_pipeline_has_tess(cmd_buffer->state.pipeline))
|
||||
emit_stage_descriptor_set_userdata(cmd_buffer, cmd_buffer->state.pipeline,
|
||||
idx, set->va,
|
||||
MESA_SHADER_TESS_CTRL);
|
||||
|
||||
if ((stages & VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT) && radv_pipeline_has_tess(pipeline))
|
||||
emit_stage_descriptor_set_userdata(cmd_buffer, pipeline,
|
||||
idx, set->va,
|
||||
MESA_SHADER_TESS_EVAL);
|
||||
if ((stages & VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT) && radv_pipeline_has_tess(cmd_buffer->state.pipeline))
|
||||
emit_stage_descriptor_set_userdata(cmd_buffer, cmd_buffer->state.pipeline,
|
||||
idx, set->va,
|
||||
MESA_SHADER_TESS_EVAL);
|
||||
}
|
||||
|
||||
if (stages & VK_SHADER_STAGE_COMPUTE_BIT)
|
||||
emit_stage_descriptor_set_userdata(cmd_buffer, pipeline,
|
||||
if (cmd_buffer->state.compute_pipeline && (stages & VK_SHADER_STAGE_COMPUTE_BIT))
|
||||
emit_stage_descriptor_set_userdata(cmd_buffer, cmd_buffer->state.compute_pipeline,
|
||||
idx, set->va,
|
||||
MESA_SHADER_COMPUTE);
|
||||
}
|
||||
@@ -1324,7 +1325,6 @@ radv_flush_push_descriptors(struct radv_cmd_buffer *cmd_buffer)
|
||||
|
||||
static void
|
||||
radv_flush_descriptors(struct radv_cmd_buffer *cmd_buffer,
|
||||
struct radv_pipeline *pipeline,
|
||||
VkShaderStageFlags stages)
|
||||
{
|
||||
unsigned i;
|
||||
@@ -1345,7 +1345,7 @@ radv_flush_descriptors(struct radv_cmd_buffer *cmd_buffer,
|
||||
if (!set)
|
||||
continue;
|
||||
|
||||
radv_emit_descriptor_set_userdata(cmd_buffer, pipeline, stages, set, i);
|
||||
radv_emit_descriptor_set_userdata(cmd_buffer, stages, set, i);
|
||||
}
|
||||
cmd_buffer->state.descriptors_dirty = 0;
|
||||
cmd_buffer->state.push_descriptors_dirty = false;
|
||||
@@ -1515,8 +1515,7 @@ radv_cmd_buffer_flush_state(struct radv_cmd_buffer *cmd_buffer,
|
||||
|
||||
radv_emit_primitive_reset_state(cmd_buffer, indexed_draw);
|
||||
|
||||
radv_flush_descriptors(cmd_buffer, cmd_buffer->state.pipeline,
|
||||
VK_SHADER_STAGE_ALL_GRAPHICS);
|
||||
radv_flush_descriptors(cmd_buffer, VK_SHADER_STAGE_ALL_GRAPHICS);
|
||||
radv_flush_constants(cmd_buffer, cmd_buffer->state.pipeline,
|
||||
VK_SHADER_STAGE_ALL_GRAPHICS);
|
||||
|
||||
@@ -2153,6 +2152,13 @@ radv_emit_compute_pipeline(struct radv_cmd_buffer *cmd_buffer)
|
||||
assert(cmd_buffer->cs->cdw <= cdw_max);
|
||||
}
|
||||
|
||||
static void radv_mark_descriptor_sets_dirty(struct radv_cmd_buffer *cmd_buffer)
|
||||
{
|
||||
for (unsigned i = 0; i < MAX_SETS; i++) {
|
||||
if (cmd_buffer->state.descriptors[i])
|
||||
cmd_buffer->state.descriptors_dirty |= (1u << i);
|
||||
}
|
||||
}
|
||||
|
||||
void radv_CmdBindPipeline(
|
||||
VkCommandBuffer commandBuffer,
|
||||
@@ -2162,10 +2168,7 @@ void radv_CmdBindPipeline(
|
||||
RADV_FROM_HANDLE(radv_cmd_buffer, cmd_buffer, commandBuffer);
|
||||
RADV_FROM_HANDLE(radv_pipeline, pipeline, _pipeline);
|
||||
|
||||
for (unsigned i = 0; i < MAX_SETS; i++) {
|
||||
if (cmd_buffer->state.descriptors[i])
|
||||
cmd_buffer->state.descriptors_dirty |= (1 << i);
|
||||
}
|
||||
radv_mark_descriptor_sets_dirty(cmd_buffer);
|
||||
|
||||
switch (pipelineBindPoint) {
|
||||
case VK_PIPELINE_BIND_POINT_COMPUTE:
|
||||
@@ -2174,6 +2177,9 @@ void radv_CmdBindPipeline(
|
||||
break;
|
||||
case VK_PIPELINE_BIND_POINT_GRAPHICS:
|
||||
cmd_buffer->state.pipeline = pipeline;
|
||||
if (!pipeline)
|
||||
break;
|
||||
|
||||
cmd_buffer->state.vertex_descriptors_dirty = true;
|
||||
cmd_buffer->state.dirty |= RADV_CMD_DIRTY_PIPELINE;
|
||||
cmd_buffer->push_constant_stages |= pipeline->active_stages;
|
||||
@@ -2336,7 +2342,6 @@ void radv_CmdSetStencilReference(
|
||||
cmd_buffer->state.dirty |= RADV_CMD_DIRTY_DYNAMIC_STENCIL_REFERENCE;
|
||||
}
|
||||
|
||||
|
||||
void radv_CmdExecuteCommands(
|
||||
VkCommandBuffer commandBuffer,
|
||||
uint32_t commandBufferCount,
|
||||
@@ -2381,6 +2386,7 @@ void radv_CmdExecuteCommands(
|
||||
primary->state.dirty |= RADV_CMD_DIRTY_DYNAMIC_ALL;
|
||||
primary->state.last_primitive_reset_en = -1;
|
||||
primary->state.last_primitive_reset_index = 0;
|
||||
radv_mark_descriptor_sets_dirty(primary);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2757,8 +2763,7 @@ static void
|
||||
radv_flush_compute_state(struct radv_cmd_buffer *cmd_buffer)
|
||||
{
|
||||
radv_emit_compute_pipeline(cmd_buffer);
|
||||
radv_flush_descriptors(cmd_buffer, cmd_buffer->state.compute_pipeline,
|
||||
VK_SHADER_STAGE_COMPUTE_BIT);
|
||||
radv_flush_descriptors(cmd_buffer, VK_SHADER_STAGE_COMPUTE_BIT);
|
||||
radv_flush_constants(cmd_buffer, cmd_buffer->state.compute_pipeline,
|
||||
VK_SHADER_STAGE_COMPUTE_BIT);
|
||||
si_emit_cache_flush(cmd_buffer);
|
||||
|
@@ -676,7 +676,7 @@ void radv_GetPhysicalDeviceProperties(
|
||||
.driverVersion = radv_get_driver_version(),
|
||||
.vendorID = 0x1002,
|
||||
.deviceID = pdevice->rad_info.pci_id,
|
||||
.deviceType = VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU,
|
||||
.deviceType = pdevice->rad_info.has_dedicated_vram ? VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU : VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU,
|
||||
.limits = limits,
|
||||
.sparseProperties = {0},
|
||||
};
|
||||
|
@@ -382,7 +382,8 @@ si_make_texture_descriptor(struct radv_device *device,
|
||||
S_008F24_LAST_ARRAY(last_layer);
|
||||
fmask_state[6] = 0;
|
||||
fmask_state[7] = 0;
|
||||
}
|
||||
} else if (fmask_state)
|
||||
memset(fmask_state, 0, 8 * 4);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@@ -51,10 +51,10 @@ void
|
||||
radv_meta_restore(const struct radv_meta_saved_state *state,
|
||||
struct radv_cmd_buffer *cmd_buffer)
|
||||
{
|
||||
cmd_buffer->state.pipeline = state->old_pipeline;
|
||||
radv_CmdBindPipeline(radv_cmd_buffer_to_handle(cmd_buffer), VK_PIPELINE_BIND_POINT_GRAPHICS,
|
||||
radv_pipeline_to_handle(state->old_pipeline));
|
||||
|
||||
cmd_buffer->state.descriptors[0] = state->old_descriptor_set0;
|
||||
cmd_buffer->state.descriptors_dirty |= (1u << 0);
|
||||
memcpy(cmd_buffer->state.vertex_bindings, state->old_vertex_bindings,
|
||||
sizeof(state->old_vertex_bindings));
|
||||
|
||||
@@ -114,7 +114,6 @@ radv_meta_restore_compute(const struct radv_meta_saved_compute_state *state,
|
||||
radv_pipeline_to_handle(state->old_pipeline));
|
||||
|
||||
cmd_buffer->state.descriptors[0] = state->old_descriptor_set0;
|
||||
cmd_buffer->state.descriptors_dirty |= (1u << 0);
|
||||
|
||||
if (push_constant_size) {
|
||||
memcpy(cmd_buffer->push_constants, state->push_constants, push_constant_size);
|
||||
|
@@ -44,11 +44,6 @@ static unsigned get_max_db(struct radv_device *device)
|
||||
unsigned num_db = device->physical_device->rad_info.num_render_backends;
|
||||
MAYBE_UNUSED unsigned rb_mask = device->physical_device->rad_info.enabled_rb_mask;
|
||||
|
||||
if (device->physical_device->rad_info.chip_class == SI)
|
||||
num_db = 8;
|
||||
else
|
||||
num_db = MAX2(8, num_db);
|
||||
|
||||
/* Otherwise we need to change the query reset procedure */
|
||||
assert(rb_mask == ((1ull << num_db) - 1));
|
||||
|
||||
|
@@ -931,6 +931,9 @@ static void *radv_amdgpu_winsys_get_cpu_addr(void *_cs, uint64_t addr)
|
||||
{
|
||||
struct radv_amdgpu_cs *cs = (struct radv_amdgpu_cs *)_cs;
|
||||
void *ret = NULL;
|
||||
|
||||
if (!cs->ib_buffer)
|
||||
return NULL;
|
||||
for (unsigned i = 0; i <= cs->num_old_ib_buffers; ++i) {
|
||||
struct radv_amdgpu_winsys_bo *bo;
|
||||
|
||||
@@ -949,10 +952,15 @@ static void radv_amdgpu_winsys_cs_dump(struct radeon_winsys_cs *_cs,
|
||||
uint32_t trace_id)
|
||||
{
|
||||
struct radv_amdgpu_cs *cs = (struct radv_amdgpu_cs *)_cs;
|
||||
void *ib = cs->base.buf;
|
||||
int num_dw = cs->base.cdw;
|
||||
|
||||
ac_parse_ib(file,
|
||||
radv_amdgpu_winsys_get_cpu_addr(cs, cs->ib.ib_mc_address),
|
||||
cs->ib.size, trace_id, "main IB", cs->ws->info.chip_class,
|
||||
if (cs->ws->use_ib_bos) {
|
||||
ib = radv_amdgpu_winsys_get_cpu_addr(cs, cs->ib.ib_mc_address);
|
||||
num_dw = cs->ib.size;
|
||||
}
|
||||
assert(ib);
|
||||
ac_parse_ib(file, ib, num_dw, trace_id, "main IB", cs->ws->info.chip_class,
|
||||
radv_amdgpu_winsys_get_cpu_addr, cs);
|
||||
}
|
||||
|
||||
|
@@ -167,7 +167,6 @@ lower_distance_visitor::visit(ir_variable *ir)
|
||||
/* Clone the old var so that we inherit all of its properties */
|
||||
*new_var = ir->clone(ralloc_parent(ir), NULL);
|
||||
(*new_var)->name = ralloc_strdup(*new_var, GLSL_CLIP_VAR_NAME);
|
||||
(*new_var)->data.max_array_access = new_size - 1;
|
||||
(*new_var)->data.location = VARYING_SLOT_CLIP_DIST0;
|
||||
|
||||
if (!ir->type->fields.array->is_array()) {
|
||||
@@ -182,6 +181,7 @@ lower_distance_visitor::visit(ir_variable *ir)
|
||||
this->shader_stage == MESA_SHADER_GEOMETRY)));
|
||||
|
||||
assert (ir->type->fields.array == glsl_type::float_type);
|
||||
(*new_var)->data.max_array_access = new_size - 1;
|
||||
|
||||
/* And change the properties that we need to change */
|
||||
(*new_var)->type = glsl_type::get_array_instance(glsl_type::vec4_type,
|
||||
|
@@ -609,10 +609,10 @@ droid_query_buffer_age(_EGLDriver *drv,
|
||||
|
||||
if (update_buffers(dri2_surf) < 0) {
|
||||
_eglError(EGL_BAD_ALLOC, "droid_query_buffer_age");
|
||||
return 0;
|
||||
return -1;
|
||||
}
|
||||
|
||||
return dri2_surf->back->age;
|
||||
return dri2_surf->back ? dri2_surf->back->age : 0;
|
||||
}
|
||||
|
||||
static EGLBoolean
|
||||
|
@@ -463,7 +463,7 @@ dri2_drm_query_buffer_age(_EGLDriver *drv,
|
||||
|
||||
if (get_back_bo(dri2_surf) < 0) {
|
||||
_eglError(EGL_BAD_ALLOC, "dri2_query_buffer_age");
|
||||
return 0;
|
||||
return -1;
|
||||
}
|
||||
|
||||
return dri2_surf->back->age;
|
||||
|
@@ -808,7 +808,7 @@ dri2_wl_query_buffer_age(_EGLDriver *drv,
|
||||
|
||||
if (get_back_bo(dri2_surf) < 0) {
|
||||
_eglError(EGL_BAD_ALLOC, "dri2_query_buffer_age");
|
||||
return 0;
|
||||
return -1;
|
||||
}
|
||||
|
||||
return dri2_surf->back->age;
|
||||
|
@@ -409,7 +409,11 @@ _eglQuerySurface(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surface,
|
||||
_eglError(EGL_BAD_ATTRIBUTE, "eglQuerySurface");
|
||||
return EGL_FALSE;
|
||||
}
|
||||
*value = drv->API.QueryBufferAge(drv, dpy, surface);
|
||||
EGLint result = drv->API.QueryBufferAge(drv, dpy, surface);
|
||||
/* error happened */
|
||||
if (result < 0)
|
||||
return EGL_FALSE;
|
||||
*value = result;
|
||||
break;
|
||||
default:
|
||||
_eglError(EGL_BAD_ATTRIBUTE, "eglQuerySurface");
|
||||
|
@@ -70,6 +70,9 @@ etna_transfer_unmap(struct pipe_context *pctx, struct pipe_transfer *ptrans)
|
||||
if (rsc->texture && !etna_resource_newer(rsc, etna_resource(rsc->texture)))
|
||||
rsc = etna_resource(rsc->texture); /* switch to using the texture resource */
|
||||
|
||||
if (trans->rsc)
|
||||
etna_bo_cpu_fini(etna_resource(trans->rsc)->bo);
|
||||
|
||||
if (ptrans->usage & PIPE_TRANSFER_WRITE) {
|
||||
if (trans->rsc) {
|
||||
/* We have a temporary resource due to either tile status or
|
||||
@@ -105,15 +108,15 @@ etna_transfer_unmap(struct pipe_context *pctx, struct pipe_transfer *ptrans)
|
||||
}
|
||||
|
||||
rsc->seqno++;
|
||||
etna_bo_cpu_fini(rsc->bo);
|
||||
|
||||
if (rsc->base.bind & PIPE_BIND_SAMPLER_VIEW) {
|
||||
/* XXX do we need to flush the CPU cache too or start a write barrier
|
||||
* to make sure the GPU sees it? */
|
||||
ctx->dirty |= ETNA_DIRTY_TEXTURE_CACHES;
|
||||
}
|
||||
}
|
||||
|
||||
if (!trans->rsc)
|
||||
etna_bo_cpu_fini(rsc->bo);
|
||||
|
||||
pipe_resource_reference(&trans->rsc, NULL);
|
||||
pipe_resource_reference(&ptrans->resource, NULL);
|
||||
slab_free(&ctx->transfer_pool, trans);
|
||||
|
@@ -90,11 +90,20 @@ nvc0_screen_is_format_supported(struct pipe_screen *pscreen,
|
||||
bindings &= ~(PIPE_BIND_LINEAR |
|
||||
PIPE_BIND_SHARED);
|
||||
|
||||
if (bindings & PIPE_BIND_SHADER_IMAGE && sample_count > 1 &&
|
||||
nouveau_screen(pscreen)->class_3d >= GM107_3D_CLASS) {
|
||||
/* MS images are currently unsupported on Maxwell because they have to
|
||||
* be handled explicitly. */
|
||||
return false;
|
||||
if (bindings & PIPE_BIND_SHADER_IMAGE) {
|
||||
if (sample_count > 1 &&
|
||||
nouveau_screen(pscreen)->class_3d >= GM107_3D_CLASS) {
|
||||
/* MS images are currently unsupported on Maxwell because they have to
|
||||
* be handled explicitly. */
|
||||
return false;
|
||||
}
|
||||
|
||||
if (format == PIPE_FORMAT_B8G8R8A8_UNORM &&
|
||||
nouveau_screen(pscreen)->class_3d < NVE4_3D_CLASS) {
|
||||
/* This should work on Fermi, but for currently unknown reasons it
|
||||
* does not and results in breaking reads from pbos. */
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return (( nvc0_format_table[format].usage |
|
||||
|
@@ -366,6 +366,7 @@ struct si_context {
|
||||
struct si_shader_selector *last_tcs;
|
||||
int last_num_tcs_input_cp;
|
||||
int last_tes_sh_base;
|
||||
bool last_tess_uses_primid;
|
||||
unsigned last_num_patches;
|
||||
|
||||
/* Debug state. */
|
||||
|
@@ -101,6 +101,9 @@ static void si_emit_derived_tess_state(struct si_context *sctx,
|
||||
* It would be wrong to think that TCS = TES. */
|
||||
struct si_shader_selector *tcs =
|
||||
sctx->tcs_shader.cso ? sctx->tcs_shader.cso : sctx->tes_shader.cso;
|
||||
unsigned tess_uses_primid = sctx->ia_multi_vgt_param_key.u.tcs_tes_uses_prim_id;
|
||||
bool has_primid_instancing_bug = sctx->b.chip_class == SI &&
|
||||
sctx->b.screen->info.max_se == 1;
|
||||
unsigned tes_sh_base = sctx->shader_userdata.sh_base[PIPE_SHADER_TESS_EVAL];
|
||||
unsigned num_tcs_input_cp = info->vertices_per_patch;
|
||||
unsigned num_tcs_output_cp, num_tcs_inputs, num_tcs_outputs;
|
||||
@@ -114,7 +117,9 @@ static void si_emit_derived_tess_state(struct si_context *sctx,
|
||||
if (sctx->last_ls == ls->current &&
|
||||
sctx->last_tcs == tcs &&
|
||||
sctx->last_tes_sh_base == tes_sh_base &&
|
||||
sctx->last_num_tcs_input_cp == num_tcs_input_cp) {
|
||||
sctx->last_num_tcs_input_cp == num_tcs_input_cp &&
|
||||
(!has_primid_instancing_bug ||
|
||||
(sctx->last_tess_uses_primid == tess_uses_primid))) {
|
||||
*num_patches = sctx->last_num_patches;
|
||||
return;
|
||||
}
|
||||
@@ -123,6 +128,7 @@ static void si_emit_derived_tess_state(struct si_context *sctx,
|
||||
sctx->last_tcs = tcs;
|
||||
sctx->last_tes_sh_base = tes_sh_base;
|
||||
sctx->last_num_tcs_input_cp = num_tcs_input_cp;
|
||||
sctx->last_tess_uses_primid = tess_uses_primid;
|
||||
|
||||
/* This calculates how shader inputs and outputs among VS, TCS, and TES
|
||||
* are laid out in LDS. */
|
||||
@@ -155,8 +161,12 @@ static void si_emit_derived_tess_state(struct si_context *sctx,
|
||||
|
||||
/* Make sure that the data fits in LDS. This assumes the shaders only
|
||||
* use LDS for the inputs and outputs.
|
||||
*
|
||||
* While CIK can use 64K per threadgroup, there is a hang on Stoney
|
||||
* with 2 CUs if we use more than 32K. The closed Vulkan driver also
|
||||
* uses 32K at most on all GCN chips.
|
||||
*/
|
||||
hardware_lds_size = sctx->b.chip_class >= CIK ? 65536 : 32768;
|
||||
hardware_lds_size = 32768;
|
||||
*num_patches = MIN2(*num_patches, hardware_lds_size / (input_patch_size +
|
||||
output_patch_size));
|
||||
|
||||
@@ -174,22 +184,21 @@ static void si_emit_derived_tess_state(struct si_context *sctx,
|
||||
if (sctx->b.chip_class == SI) {
|
||||
unsigned one_wave = 64 / MAX2(num_tcs_input_cp, num_tcs_output_cp);
|
||||
*num_patches = MIN2(*num_patches, one_wave);
|
||||
|
||||
if (sctx->screen->b.info.max_se == 1) {
|
||||
/* The VGT HS block increments the patch ID unconditionally
|
||||
* within a single threadgroup. This results in incorrect
|
||||
* patch IDs when instanced draws are used.
|
||||
*
|
||||
* The intended solution is to restrict threadgroups to
|
||||
* a single instance by setting SWITCH_ON_EOI, which
|
||||
* should cause IA to split instances up. However, this
|
||||
* doesn't work correctly on SI when there is no other
|
||||
* SE to switch to.
|
||||
*/
|
||||
*num_patches = 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* The VGT HS block increments the patch ID unconditionally
|
||||
* within a single threadgroup. This results in incorrect
|
||||
* patch IDs when instanced draws are used.
|
||||
*
|
||||
* The intended solution is to restrict threadgroups to
|
||||
* a single instance by setting SWITCH_ON_EOI, which
|
||||
* should cause IA to split instances up. However, this
|
||||
* doesn't work correctly on SI when there is no other
|
||||
* SE to switch to.
|
||||
*/
|
||||
if (has_primid_instancing_bug)
|
||||
*num_patches = 1;
|
||||
|
||||
sctx->last_num_patches = *num_patches;
|
||||
|
||||
output_patch0_offset = input_patch_size * *num_patches;
|
||||
|
@@ -22,7 +22,7 @@
|
||||
include Makefile.sources
|
||||
include $(top_srcdir)/src/gallium/Automake.inc
|
||||
|
||||
AM_CXXFLAGS = $(GALLIUM_DRIVER_CFLAGS) $(SWR_CXX14_CXXFLAGS)
|
||||
AM_CXXFLAGS = $(GALLIUM_DRIVER_CFLAGS) $(SWR_CXX11_CXXFLAGS)
|
||||
|
||||
noinst_LTLIBRARIES = libmesaswr.la
|
||||
|
||||
@@ -32,7 +32,7 @@ COMMON_CXXFLAGS = \
|
||||
-fno-strict-aliasing \
|
||||
$(GALLIUM_DRIVER_CFLAGS) \
|
||||
$(LLVM_CXXFLAGS) \
|
||||
$(SWR_CXX14_CXXFLAGS) \
|
||||
$(SWR_CXX11_CXXFLAGS) \
|
||||
-I$(builddir)/rasterizer/codegen \
|
||||
-I$(builddir)/rasterizer/jitter \
|
||||
-I$(builddir)/rasterizer/archrast \
|
||||
|
@@ -38,7 +38,7 @@ loadersource = env.ParseSourceList('Makefile.sources', [
|
||||
|
||||
if not env['msvc'] :
|
||||
env.Append(CCFLAGS = [
|
||||
'-std=c++14',
|
||||
'-std=c++11',
|
||||
])
|
||||
|
||||
swrroot = '#src/gallium/drivers/swr/'
|
||||
|
@@ -953,26 +953,27 @@ public:
|
||||
|
||||
|
||||
private:
|
||||
template <typename MaskT>
|
||||
INLINE __m128i expandThenBlend4(uint32_t* min, uint32_t* max) // @llvm_func_start
|
||||
{
|
||||
__m128i vMin = _mm_set1_epi32(*min);
|
||||
__m128i vMax = _mm_set1_epi32(*max);
|
||||
return _simd_blend4_epi32<MaskT::value>(vMin, vMax);
|
||||
} // @llvm_func_end
|
||||
|
||||
INLINE void CalcTileSampleOffsets(int numSamples) // @llvm_func_start
|
||||
{
|
||||
auto expandThenBlend4 = [](uint32_t* min, uint32_t* max, auto mask)
|
||||
{
|
||||
__m128i vMin = _mm_set1_epi32(*min);
|
||||
__m128i vMax = _mm_set1_epi32(*max);
|
||||
return _simd_blend4_epi32<decltype(mask)::value>(vMin, vMax);
|
||||
};
|
||||
|
||||
{
|
||||
auto minXi = std::min_element(std::begin(_xi), &_xi[numSamples]);
|
||||
auto maxXi = std::max_element(std::begin(_xi), &_xi[numSamples]);
|
||||
std::integral_constant<int, 0xA> xMask;
|
||||
using xMask = std::integral_constant<int, 0xA>;
|
||||
// BR(max), BL(min), UR(max), UL(min)
|
||||
tileSampleOffsetsX = expandThenBlend4(minXi, maxXi, xMask);
|
||||
|
||||
tileSampleOffsetsX = expandThenBlend4<xMask>(minXi, maxXi);
|
||||
|
||||
auto minYi = std::min_element(std::begin(_yi), &_yi[numSamples]);
|
||||
auto maxYi = std::max_element(std::begin(_yi), &_yi[numSamples]);
|
||||
std::integral_constant<int, 0xC> yMask;
|
||||
using yMask = std::integral_constant<int, 0xC>;
|
||||
// BR(max), BL(min), UR(max), UL(min)
|
||||
tileSampleOffsetsY = expandThenBlend4(minYi, maxYi, yMask);
|
||||
tileSampleOffsetsY = expandThenBlend4<yMask>(minYi, maxYi);
|
||||
}; // @llvm_func_end
|
||||
// scalar sample values
|
||||
uint32_t _xi[SWR_MAX_NUM_MULTISAMPLES];
|
||||
|
@@ -54,6 +54,7 @@ lib@GL_LIB@_la_SOURCES = xlib.c
|
||||
lib@GL_LIB@_la_LDFLAGS = \
|
||||
-no-undefined \
|
||||
-version-number $(GL_MAJOR):$(GL_MINOR):$(GL_TINY) \
|
||||
$(BSYMBOLIC) \
|
||||
$(GC_SECTIONS) \
|
||||
$(LD_NO_UNDEFINED)
|
||||
|
||||
|
@@ -235,6 +235,11 @@ dri3_bind_context(struct glx_context *context, struct glx_context *old,
|
||||
if (!(*psc->core->bindContext) (pcp->driContext, dri_draw, dri_read))
|
||||
return GLXBadContext;
|
||||
|
||||
if (dri_draw)
|
||||
(*psc->f->invalidate)(dri_draw);
|
||||
if (dri_read && dri_read != dri_draw)
|
||||
(*psc->f->invalidate)(dri_read);
|
||||
|
||||
return Success;
|
||||
}
|
||||
|
||||
@@ -493,6 +498,7 @@ dri3_flush_front_buffer(__DRIdrawable *driDrawable, void *loaderPrivate)
|
||||
|
||||
loader_dri3_flush(draw, __DRI2_FLUSH_DRAWABLE, __DRI2_THROTTLE_FLUSHFRONT);
|
||||
|
||||
(*psc->f->invalidate)(driDrawable);
|
||||
loader_dri3_wait_gl(draw);
|
||||
}
|
||||
|
||||
|
@@ -1047,7 +1047,8 @@ gen6_blorp_hiz_exec(struct brw_context *brw, struct intel_mipmap_tree *mt,
|
||||
*/
|
||||
void
|
||||
intel_hiz_exec(struct brw_context *brw, struct intel_mipmap_tree *mt,
|
||||
unsigned int level, unsigned int layer, enum blorp_hiz_op op)
|
||||
unsigned int level, unsigned int start_layer,
|
||||
unsigned int num_layers, enum blorp_hiz_op op)
|
||||
{
|
||||
const char *opname = NULL;
|
||||
|
||||
@@ -1066,12 +1067,85 @@ intel_hiz_exec(struct brw_context *brw, struct intel_mipmap_tree *mt,
|
||||
break;
|
||||
}
|
||||
|
||||
DBG("%s %s to mt %p level %d layer %d\n",
|
||||
__func__, opname, mt, level, layer);
|
||||
DBG("%s %s to mt %p level %d layers %d-%d\n",
|
||||
__func__, opname, mt, level, start_layer, start_layer + num_layers - 1);
|
||||
|
||||
/* The following stalls and flushes are only documented to be required for
|
||||
* HiZ clear operations. However, they also seem to be required for the
|
||||
* HiZ resolve operation which is basically the same as a fast clear only a
|
||||
* different value is written into the HiZ surface.
|
||||
*/
|
||||
if (op == BLORP_HIZ_OP_DEPTH_CLEAR || op == BLORP_HIZ_OP_HIZ_RESOLVE) {
|
||||
if (brw->gen == 6) {
|
||||
/* From the Sandy Bridge PRM, volume 2 part 1, page 313:
|
||||
*
|
||||
* "If other rendering operations have preceded this clear, a
|
||||
* PIPE_CONTROL with write cache flush enabled and Z-inhibit
|
||||
* disabled must be issued before the rectangle primitive used for
|
||||
* the depth buffer clear operation.
|
||||
*/
|
||||
brw_emit_pipe_control_flush(brw,
|
||||
PIPE_CONTROL_RENDER_TARGET_FLUSH |
|
||||
PIPE_CONTROL_DEPTH_CACHE_FLUSH |
|
||||
PIPE_CONTROL_CS_STALL);
|
||||
} else if (brw->gen >= 7) {
|
||||
/*
|
||||
* From the Ivybridge PRM, volume 2, "Depth Buffer Clear":
|
||||
*
|
||||
* If other rendering operations have preceded this clear, a
|
||||
* PIPE_CONTROL with depth cache flush enabled, Depth Stall bit
|
||||
* enabled must be issued before the rectangle primitive used for
|
||||
* the depth buffer clear operation.
|
||||
*
|
||||
* Same applies for Gen8 and Gen9.
|
||||
*
|
||||
* In addition, from the Ivybridge PRM, volume 2, 1.10.4.1
|
||||
* PIPE_CONTROL, Depth Cache Flush Enable:
|
||||
*
|
||||
* This bit must not be set when Depth Stall Enable bit is set in
|
||||
* this packet.
|
||||
*
|
||||
* This is confirmed to hold for real, HSW gets immediate gpu hangs.
|
||||
*
|
||||
* Therefore issue two pipe control flushes, one for cache flush and
|
||||
* another for depth stall.
|
||||
*/
|
||||
brw_emit_pipe_control_flush(brw,
|
||||
PIPE_CONTROL_DEPTH_CACHE_FLUSH |
|
||||
PIPE_CONTROL_CS_STALL);
|
||||
|
||||
brw_emit_pipe_control_flush(brw, PIPE_CONTROL_DEPTH_STALL);
|
||||
}
|
||||
}
|
||||
|
||||
if (brw->gen >= 8) {
|
||||
gen8_hiz_exec(brw, mt, level, layer, op);
|
||||
for (unsigned a = 0; a < num_layers; a++)
|
||||
gen8_hiz_exec(brw, mt, level, start_layer + a, op);
|
||||
} else {
|
||||
gen6_blorp_hiz_exec(brw, mt, level, layer, op);
|
||||
for (unsigned a = 0; a < num_layers; a++)
|
||||
gen6_blorp_hiz_exec(brw, mt, level, start_layer + a, op);
|
||||
}
|
||||
|
||||
|
||||
/* The following stalls and flushes are only documented to be required for
|
||||
* HiZ clear operations. However, they also seem to be required for the
|
||||
* HiZ resolve operation which is basically the same as a fast clear only a
|
||||
* different value is written into the HiZ surface.
|
||||
*/
|
||||
if (op == BLORP_HIZ_OP_DEPTH_CLEAR || op == BLORP_HIZ_OP_HIZ_RESOLVE) {
|
||||
if (brw->gen == 6) {
|
||||
/* From the Sandy Bridge PRM, volume 2 part 1, page 314:
|
||||
*
|
||||
* "DevSNB, DevSNB-B{W/A}]: Depth buffer clear pass must be
|
||||
* followed by a PIPE_CONTROL command with DEPTH_STALL bit set
|
||||
* and Then followed by Depth FLUSH'
|
||||
*/
|
||||
brw_emit_pipe_control_flush(brw,
|
||||
PIPE_CONTROL_DEPTH_STALL);
|
||||
|
||||
brw_emit_pipe_control_flush(brw,
|
||||
PIPE_CONTROL_DEPTH_CACHE_FLUSH |
|
||||
PIPE_CONTROL_CS_STALL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -70,7 +70,8 @@ brw_blorp_resolve_color(struct brw_context *brw,
|
||||
|
||||
void
|
||||
intel_hiz_exec(struct brw_context *brw, struct intel_mipmap_tree *mt,
|
||||
unsigned int level, unsigned int layer, enum blorp_hiz_op op);
|
||||
unsigned int level, unsigned int start_layer,
|
||||
unsigned int num_layers, enum blorp_hiz_op op);
|
||||
|
||||
void gen6_blorp_exec(struct blorp_batch *batch,
|
||||
const struct blorp_params *params);
|
||||
|
@@ -175,71 +175,13 @@ brw_fast_clear_depth(struct gl_context *ctx)
|
||||
mt->depth_clear_value = depth_clear_value;
|
||||
}
|
||||
|
||||
if (brw->gen == 6) {
|
||||
/* From the Sandy Bridge PRM, volume 2 part 1, page 313:
|
||||
*
|
||||
* "If other rendering operations have preceded this clear, a
|
||||
* PIPE_CONTROL with write cache flush enabled and Z-inhibit disabled
|
||||
* must be issued before the rectangle primitive used for the depth
|
||||
* buffer clear operation.
|
||||
*/
|
||||
brw_emit_pipe_control_flush(brw,
|
||||
PIPE_CONTROL_RENDER_TARGET_FLUSH |
|
||||
PIPE_CONTROL_DEPTH_CACHE_FLUSH |
|
||||
PIPE_CONTROL_CS_STALL);
|
||||
} else if (brw->gen >= 7) {
|
||||
/*
|
||||
* From the Ivybridge PRM, volume 2, "Depth Buffer Clear":
|
||||
*
|
||||
* If other rendering operations have preceded this clear, a
|
||||
* PIPE_CONTROL with depth cache flush enabled, Depth Stall bit
|
||||
* enabled must be issued before the rectangle primitive used for the
|
||||
* depth buffer clear operation.
|
||||
*
|
||||
* Same applies for Gen8 and Gen9.
|
||||
*
|
||||
* In addition, from the Ivybridge PRM, volume 2, 1.10.4.1 PIPE_CONTROL,
|
||||
* Depth Cache Flush Enable:
|
||||
*
|
||||
* This bit must not be set when Depth Stall Enable bit is set in
|
||||
* this packet.
|
||||
*
|
||||
* This is confirmed to hold for real, HSW gets immediate gpu hangs.
|
||||
*
|
||||
* Therefore issue two pipe control flushes, one for cache flush and
|
||||
* another for depth stall.
|
||||
*/
|
||||
brw_emit_pipe_control_flush(brw,
|
||||
PIPE_CONTROL_DEPTH_CACHE_FLUSH |
|
||||
PIPE_CONTROL_CS_STALL);
|
||||
|
||||
brw_emit_pipe_control_flush(brw, PIPE_CONTROL_DEPTH_STALL);
|
||||
}
|
||||
|
||||
if (fb->MaxNumLayers > 0) {
|
||||
for (unsigned layer = 0; layer < depth_irb->layer_count; layer++) {
|
||||
intel_hiz_exec(brw, mt, depth_irb->mt_level,
|
||||
depth_irb->mt_layer + layer,
|
||||
BLORP_HIZ_OP_DEPTH_CLEAR);
|
||||
}
|
||||
} else {
|
||||
intel_hiz_exec(brw, mt, depth_irb->mt_level, depth_irb->mt_layer,
|
||||
intel_hiz_exec(brw, mt, depth_irb->mt_level,
|
||||
depth_irb->mt_layer, depth_irb->layer_count,
|
||||
BLORP_HIZ_OP_DEPTH_CLEAR);
|
||||
} else {
|
||||
intel_hiz_exec(brw, mt, depth_irb->mt_level, depth_irb->mt_layer, 1,
|
||||
BLORP_HIZ_OP_DEPTH_CLEAR);
|
||||
}
|
||||
|
||||
if (brw->gen == 6) {
|
||||
/* From the Sandy Bridge PRM, volume 2 part 1, page 314:
|
||||
*
|
||||
* "DevSNB, DevSNB-B{W/A}]: Depth buffer clear pass must be followed
|
||||
* by a PIPE_CONTROL command with DEPTH_STALL bit set and Then
|
||||
* followed by Depth FLUSH'
|
||||
*/
|
||||
brw_emit_pipe_control_flush(brw,
|
||||
PIPE_CONTROL_DEPTH_STALL);
|
||||
|
||||
brw_emit_pipe_control_flush(brw,
|
||||
PIPE_CONTROL_DEPTH_CACHE_FLUSH |
|
||||
PIPE_CONTROL_CS_STALL);
|
||||
}
|
||||
|
||||
/* Now, the HiZ buffer contains data that needs to be resolved to the depth
|
||||
|
@@ -329,6 +329,7 @@ intel_miptree_blit(struct brw_context *brw,
|
||||
intel_miptree_slice_resolve_depth(brw, dst_mt, dst_level, dst_slice);
|
||||
intel_miptree_resolve_color(brw, src_mt, src_level, src_slice, 1, 0);
|
||||
intel_miptree_resolve_color(brw, dst_mt, dst_level, dst_slice, 1, 0);
|
||||
intel_miptree_slice_set_needs_hiz_resolve(dst_mt, dst_level, dst_slice);
|
||||
|
||||
if (src_flip)
|
||||
src_y = minify(src_mt->physical_height0, src_level - src_mt->first_level) - src_y - height;
|
||||
@@ -387,6 +388,7 @@ intel_miptree_copy(struct brw_context *brw,
|
||||
intel_miptree_slice_resolve_depth(brw, dst_mt, dst_level, dst_slice);
|
||||
intel_miptree_resolve_color(brw, src_mt, src_level, src_slice, 1, 0);
|
||||
intel_miptree_resolve_color(brw, dst_mt, dst_level, dst_slice, 1, 0);
|
||||
intel_miptree_slice_set_needs_hiz_resolve(dst_mt, dst_level, dst_slice);
|
||||
|
||||
uint32_t src_image_x, src_image_y;
|
||||
intel_miptree_get_image_offset(src_mt, src_level, src_slice,
|
||||
|
@@ -442,13 +442,9 @@ intel_create_renderbuffer(mesa_format format, unsigned num_samples)
|
||||
struct intel_renderbuffer *irb;
|
||||
struct gl_renderbuffer *rb;
|
||||
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
irb = CALLOC_STRUCT(intel_renderbuffer);
|
||||
if (!irb) {
|
||||
_mesa_error(ctx, GL_OUT_OF_MEMORY, "creating renderbuffer");
|
||||
if (!irb)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
rb = &irb->Base.Base;
|
||||
irb->layer_count = 1;
|
||||
|
@@ -1992,7 +1992,7 @@ intel_miptree_slice_resolve(struct brw_context *brw,
|
||||
if (!item || item->need != need)
|
||||
return false;
|
||||
|
||||
intel_hiz_exec(brw, mt, level, layer, need);
|
||||
intel_hiz_exec(brw, mt, level, layer, 1, need);
|
||||
intel_resolve_map_remove(item);
|
||||
return true;
|
||||
}
|
||||
@@ -2028,7 +2028,7 @@ intel_miptree_all_slices_resolve(struct brw_context *brw,
|
||||
if (map->need != need)
|
||||
continue;
|
||||
|
||||
intel_hiz_exec(brw, mt, map->level, map->layer, need);
|
||||
intel_hiz_exec(brw, mt, map->level, map->layer, 1, need);
|
||||
intel_resolve_map_remove(map);
|
||||
did_resolve = true;
|
||||
}
|
||||
|
@@ -1029,10 +1029,6 @@ intel_miptree_unmap(struct brw_context *brw,
|
||||
unsigned int level,
|
||||
unsigned int slice);
|
||||
|
||||
void
|
||||
intel_hiz_exec(struct brw_context *brw, struct intel_mipmap_tree *mt,
|
||||
unsigned int level, unsigned int layer, enum blorp_hiz_op op);
|
||||
|
||||
bool
|
||||
intel_miptree_sample_with_hiz(struct brw_context *brw,
|
||||
struct intel_mipmap_tree *mt);
|
||||
|
@@ -76,6 +76,7 @@ lib@GL_LIB@_la_LIBADD = \
|
||||
lib@GL_LIB@_la_LDFLAGS = \
|
||||
-no-undefined \
|
||||
-version-number $(GL_MAJOR):$(GL_MINOR):$(GL_PATCH) \
|
||||
$(BSYMBOLIC) \
|
||||
$(GC_SECTIONS) \
|
||||
$(LD_NO_UNDEFINED)
|
||||
|
||||
|
@@ -379,13 +379,13 @@ glXQueryServerString(Display *dpy, int screen, int name)
|
||||
|
||||
/*** GLX_VERSION_1_2 ***/
|
||||
|
||||
/* declare here to avoid including xmesa.h */
|
||||
extern Display *XMesaGetCurrentDisplay(void);
|
||||
|
||||
Display PUBLIC *
|
||||
glXGetCurrentDisplay(void)
|
||||
{
|
||||
/* Same code as in libGL's glxext.c */
|
||||
__GLXcontext *gc = (__GLXcontext *) glXGetCurrentContext();
|
||||
if (NULL == gc) return NULL;
|
||||
return gc->currentDpy;
|
||||
return XMesaGetCurrentDisplay();
|
||||
}
|
||||
|
||||
|
||||
|
@@ -37,7 +37,6 @@
|
||||
* work properly.
|
||||
*/
|
||||
typedef struct __GLXcontextRec {
|
||||
Display *currentDpy;
|
||||
GLboolean isDirect;
|
||||
GLXDrawable currentDrawable;
|
||||
GLXDrawable currentReadable;
|
||||
|
@@ -1304,6 +1304,14 @@ XMesaBuffer XMesaGetCurrentReadBuffer( void )
|
||||
}
|
||||
|
||||
|
||||
Display *XMesaGetCurrentDisplay(void)
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
XMesaContext xmctx = XMESA_CONTEXT(ctx);
|
||||
return xmctx ? xmctx->display : NULL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
GLboolean XMesaSetFXmode( GLint mode )
|
||||
{
|
||||
|
@@ -240,6 +240,12 @@ extern XMesaBuffer XMesaGetCurrentBuffer( void );
|
||||
extern XMesaBuffer XMesaGetCurrentReadBuffer( void );
|
||||
|
||||
|
||||
/*
|
||||
* Return display of current context.
|
||||
*/
|
||||
extern Display *XMesaGetCurrentDisplay( void );
|
||||
|
||||
|
||||
/*
|
||||
* Swap the front and back buffers for the given buffer. No action is
|
||||
* taken if the buffer is not double buffered.
|
||||
|
@@ -22,7 +22,7 @@
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "st_debug.h"
|
||||
#include "st_program.h"
|
||||
#include "st_shader_cache.h"
|
||||
#include "compiler/glsl/program.h"
|
||||
@@ -383,6 +383,11 @@ st_load_tgsi_from_disk_cache(struct gl_context *ctx,
|
||||
_mesa_associate_uniform_storage(ctx, prog, glprog->Parameters,
|
||||
false);
|
||||
|
||||
/* Create Gallium shaders now instead of on demand. */
|
||||
if (ST_DEBUG & DEBUG_PRECOMPILE ||
|
||||
st->shader_has_one_variant[glprog->info.stage])
|
||||
st_precompile_shader_variant(st, glprog);
|
||||
|
||||
free(buffer);
|
||||
} else {
|
||||
/* Failed to find a matching cached shader so fallback to recompile.
|
||||
|
@@ -25,6 +25,7 @@
|
||||
#if defined(__linux__)
|
||||
#include <sys/file.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#else
|
||||
#include <time.h>
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user